gstreamer - latency sending RTP video

Viewed 17

I'm setting up a wireless streaming rig. I have two web cams a C920 that works nicely. My Logitech Brio camera is delayed causing the camera to be out of sync while both are displayed. I've tried using different encoders (MJPG, YUY2, NV12).

Do you know how to reduce the latency? Alternatively I could increase the latency on the C920 camera so they are in sync.

I've tried H264 & H265 with the same results.

Server / Encoder

gst-launch-1.0 -v -e v4l2src device=/dev/video6 ! video/x-raw,format=YUY2,width=1920,height=1080,framerate=30/1 ! videoconvert ! x265enc ! h265parse ! rtph265pay ! udpsink host=192.168.1.54 port=8555

Client / Decoder

udpsrc port=8555 caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H265, payload=(int)96" ! rtph265depay ! h265parse ! avdec_h265 ! video.
1 Answers

I moved to using MJPG with the Logitech Brio

gst-launch-1.0 -v -e v4l2src device=/dev/video6 ! image/jpeg,format=MJPG,width=1920,height=1080,framerate=60/1 ! jpegparse ! rtpjpegpay ! udpsink host=192.168.1.54 port=8555

A better x264enc line set

gst-launch-1.0 -v -e v4l2src device=/dev/video6 ! video/x-raw,format=YUY2,width=1920,height=1080,framerate=30/1 ! videoconvert ! x264enc bitrate=6000 pass=pass1 speed-preset=ultrafast tune=zerolatency sliced-threads=true threads=6 ! h264parse ! rtph264pay ! udpsink host=192.168.1.54 port=8555
Related