RaspberryPi .H264 file to MP4
Tim Müller
tim at centricular.com
Thu Mar 20 14:13:52 PDT 2014
On Thu, 2014-03-20 at 10:52 -0700, Hamo61 wrote:
Hi,
> i wanted to transcode my video from the raspicam in mp4. But i always get an
> error. Is my pipeline wrong or is there another problem?
>
> This is my pipelin:
> gst-launch-1.0 -v filesrc location=testfile.h264 ! h264parse ! decodebin !
> queue ! omxh264enc ! "video/x-h264,framerate=25" ! h264parse ! mp4mux !
> filesink location=test.mp4
>
> Actually i want to save it from the RaspiCam directly in Mp4. My Pipeline
> for that is:
> raspivid -t 0 -h 720 -w 1280 -fps 25 -vf -b 2000000 -n -o - | gst-launch-1.0
> -v fdsrc ! h264parse ! decodebin ! queue ! omxh264enc !
> "video/x-h264,framerate=25" ! h264parse ! mp4mux ! filesink
> location=test.mp4
>
> I would be happy if one of these would work.
>
> Here is the Error-Message:
> pi at raspberrypi ~ $ gst-launch-1.0 -v filesrc location=testfile.h264 !
> h264parse ! decodebin ! queue ! omxh264enc ! "video/x-h264,framerate=25" !
> h264parse ! mp4mux ! filesink location=test.mp4
> Setting pipeline to PAUSED ...
> Pipeline is PREROLLING ...
> (...)
> ERROR: from element
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0:
> Internal data stream error.
> Additional debug info:
> gstomxvideodec.c(1670): gst_omx_video_dec_loop ():
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0:
> stream stopped, reason not-linked
Try with framerate=25/1 or 'framerate=(fraction)25' - if you write
framerate=25 then it will be deserialised to an integer field, which is
not compatible with a fraction field, and then it won't link..
Cheers
-Tim
--
Tim Müller, Centricular Ltd - http://www.centricular.com
More information about the gstreamer-devel
mailing list