Capturing jpegs from an h264 stream

Marc Olzheim marc at your.tv
Tue Jun 4 06:53:02 PDT 2013


On Tue, Jun 04, 2013 at 06:32:19AM -0700, Wes Miller wrote:
> Ummm....  I haven't (can't) try this as I have no Raspberry Pi, but does this
> actually work?
> 
>     raspivid -n -t 1000000 -vf -b 2000000 -fps 25 -o - |  \
>     gst-launch-1.0 fdsrc fd=0 ! decodebin ! videorate !
>     video/x-raw,framerate=1/1 ! jpegenc ! multifilesink
> location=img_%03d.jpeg 
> 
> First, you're mssing a \ on line 2 (or it got lost in the posting).
> 
> This is a Linux pipeline married to a gst pipeline.  Does gst_launch accept
> piped input?  Are you actually producing piped input? Should the Linux pipe
> char (|) perhaps be && to launch both these commands at the same time and
> (hope, hope, hope) get gst lunch to read from stdin (fd = 0) synchronously?  

fd = 0 is stdin, which is exactly what is fed to a program when reading
from a pipe.
This is similar to if I replace the tcpclientsrc in my previous
commandly by netcat and fdsrc, which I tested and works fine here.

The question whether "raspivid -n -t 1000000 -vf -b 2000000 -fps 25 -o -"
actually produces output or not and whether decodebin undersands it, is
another one... What is -vf ? -v is auto-disabled when streaming to
stdout (-).

Marc


More information about the gstreamer-devel mailing list