Please provide complete information as applicable to your setup.
• Hardware Platform: T4
• NVIDIA GPU Driver Version:450.80
• Issue Type:questions
Hi NVs,
I am using nvv4l2h264enc
in gstreamer pipeline for opencv udpsink, but I cant run it succeed. Can you help me fix it? Thanks!
I have tested the rtsp function in jetson, and it can run succeed, the pipeline is below.
output = cv2.VideoWriter('appsrc is-live=true ! videoconvert ! omxh264enc bitrate=12000000 ! video/x-h264, \
stream-format=byte-stream ! rtph264pay pt=96 ! udpsink host=127.0.0.1 port=5401 async=false',cv2.CAP_GSTREAMER,0, fps, (width,height), True)
As far as my know, we should use nvv4l2h264enc
element rather than omxh264enc
in dGPU, so I test pipeline below but run failed.
output = cv2.VideoWriter('appsrc is-live=true ! videoconvert ! video/x-raw,format=I420 ! nvvideoconvert ! video/x-raw(memory:NVMM) ! nvv4l2h264enc ! h264parse ! rtph264pay pt=96 ! udpsink host=127.0.0.1 port=5401',cv2.CAP_GSTREAMER, 0, fps, (width,height), True)
if not output.isOpened():
print('VideoWriter not opened')
exit(0)
But I can test pipeline succeed
gst-launch-1.0 appsrc ! video/x-raw,width=1920,height=1080,format=BGR ! videoconvert ! video/x-raw,format=I420 ! nvvideoconvert ! 'video/x-raw(memory:NVMM)' ! nvv4l2h264enc ! h264parse ! rtph264pay pt=96 ! udpsink host=127.0.0.1 port=5401
gst-launch-1.0 videotestsrc ! video/x-raw,width=1920,height=1080,format=BGR ! videoconvert ! video/x-raw,format=I420 ! nvvideoconvert ! 'video/x-raw(memory:NVMM)' ! nvv4l2h264enc ! h264parse ! matroskamux ! fakesink
Can you give me some advices? Thanks!