Video to stdout

Nicolas Dufresne nicolas at ndufresne.ca
Fri May 3 19:46:54 UTC 2019


Le vendredi 03 mai 2019 à 08:16 -0500, lec1 a écrit :
> Hi, thanks for your wonderful work.
> 
> I am adding streamer support to a Node.js application. This application
> currently uses ffmpeg and has grown around the "fluent ffmeg" framework. 
> The "fluent ffmpeg" software drives the video via a pipe to stdout. A lot of
> support software has been written in the application to support this model.
> Now to my problems with gstreamer, In order to be the least disruptive
> possible I have adopted the same model. A RTSP stream at the head and a
> stdout sink. Here are some of the things I have tried:
> 
> 
>  gst-launch-1.0 uridecodebin silent=true
> uri=rtsp://192.168.1.x:8822/test.stm ! queue ! fdsink fd=1
>  gst-launch-1.0 rtspsrc silent=true
> location=rtsp://192.168.1.x:8822/test.stm ! rtph264depay ! fdsink fd=1
>  gst-launch-1.0 rtspsrc silent=true
> location=rtsp://192.168.1.x:8822/test.stm
> caps="video/x-h264,width=1280,height=800,framerate=(fraction)25/1" ! queue !
> rtph264depay ! h264parse ! avdec_h264 ! fdsink fd=1 
> etc.
> 
> All of the above produce video when terminated by "autovideosink" instead of
> the "fdsink fd=1" construct.
> 
> However with "fdsink fd=1" or "filesink location=/dev/stdout" video pipe
> termination, the pipeline is stalled. 
> 
> The software that handles the pipeline fills up buffers and extracts the
> mpeg images to display on a web page. I have wrapped gstreamer in a wrapper
> very similar to the "fluent" wrapper for ffmpeg and have attached event
> handlers to help with the progress of the pipeline. I have enabled debug
> logging and nothing jumps at me. It looks like the pipeline is behaving as
> it should yet I still am unable to get video output.
> 
> I have also attempted to concatenate pipelines. 
> 
> e.g.  
> gst-launch-1.0 uridecodebin silent=true uri=rtsp://192.168.1.x:8822/test.stm
> ! queue ! fdsink fd=1 | gst-launch-1.0 fdsrc fd=0 ! decodebin !
> autovideosink 
> but thus far I have not succeeded.

This one won't work, since you are sending raw video frame over your
pipe. The receive will only see a contiguous blob of data and cannot
figure-out the type (in this case raw, with unspecified
width/height/stride and framerate). Here's an example working pipeline.


gst-launch-1.0 -q videotestsrc ! video/x-raw,format=YUY2,width=640,height=480 ! fdsink | gst-launch-1.0 fdsrc ! rawvideoparse format=yuy2 width=640 height=480 framerate=0/1 ! videoconvert ! autovideosink sync=0

Notice the -q, which means quiet. Otherwise the pipe will pick anything
the goes on stdout, including the normal traces. Are you sure that you
want raw video frames like this ?

> 
> Any light you can shed on the resolution of this issue is greatly
> appreciated.
> 
> 
> 
> --
> 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