RaspberryPi .H264 file to MP4

Markus Fritsche fritsche.markus at gmail.com
Fri Mar 21 05:49:01 PDT 2014


Hello Hamza,

looking at it - your pipeline already says that the input file has a
framerate of 0/1 - is the test file correct? Is it useable in vlc or
similar?

Kind regards,
  Markus


2014-03-20 22:37 GMT+01:00 Hamo61 <hamza_the_one at hotmail.de>:

> Thx for the reply.
> But it didnt help. Another idea?
>
> My Pipelines:
> gst-launch-1.0 -v filesrc location=test.h264  ! h264parse ! decodebin !
> queue ! omxh264enc !  "video/x-h264,framerate=25" ! h264parse ! mp4mux !
> filesink location=test.mp4
>
> or
> gst-launch-1.0 -v filesrc location=test.h264  ! h264parse ! decodebin !
> queue ! omxh264enc !  "video/x-h264,framerate=25/1" ! h264parse ! mp4mux !
> filesink location=test.mp4
>
> or
> gst-launch-1.0 -v filesrc location=test.h264  ! h264parse ! decodebin !
> queue ! omxh264enc !  "video/x-h264,framerate=(fraction)25/1" ! h264parse !
> mp4mux ! filesink location=test.mp4
>
>
>
> pi at raspberrypi ~ $ gst-launch-1.0 -v filesrc location=test.h264  !
> h264parse ! decodebin ! queue ! omxh264enc !  "video/x-h264,framerate=25/1"
> ! h264parse ! mp4mux ! filesink location=test.mp4
> Setting pipeline to PAUSED ...
> Pipeline is PREROLLING ...
> /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps =
> video/x-h264, width=(int)1280, height=(int)720, parsed=(boolean)true,
> stream-format=(string)avc, alignment=(string)au,
> codec_data=(buffer)01640028ffe1000e27640028ac2b402802dd00f1226a01000528ee025cb0
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink.GstProxyPad:proxypad0:
> caps = video/x-h264, width=(int)1280, height=(int)720,
> parsed=(boolean)true, stream-format=(string)avc, alignment=(string)au,
> codec_data=(buffer)01640028ffe1000e27640028ac2b402802dd00f1226a01000528ee025cb0
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src:
> caps = video/x-h264, width=(int)1280, height=(int)720,
> parsed=(boolean)true, stream-format=(string)avc, alignment=(string)au,
> codec_data=(buffer)01640028ffe1000e27640028ac2b402802dd00f1226a01000528ee025cb0
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src:
> caps = video/x-h264, width=(int)1280, height=(int)720,
> parsed=(boolean)true, stream-format=(string)avc, alignment=(string)au,
> codec_data=(buffer)01640028ffe1000e27640028ac2b402802dd00f1226a01000528ee025cb0
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstH264Parse:h264parse2.GstPad:sink:
> caps = video/x-h264, width=(int)1280, height=(int)720,
> parsed=(boolean)true, stream-format=(string)avc, alignment=(string)au,
> codec_data=(buffer)01640028ffe1000e27640028ac2b402802dd00f1226a01000528ee025cb0
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:sink:
> caps = video/x-h264, width=(int)1280, height=(int)720,
> parsed=(boolean)true, stream-format=(string)avc, alignment=(string)au,
> codec_data=(buffer)01640028ffe1000e27640028ac2b402802dd00f1226a01000528ee025cb0
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink: caps =
> video/x-h264, width=(int)1280, height=(int)720, parsed=(boolean)true,
> stream-format=(string)avc, alignment=(string)au,
> codec_data=(buffer)01640028ffe1000e27640028ac2b402802dd00f1226a01000528ee025cb0
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstH264Parse:h264parse2.GstPad:src:
> caps = video/x-h264, width=(int)1280, height=(int)720,
> parsed=(boolean)true, stream-format=(string)byte-stream,
> alignment=(string)au
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstCapsFilter:capsfilter1.GstPad:src:
> caps = video/x-h264, width=(int)1280, height=(int)720,
> parsed=(boolean)true, stream-format=(string)byte-stream,
> alignment=(string)au
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0.GstPad:sink:
> caps = video/x-h264, width=(int)1280, height=(int)720,
> parsed=(boolean)true, stream-format=(string)byte-stream,
> alignment=(string)au
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstCapsFilter:capsfilter1.GstPad:sink:
> caps = video/x-h264, width=(int)1280, height=(int)720,
> parsed=(boolean)true, stream-format=(string)byte-stream,
> alignment=(string)au
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstCapsFilter:capsfilter1.GstPad:src:
> caps = video/x-h264, width=(int)1280, height=(int)720,
> parsed=(boolean)true, stream-format=(string)byte-stream,
> alignment=(string)au
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0.GstPad:sink:
> caps = video/x-h264, width=(int)1280, height=(int)720,
> parsed=(boolean)true, stream-format=(string)byte-stream,
> alignment=(string)au
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0.GstPad:src:
> caps = video/x-raw, format=(string)I420, width=(int)1280, height=(int)720,
> pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive,
> colorimetry=(string)bt709, framerate=(fraction)0/1
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstDecodePad:src_0: caps =
> video/x-raw, format=(string)I420, width=(int)1280, height=(int)720,
> pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive,
> colorimetry=(string)bt709, framerate=(fraction)0/1
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstDecodePad:src_0.GstProxyPad:proxypad4:
> caps = video/x-raw, format=(string)I420, width=(int)1280, height=(int)720,
> pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive,
> colorimetry=(string)bt709, framerate=(fraction)0/1
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0.GstPad:src:
> caps = video/x-raw, format=(string)I420, width=(int)1280, height=(int)720,
> pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive,
> colorimetry=(string)bt709, framerate=(fraction)0/1
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstDecodePad:src_0: caps =
> video/x-raw, format=(string)I420, width=(int)1280, height=(int)720,
> pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive,
> colorimetry=(string)bt709, framerate=(fraction)0/1
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstDecodePad:src_0.GstProxyPad:proxypad4:
> caps = video/x-raw, format=(string)I420, width=(int)1280, height=(int)720,
> pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive,
> colorimetry=(string)bt709, framerate=(fraction)0/1
> 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
> ERROR: pipeline doesn't want to preroll.
> Setting pipeline to NULL ...
> Freeing pipeline ...
>
>
> ------------------------------
> Date: Thu, 20 Mar 2014 14:15:01 -0700
> From: [hidden email]<http://user/SendEmail.jtp?type=node&node=4666046&i=0>
> To: [hidden email] <http://user/SendEmail.jtp?type=node&node=4666046&i=1>
> Subject: Re: RaspberryPi .H264 file to MP4
>
>
> 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
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email] <http:///user/SendEmail.jtp?type=node&node=4666045&i=0>
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://gstreamer-devel.966125.n4.nabble.com/RaspberryPi-H264-file-to-MP4-tp4666043p4666045.html
>  To unsubscribe from RaspberryPi .H264 file to MP4, click here.
> NAML<http://gstreamer-devel.966125.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble:email.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble:email.naml-instant_emails%21nabble:email.naml-send_instant_email%21nabble:email.naml>
>
> ------------------------------
> View this message in context: RE: RaspberryPi .H264 file to MP4<http://gstreamer-devel.966125.n4.nabble.com/RaspberryPi-H264-file-to-MP4-tp4666043p4666046.html>
>
> Sent from the GStreamer-devel mailing list archive<http://gstreamer-devel.966125.n4.nabble.com/>at Nabble.com.
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140321/e60480fa/attachment-0001.html>


More information about the gstreamer-devel mailing list