In my initial testing of GStreamer RTP streaming pipeline, I find x264enc to be 100 - 200 ms faster in encoding than nvv4l2h264enc.
I’m using OpenCV VideoWriter, here are the pipelines I used for testing:
cv::VideoWriter wrt;
wrt.open("appsrc ! video/x-raw, format=(string)BGR ! videoconvert ! video/x-raw, format=(string)I420 ! nvvidconv ! video/x-raw(memory:NVMM), format=(string)NV12 ! nvv4l2h264enc bitrate=2048000 maxperf-enable=true preset-level=1 ! h264parse ! rtph264pay ! udpsink port=5000 host=127.0.0.1", cv::CAP_GSTREAMER, 0, cap.get(cv::CAP_PROP_FPS), cv::Size(cap.get(cv::CAP_PROP_FRAME_WIDTH), cap.get(cv::CAP_PROP_FRAME_HEIGHT)));
cv::VideoWriter wrt;
wrt.open("appsrc ! video/x-raw, format=(string)BGR ! videoconvert ! video/x-raw, format=(string)NV12 ! x264enc tune=zerolatency speed-preset=superfast bitrate=2048 sliced-threads=true ! h264parse ! rtph264pay ! udpsink port=5000 host=127.0.0.1", cv::CAP_GSTREAMER, 0, cap.get(cv::CAP_PROP_FPS), cv::Size(cap.get(cv::CAP_PROP_FRAME_WIDTH), cap.get(cv::CAP_PROP_FRAME_HEIGHT)));
Am I missing some option in nvv4l2h264enc or what could cause such a big difference in favor of x264enc in the encoding performance?
I’m running JetPack 6.2 on Jetson AGX Orin developer kit.