Hello,
i already have a working setup with Raspberry Pi 4 (+ USB3 HDMI capture card) transmitter and VLC Video Source (OBS) receiver. It provides good quality and smooth video, but there is over 1 second of latency, which is not constant, even though i am using UDP protocol. So i would like to replace VLC Video Source with GStreamer source, but i have some problems.
My current, known good setup:
RPi 4 transmitter:
gst-launch-1.0 -vv -e v4l2src device=/dev/video0 ! videoconvert ! "video/x-raw,width=1280,height=720,framerate=60/1" ! omxh264enc target-bitrate=2000000 control-rate=1 ! "video/x-h264,profile=high" ! h264parse ! queue max-size-bytes=10000000 ! mpegtsmux ! rtpmp2tpay ! udpsink host=192.168.1.230 port=5000
OBS VLC Video Source:
Playlist: rtp://@:5000
Network Caching: 100ms
Media Source also works: udp://0.0.0.0:5000
I like that setup because it always resumes the connection when it's interrupted, even after I reboot the RPi or turn the wifi off/on. I would like to achieve the same result, but with lower latency, ideally with a constant latency.
I tried this command with GStreamer source in OBS:
udpsrc port=5000 ! rtpmp2tdepay ! tsdemux ! h264parse ! decodebin ! video.
But it doesn't output anything. Tried various other commands, but with no success. I only managed it to work with TCP connection on both sides, but that causes latency problems. I would really appreciate any help on this issue.
----
BTW currently i am having good results with a small workaround... Game Capture source, capturing output of mpv player running in background with such parameters:
mpv --no-cache --untimed --no-demuxer-thread --no-border --window-scale=1 --keepaspect --no-window-dragging --video-unscaled=yes --video-sync=audio --no-osc --vd-lavc-threads=1 udp://0.0.0.0:5000