I am trying to build a video pipeline with GStreamer.
In the end it should be a full duplex Full HD video conferencing solution. As the Raspberry Pi 3 is not capable to encode and decode the video stream at the same time I am using a Logitech C920 to encode the video. So the my RPi only needs to encode and decode Audio, and decode the H.264 video.
I build GStreamer from source (188.8.131.52 & 1.12.0) as the 1.4.4 from the raspbian repository had problems with G.722 encoding. Libraries like
libsrtp (encryption), libwebrtc (echocanceling) (0.1 in repo to old - so manually downloaded 0.3) are build as well. So i do have
omxh264dec - but I couldn't find a video sink to play the 1080p video smoothly. So I tried to pipe (with a named pipe) the h.264 stream do hello_video or the
omxplayer, which worked fine as long as I stay local. As soon as I try to stream it over RTP hello_video doesn't show anything.
gst-launch-1.0 filesrc location=/opt/vc/src/hello_pi/hello_video/test.h264 ! filesink location=/home/pi/test & /opt/vc/src/hello_pi/hello_video/hello_video.bin /home/pi/test even with stream from camera: gst-launch-1.0 v4l2src ! 'video/x-h264,width=1920,height=1080,framerate=30/1' ! filesink location=/home/pi/test & /opt/vc/src/hello_pi/hello_video/hello_video.bin /home/pi/test
Not working when transmitting over RTP:
gst-launch-1.0 v4l2src ! 'video/x-h264,width=1920,height=1080,framerate=30/1' ! h264parse config-interval=1 ! rtph264pay ! udpsink host=10.0.0.129 port=5000 \ & gst-launch-1.0 udpsrc port=5000 ! application/x-rtp, encoding-name=H264,payload=96 ! rtph264depay ! 'video/x-h264,width=1920,height=1080,framerate=30/1' ! filesink location=/home/pi/test \ & /opt/vc/src/hello_pi/hello_video/hello_video.bin /home/pi/test
Not working without UDP RTP:
gst-launch-1.0 v4l2src ! h264parse config-interval=1 ! rtph264pay ! queue ! rtph264depay ! filesink location=/home/pi/test \ & /opt/vc/src/hello_pi/hello_video/hello_video.bin /home/pi/test
So it seems that something happens as soon as the video stream gets enclosed in RTP.
I know that the RTP Stream works, as I can receive it on my VM and play it without any trouble. But, of course, on the VM I can use the autovideosink. working receive on Ubuntu:
gst-launch-1.0 udpsrc port=5000 ! \ application/x-rtp,\ encoding-name=H264,payload=96 ! \ rtph264depay ! h264parse ! avdec_h264 ! \ autovideosink
Any suggestions are highly appreciated.