[gst-devel] Playing h264 files with playbin fails miserably

Edward Hervey edward.hervey at collabora.co.uk
Tue Aug 31 10:32:09 CEST 2010


On Mon, 2010-08-30 at 15:46 +0300, Aki Suihkonen wrote:
> Hi,
> 
> I've experienced some problems trying to play some (any) h264
> video streams using playbin. The codec I'm using is a
> h264dec, which requires a parser plugin h264parse
> to precede it in a valid pipeline.

  Warning preamble : Unless you provide the sourcecode of that element,
we won't be of much help.

> 
> The video plays nicely with an explicit pipeline:
> gst-launch filesrc location=foo.264 ! h264parse ! h264dec ! autovideosink,
> 
> however it hangs completely with the intended command of
> gst-launch playbin uri=file:///home/maemo/foo.264
> 
> /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0: connection-speed = 0
> /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0: download = FALSE
> /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0: subtitle-encoding =
> NULL
> /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0: uri =
> "file:///home/maemo/Downloads/11Video.264"
> /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0: buffer-duration = -1
> /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0: buffer-size = -1
> /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0: source =
> (GstFileSrc) source
> /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20/GstTypeFindElement:typefind.GstPad:src:
> caps = video/x-h264
> 
> 
> Now, what I've concluded is that unlike for example
> in oggdemux -> vorbis/theora pipeline, the source and sink caps
> of the h264parse are equal (video/x-h264), resulting in an
> infinite loop (from gdb output:)
> 
> gst_object_check_uniqueness (list=0xb5bdfb0, name=0xb81b9d0
> "h264parse4874") at gstobject.c:950
> (and after a couple of trials the breakpoint shows "h264parse7102")
> 
> I've tried to solve the problem by changing the output caps
> of h264parse to 'video/x-n264' (one letter diff) along with
> the input caps of h264dec, but this only results in a claim
> of 'no valid decoder for video/x-h264'
> 
> With h264dec having RANK_PRIMARY and h264parse having RANK_SECONDARY,
> the file seems to be fed directly to the decoder giving awfully
> lot of warnings and the crashin because of null pointer. (it's GIGO)
> 
> So, the question is, what kind of steps are required
> to force/suggest playbin to include both the parser and the decoder
> plugins for a valid pipeline?
> 
> The solution (for N900 / QT mediaplayer does not at this moment
> support fully manual pipelines).
> 
> Any help would be greatly appreciated.

* Make sure h264parse has different pad template caps (i.e. check
mp3parse, it has a parsed=True/False
* Add parsed=True on your decoder sinkpad
* You *might* also need to have h264parse's rank higher than the decoder
(so that it is plugged before the decoder)

  Another line of thought (but I'll let the people who've hacked on h264
in gst answer that) is to use the new h264 caps stream-format properties
which specifies how the data is laid out.

   Edward

> 
> Best Regards,
> Aki Suihkonen
> Symbio.com
> 
> 
> ------------------------------------------------------------------------------
> Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
> Be part of this innovative community and reach millions of netbook users 
> worldwide. Take advantage of special opportunities to increase revenue and 
> speed time-to-market. Join now, and jumpstart your future.
> http://p.sf.net/sfu/intel-atom-d2d
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

-- 
Edward Hervey  --  Collabora Multimedia
Lead Platforms Engineer      Co-Founder






More information about the gstreamer-devel mailing list