0

I am trying to stream video from my raspberry pi camera over my LAN to a a windows machine running VLC. I have been able to do it successfully using "raspivid" in conjunction with "clvc" to stream the video over rtsp. The only problem with that was that I got a ~2 second delay which is not acceptable for this application. I have been trying to stream the video using "raspivid" with "gst-launch-1.0" from gstreamer, but so far I have been unsuccessful.

I'll be honest, I'm not very familiar with gstreamer and I haven't been able to dig too deep into the documentation.

Here is what I've done so far: raspivid -t 0 -h 720 -w 1080 -fps 25 -hf -b 2000000 -o - | gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay config-interval=1 pt=96 ! gdppay ! tcpserversink host=192.168.1.20 port=5001

When I run that on the raspberry pi, it says:

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstTCPServerSink:tcpserversink0: current-port = 5001
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, width=(int)1080, height=(int)720, framerate=(fraction)0/1, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, stream-format=(string)avc, alignment=(string)au, profile=(string)high, level=(string)4, codec_data=(buffer)01640028ffe1000f27640028ac2b402202df2f00f1226a01000528ee025cb0
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:src: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, packetization-mode=(string)1, profile-level-id=(string)640028, sprop-parameter-sets=(string)"J2QAKKwrQCIC3y8A8SJq\,KO4CXLA\=", payload=(int)96, ssrc=(uint)1019454959, timestamp-offset=(uint)4100043270, seqnum-offset=(uint)11144
/GstPipeline:pipeline0/GstGDPPay:gdppay0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, packetization-mode=(string)1, profile-level-id=(string)640028, sprop-parameter-sets=(string)"J2QAKKwrQCIC3y8A8SJq\,KO4CXLA\=", payload=(int)96, ssrc=(uint)1019454959, timestamp-offset=(uint)4100043270, seqnum-offset=(uint)11144
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:sink: caps = video/x-h264, width=(int)1080, height=(int)720, framerate=(fraction)0/1, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, stream-format=(string)avc, alignment=(string)au, profile=(string)high, level=(string)4, codec_data=(buffer)01640028ffe1000f27640028ac2b402202df2f00f1226a01000528ee025cb0
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: timestamp = 4100043270
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: seqnum = 11144
/GstPipeline:pipeline0/GstGDPPay:gdppay0.GstPad:src: caps = application/x-gdp, streamheader=(buffer)< 

and then it spits out a bunch of hex and then

Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock 

On the windows side, I use VLC to open an .sdp file with the follow:

v=0
m=video 5001 RTP/AVP 96
c=IN IP4 192.168.1.20
a=rtpmap:96 H264/90000

VLC tries to load it for a bit, then stops.

And this is where I'm at, and I'm not really sure where to go from here. Any help would be appreciated!

1
  • Did you ever figure this out? I'm doing the same-ish right now. If I figure it out, I'll post an answer. – Christopher Stevens Aug 8 '20 at 14:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.