Video to stdout

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Video to stdout

lec1
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.

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
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Video to stdout

Nicolas Dufresne-5
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
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Video to stdout

lec1
Thanks for your reply Le vendredi. I am sorry I had not been able to reply
sooner.
The pipeline example you provided worked when using it at the command prompt
but does not seem to work when embedding the first part of it on the Node.js
application.

Since my source is an RTSP uri, I modified your example from the provided
pipeline (namely:
> gst-launch-1.0 -q videotestsrc !
> video/x-raw,format=YUY2,width=640,height=480 ! fdsink

to
gst-launch-1.0 -q uridecodebin uri=rtsp://192.168.1.x:8822/test.stm ! fdsink
and here I agree with you that at the end of the pipleline there is a
continuous blob, however if I expand this to:
gst-launch-1.0 -q uridecodebin uri=rtsp://192.168.1.x:8822/test.stm !
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
The pipeline seems to stall.

The video server pipeline is similar to:
 
gst-launch-1.0 videotestsrc !
video/x-raw,width=640,height=480,framerate=30/1 ! timeoverlay
font-desc="calibri 75px" valignment=top halignment=center ! textoverlay
valignment=center halignment=center text="This is a test screen "
font-desc="calibri 75px" ! x264enc tune=zerolatency ! rtph264pay pt=96
name=pay0 config-interval=1 ...

Thanks.




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Video to stdout

Nicolas Dufresne-5
Le mercredi 08 mai 2019 à 08:46 -0500, lec1 a écrit :

> Thanks for your reply Le vendredi. I am sorry I had not been able to reply
> sooner.
> The pipeline example you provided worked when using it at the command prompt
> but does not seem to work when embedding the first part of it on the Node.js
> application.
>
> Since my source is an RTSP uri, I modified your example from the provided
> pipeline (namely:
> > gst-launch-1.0 -q videotestsrc !
> > video/x-raw,format=YUY2,width=640,height=480 ! fdsink
>
> to
> gst-launch-1.0 -q uridecodebin uri=rtsp://192.168.1.x:8822/test.stm ! fdsink
> and here I agree with you that at the end of the pipleline there is a
> continuous blob, however if I expand this to:
> gst-launch-1.0 -q uridecodebin uri=rtsp://192.168.1.x:8822/test.stm !
> 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
> The pipeline seems to stall.
Make sure to test your pipeline with fakesink first (and GST_DEBUG=2),
you cannot see that warnings or the error in this mode. Here's a
reference using public URI that I know works:

gst-launch-1.0 -q  uridecodebin caps=video/x-raw uri=rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov ! fdsink | gst-launch-1.0 fdsrc ! rawvideoparse format=nv12 width=240 height=160 ! videoconvert ! autovideosink sync=0

>
> The video server pipeline is similar to:
>  
> gst-launch-1.0 videotestsrc !
> video/x-raw,width=640,height=480,framerate=30/1 ! timeoverlay
> font-desc="calibri 75px" valignment=top halignment=center ! textoverlay
> valignment=center halignment=center text="This is a test screen "
> font-desc="calibri 75px" ! x264enc tune=zerolatency ! rtph264pay pt=96
> name=pay0 config-interval=1 ...
>
> Thanks.
>
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (201 bytes) Download Attachment