[gst-devel] Playing h264 files with playbin fails miserably
aki.suihkonen at symbio.com
Mon Aug 30 14:46:30 CEST 2010
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.
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 =
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0: uri =
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0: buffer-duration = -1
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0: buffer-size = -1
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0: source =
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.
More information about the gstreamer-devel