Good Day,
I am trying to get gst-launch (gstreamer) to get the input from stdout. Most of the examples on the net are about either reading from file or reading from device. Does anyone know an example pipeline?
filesrc location="lowframe.h264"
or
device=/dev/video0
Is there one that would read from stdout?
There's a GStreamer element called fdsrc
that allows you to read from (already open) file descriptors.stdin
is basically fd 0
(on POSIX systems like Linux/Mac; see Wikipedia), so you can simply use something like the following launch line:
curl http://example.com:8000/stream1.ogg ! gst-launch fdsrc fd=0 ! decodebin ! autoaudiosink
Another way would be to use filesrc
and read from /dev/stdin
on systems that support it, e.g.:
gst-launch filesrc location=/dev/stdin ! decodebin ! autoaudiosink < /path/to/file.mp3
/edit found out about the fdsrc
method (which seems to be the better solution to this problem)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With