Capturing jpegs from an h264 stream
Alex Hewson
mock at mocko.org.uk
Sun Jun 9 03:55:30 PDT 2013
Hi All,
Sadly I still can't persuade this to work.
> This works fine for me (with 1.0.x at least, there seems to be a bit of
> an issue with this in git master / 1.1.x though):
>
> cat /home/tpm/rpi/hello_pi/hello_video/test.h264 | gst-launch-1.0
> fdsrc ! video/x-h264,framerate=25/1,stream-format=byte-stream !
> h264parse ! avdec_h264 ! videorate ! video/x-raw,framerate=1/1 !
> videoconvert ! jpegenc ! multifilesink location=/tmp/img_%04d.jpg
raspivid -n -t 1000000 -vf -b 2000000 -fps 25 -o - | \
gst-launch-1.0 fdsrc fd=0 !
video/x-h264,framerate=25/1,stream-format=byte-stream ! \
h264parse ! avdec_h264 ! videorate ! video/x-raw,framerate=1/1 ! \
videoconvert ! jpegenc ! multifilesink location=img_%04d.jpg
root at raspberrypi:~/streamtest# ./l2.sh
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
(gst-launch-1.0:9628): GStreamer-WARNING **:
gstpad.c:4503:store_sticky_event:<capsfilter0:src> Sticky event
misordering, got 'segment' before 'caps'
(gst-launch-1.0:9628): GStreamer-WARNING **:
gstpad.c:4503:store_sticky_event:<h264parse0:sink> Sticky event
misordering, got 'segment' before 'caps'
Redistribute latency...
[sticks here forever - perhaps because I'm not using hardware decoding
so not enough CPU cycles?]
Trying again with decodebin, which should use OpenMax hardware decoding
raspivid -n -t 1000000 -vf -b 2000000 -fps 25 -o - | \
gst-launch-1.0 fdsrc fd=0 !
video/x-h264,framerate=25/1,stream-format=byte-stream ! \
decodebin ! videorate ! video/x-raw,framerate=1/1 ! \
videoconvert ! jpegenc ! multifilesink location=img_%04d.jpg
root at raspberrypi:~/streamtest# ./l2.sh
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
(gst-launch-1.0:9641): GStreamer-WARNING **:
gstpad.c:4503:store_sticky_event:<capsfilter0:src> Sticky event
misordering, got 'segment' before 'caps'
(gst-launch-1.0:9641): GStreamer-WARNING **:
gstpad.c:4503:store_sticky_event:<sink:proxypad0> Sticky event
misordering, got 'segment' before 'caps'
(gst-launch-1.0:9641): GStreamer-WARNING **:
gstpad.c:4503:store_sticky_event:<typefind:src> Sticky event
misordering, got 'caps' before 'stream-start'
(gst-launch-1.0:9641): GStreamer-WARNING **:
gstpad.c:4503:store_sticky_event:<typefind:sink> Sticky event
misordering, got 'segment' before 'caps'
(gst-launch-1.0:9641): GStreamer-WARNING **:
gstpad.c:4503:store_sticky_event:<decodebin0:sink> Sticky event
misordering, got 'segment' before 'caps'
[sticks in prerolling forever]
I've also tried using the test.h264 video that comes in the RPI's
distribution - /opt/vc/src/hello_pi/hello_video/test.h264. Same result.
Given what Nicola said could there be a bug in gstreamer 1.0 when using
the omx plugin?
--
Alex Hewson
m: +44 7895 265219 | e: mock at mocko.org.uk | Skype: alex.hewson
More information about the gstreamer-devel
mailing list