Capturing jpegs from an h264 stream
Nicolas Dufresne
nicolas.dufresne at collabora.com
Tue Jun 4 08:05:35 PDT 2013
Le mardi 04 juin 2013 à 15:37 +0100, Alex Hewson a écrit :
> On 04/06/2013 14:32, 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
> >
This pipeline should work if the source can be streamed. What's the
transport being used by raspivid ? As a reference, I took you pipeline
and I made it work this way:
gst-launch-1.0 videotestsrc ! x264enc tune=zero-latency byte-stream=1 ! mpegtsmux ! fdsink fd=1 | \
gst-launch-1.0 -e fdsrc fd=0 ! decodebin ! jpegenc ! multifilesink location=img_%03d.jpeg
In this example I use MPEG Transport Stream. I also got it to work with
avimux, but not with qtmux as it's not streamable format (not without
configuration). In the case there is no transport (H264 byte-stream), I
could make it work using h264element, or simply setting caps after the
fdsrc:
gst-launch-1.0 videotestsrc ! x264enc tune=zero-latency byte-stream=1 ! fdsink fd=1 | \
gst-launch-1.0 -e fdsrc fd=0 ! h264parse ! decodebin ! jpegenc ! multifilesink location=img_%03d.jpeg
cheers,
Nicolas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130604/fe47fd9e/attachment.html>
More information about the gstreamer-devel
mailing list