Help with transcoding h264 encoded TS on raspberry pi
Stefan Simon
stefansimon8 at gmail.com
Fri Dec 13 04:17:48 PST 2013
Hi Tim,
thanks for a fast response. Looks like as far as I don't include omxh264dec
in the pipeline, I don't get an error. I'm not sure how to read this
correctly, but itmight have something to do with alignment nal/au
root at raspberrypi:/mnt/tmp/tmp# gst-launch-1.0 filesrc -v
location="/mnt/tmp/movie/20121107 0402 - HBO HD - Hanna.ts" ! tsdemux !
fakesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps = audio/x-ac3
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
^CCaught interrupt -- handling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 36844059060 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
root at raspberrypi:/mnt/tmp/tmp# gst-launch-1.0 filesrc -v
location="/mnt/tmp/movie/20121107 0402 - HBO HD - Hanna.ts" ! tsdemux !
h264parse ! fakesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps =
video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal,
parsed=(boolean)true
/GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps =
video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal,
parsed=(boolean)true
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps =
video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
^CCaught interrupt -- handling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 15460289179 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
root at raspberrypi:/mnt/tmp/tmp# gst-launch-1.0 filesrc -v
location="/mnt/tmp/movie/20121107 0402 - HBO HD - Hanna.ts" ! tsdemux !
h264parse ! omxh264dec ! fakesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps =
video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps =
video/x-h264, stream-format=(string)byte-stream, alignment=(string)au,
parsed=(boolean)true
ERROR: from element /GstPipeline:pipeline0/GstTSDemux:tsdemux0: Internal
data stream error.
Additional debug info:
mpegtsbase.c(1620): mpegts_base_loop ():
/GstPipeline:pipeline0/GstTSDemux:tsdemux0:
stream stopped, reason not-negotiated
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
I have a desktop linux system at hand, but I may be missing some plugins.
On the other hand, I launched it on raspberry pi, and got the same result
root at raspberrypi:/mnt/tmp/tmp# gst-discoverer-1.0 "/mnt/tmp/movie/20121107
0402 - HBO HD - Hanna.ts"
Analyzing
file:///mnt/tmp/movie/20121107%200402%20-%20HBO%20HD%20-%20Hanna.ts
Done discovering
file:///mnt/tmp/movie/20121107%200402%20-%20HBO%20HD%20-%20Hanna.ts
Missing plugins
Topology:
container: MPEG-2 Transport Stream
audio: AC-3 (ATSC A/52)
video: H.264
video: H.264
audio: AC-3 (ATSC A/52)
Properties:
Duration: 2:12:59.447745333
Seekable: yes
Tags:
language code: cs
bitrate: 384000
I hope you'll be able to see something that rings a bell.
Thanks,
Stefan
On Fri, Dec 13, 2013 at 11:40 AM, Tim Müller <tim at centricular.com> wrote:
> On Fri, 2013-12-13 at 11:31 +0100, Stefan Simon wrote:
>
> Hi Stefan,
>
> > gst-launch-1.0 filesrc location=<file.ts> ! tsdemux ! h264parse !
> > omxh264dec ! omxh264enc ! filesink location=test.h264
> >
> > this is as primitive as can get I suppose. Taking into account my
> > non-existent experience with GSTreamer, this pipeline would make
> > sense. Demux, parse, decode, encode, dump to a file. What I get is
>
> Yeah, this looks like it should work in principle (assuming the encoder
> outputs H.264 in byte-stream format).
>
> > mpegtsbase.c(1620): mpegts_base_loop
> > (): /GstPipeline:pipeline0/GstTSDemux:tsdemux0:
> > stream stopped, reason not-negotiated
>
> This indicates some caps negotiation issue.
>
> > Any pointers to what I'm doing wrong? I also tried decodebin to
> > construct the decoding pipeline for me, but it fails saying I don't
> > have a h264 decoder..
>
> Maybe first try these, and pass -v to gst-launch-1.0 so we can see the
> caps:
>
> gst-launch-1.0 -v filesrc location=<file.ts> ! tsdemux ! fakesink
>
> gst-launch-1.0 -v filesrc location=<file.ts> ! tsdemux ! h264parse !
> fakesink
>
> gst-launch-1.0 -v filesrc location=<file.ts> ! tsdemux ! h264parse !
> omxh264dec ! fakesink
>
> If you have a desktop linux system at hand, maybe also run
> gst-discoverer-{1.0,0.10} -v file.ts there and show us what it says.
>
> Cheers
> -Tim
>
> --
> Tim Müller, Centricular Ltd - http://www.centricular.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/20131213/dfa8fb39/attachment.html>
More information about the gstreamer-devel
mailing list