Raspberry Pi Low-Latency Stream with GStreamer

Michael MacIntosh mmacintosh at linear-systems.com
Fri Oct 27 17:54:51 UTC 2017


You can use the "last-sample" property to get a sample, which has a 
timestamp on it, I personally then convert it to a jpeg using another 
pipeline with an appsrc, although there are probably better ways if you 
are more familiar with GTK than I am.  Although I have no idea how you 
would do that from the command line interface.

Also it looks like you are saving raw video buffers... You might want to 
move where your tee is, for instance:

*gst-launch-1.0 udpsrc port=5000
   ! gdpdepay
   ! rtph264depay
   ! tee name = t
   t. ! queue ! avdec_h264 ! videoconvert ! autovideosink sync=false
   t. ! queue ! filesink location=tee.h264
*

That is assuming you don't want raw video, but with that pipeline with 
any video feed at a decent resolution you will fill your storage very 
quickly.

I am not personally familiar with gdppay and gdpdepay.

Good luck!

Cheers,
Michael.

On 10/26/2017 6:21 PM, waymond91 wrote:
> Thank you guys for the help! Adding the queue seemed to do the trick!
> Now my receive side pipeline looks like this:
> *gst-launch-1.0 udpsrc port=5000
>    ! gdpdepay
>    ! rtph264depay
>    ! avdec_h264
>    ! videoconvert
>    ! tee name = t
>    t. ! queue ! autovideosink sync=false
>    t. ! queue ! filesink location=tee.h264
> *
>
> I am quite happy with this solution because all the decoding takes place
> before the tee. Is the video being displayed and saved synchronously?
>
> Any ideas for how to timestamp and save an invidual frame as it is
> displayed? Would converting the stream to MJPEG before displaying and saving
> the video add a lot of latency? Or should I just be streaming in MJPEG in
> the first place?
>
> I tried removing the gdppay from the source device and the gdpdepay from the
> sink device, but now I get the following error from the sink device:
>
> *GstPipeline:pipeline0GstRtpH264Depay:rtph264depay0:
> Input buffers need to have RTP caps set on them. This is usually achieved by
> setting the 'caps' property of the upstream source element (often udpsrc or
> appsrc), or by putting a capsfilter element before the depayloader and
> setting the 'caps' property on that. *
>
> Reading the post from freedesktop, the gdppay seems to create some sort of
> serial buffer specific to gstreamer. Not sure why I need it or if finding a
> way around it would help with performance.
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list