Capturing jpegs from an h264 stream

Alex Hewson mock at mocko.org.uk
Tue Jun 4 07:45:46 PDT 2013


On 04/06/2013 14:53, Marc Olzheim wrote:
> 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
I've tested raspivid independently by directing output to a file with 
the bash '>' operator and it works fine.  If you like I can publish an 
example video but it's a perfectly valid h264 video.

The '-vf' switch to raspivid simply flips the video because right now I 
have the camera hanging upside-down :)

> and whether decodebin undersands it, is another one... What is -vf ? 
> -v is auto-disabled when streaming to stdout (-). 
I've tested (I think) the pipeline thus far.  Just tried again:

root at raspberrypi:~/streamtest# raspivid -n -t 1000000 -vf -b 2000000 
-fps 25 -o - |      gst-launch-1.0 fdsrc fd=0 ! decodebin ! fakesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:04.000786725
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

...which looks fine to me.  Unless gstreamer does some optimization when 
you're sending output to a fakesink and doesn't bother to decode it?

Verbose output from gstreamer at http://pastebin.com/CuWrVyub in case 
it's useful.

-- 
Alex Hewson
m: +44 7895 265219 | e: mock at mocko.org.uk | Skype: alex.hewson



More information about the gstreamer-devel mailing list