Hi everyone,
I need your help about the streaming with raspidiv and Gstream please
I can send the streaming in TCP from my RPI and receive it in Mac os or Windows. It works well. But in order to reduce the latency (therorically), I try to put in place UDP with udpsink.
For your information, I have created a VPN in order to have the RPI, the windows laptop and Mac laptop on the same network and avoid the issue of port close or open with the SIM card.
So, I use this commande for the RPI sender (192.168.0.6) :
raspivid -t 999999 -h 720 -w 1080 -fps 25 -vf -hf -b 500000 -o - | gst-launch-1.0 -e -vvv
fdsrc ! h264parse ! rtph264pay pt=96 config-interval=5 ! udpsink host=192.168.0.10 port=5000
And I use this commande for the receiver windows (192.168.0.10):
C:\gstreamer\1.0\x86_64\bin>gst-launch-1.0 -e udpsrc port=5000 ! gdpdepay ! rtph 264depay !
avdec_h264 ! fpsdisplaysink sync=false text-overlay=false
Below the Results when I send the streaming video seems ok :
root@raspberrypi:/etc/init.d# ./udpstreamingStart.sh
Setting pipeline to PAUSED ... Pipeline is PREROLLING ..
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, width=(int)1080,
height=(int)720, parsed=(boolean)true, stream-format=(string)avc, alignment=(string)au,
codec_data=(buffer)01640028ffe1000f27640028ac2b402202df2f00f1226a01000528ee01372c
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:src: caps = application/x-rtp,
media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264,
sprop-parameter-sets=(string)"J2QAKKwrQCIC3y8A8SJq\,KO4BNyw\=",
payload=(int)96, ssrc=(uint)3523485211, timestamp-offset=(uint)1217596606, seqnum-offset=(uint)49526
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink:
caps = application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)H264, sprop-parameter-sets=(string)"J2QAKKwrQCIC3y8A8SJq\,KO4BNyw\=",
payload=(int)96, ssrc=(uint)3523485211, timestamp-offset=(uint)1217596606,
seqnum-offset=(uint)49526 /GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:sink:
caps = video/x-h264, width=(int)1080, height=(int)720, parsed=(boolean)true,
stream-format=(string)avc, alignment=(string)au, codec_data
(buffer)01640028ffe1000f27640028ac2b402202df2f00f1226a01000528ee01372c
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: timestamp = 1217596606
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: seqnum = 49526 Pipeline is PREROLLED ...
Setting pipeline to PLAYING ... New clock: GstSystemClock
And result on the Receiver seems ok (it is waiting the flux) :
C:\gstreamer\1.0\x86_64\bin>gst-launch-1.0 -e udpsrc port=5000 ! gdpdepay ! rtph 264depay ! avdec_h264 ! fpsdisplaysink sync=false text-overlay=false Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ... Setting pipeline to PLAYING ... New clock: GstSystemClock
I can ping any computer in the VPN network.
The port is open, because I used it in TCP and it works. I also try an other 9000 port without succes. I tried with an other computer on Mac, using his IP adress, and it doesn't works also.
I try to unplugged the Pixhawk in order to see if it blocks something, but it is not the case.
I know that @mattiao use UPD to stream, so if you can help me please.
Thank you guys.
Maurice