Fwd: [gstreamer-1.0] Forcing decodebin to plug in parse element before decoder

Kishore Arepalli kishore.arepalli at gmail.com
Mon Feb 4 05:57:19 PST 2013


Thanks Tim for quick reply.

h264parse is already installed and it works if I manually connects in a
gst-launch pipeline.

$ *gst-launch-1.0.exe filesrc location=test2k25fps.mp4 !  qtdemux !
h264parse ! xinteldec_h264 ! xd3d9exvideosink -v
--gst-debug=*:5,xinteldec_h264:2 2>with_out_decodebin.txt*
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps =
video/x-h264, stream-format=(string)avc, alignment=(string)au,
level=(string)0,
codec_data=(buffer)01276400ffe1002827640028ac2ec0780227e5c044000003000400000300cb8100002b90500002b905ef7be0ed0e189c01000428eebcb0,
width=(int)1920, height=(int)1080, framerate=(fraction)25/1,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps =
video/x-h264, stream-format=(string)byte-stream, alignment=(string)au,
level=(string)0, width=(int)1920, height=(int)1080,
framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1,
parsed=(boolean)true
/GstPipeline:pipeline0/xinteldec_h264:xinteldec_h264-0.GstPad:sink: caps =
video/x-h264, stream-format=(string)byte-stream, alignment=(string)au,
level=(string)0, width=(int)1920, height=(int)1080,
framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1,
parsed=(boolean)true
/GstPipeline:pipeline0/xinteldec_h264:xinteldec_h264-0.GstPad:src: caps =
video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1088,
pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive,
colorimetry=(string)bt709, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstXD3D9ExVideoSink:xd3d9exvideosink0.GstPad:sink:
caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1088,
pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive,
colorimetry=(string)bt709, framerate=(fraction)25/1
/GstPipeline:pipeline0/xinteldec_h264:xinteldec_h264-0.GstPad:src: caps =
video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1088,
pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive,
colorimetry=(string)bt709, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstXD3D9ExVideoSink:xd3d9exvideosink0.GstPad:sink:
caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1088,
pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive,
colorimetry=(string)bt709, framerate=(fraction)25/1
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 1383079000 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

decodebin (verbose log):
$ *gst-launch-1.0.exe filesrc location=test2k25fps.mp4 ! decodebin !
xd3d9exvideosink -v --gst-debug=*:5 2>decodebin.txt*
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src:
caps = video/quicktime, variant=(string)iso
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src:
caps = video/quicktime, variant=(string)iso
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0.GstPad:sink:
caps = video/quicktime, variant=(string)iso
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0.GstPad:sink_0:
caps = video/x-h264, stream-format=(string)avc, alignment=(string)au,
level=(string)0,
codec_data=(buffer)01276400ffe1002827640028ac2ec0780227e5c044000003000400000300cb8100002b90500002b905ef7be0ed0e189c01000428eebcb0,
width=(int)1920, height=(int)1080, framerate=(fraction)25/1,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0.GstPad:sink_0:
caps = video/x-h264, stream-format=(string)avc, alignment=(string)au,
level=(string)0,
codec_data=(buffer)01276400ffe1002827640028ac2ec0780227e5c044000003000400000300cb8100002b90500002b905ef7be0ed0e189c01000428eebcb0,
width=(int)1920, height=(int)1080, framerate=(fraction)25/1,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstH264Parse:h264parse0.GstPad:sink:
caps = video/x-h264, stream-format=(string)avc, alignment=(string)au,
level=(string)0,
codec_data=(buffer)01276400ffe1002827640028ac2ec0780227e5c044000003000400000300cb8100002b90500002b905ef7be0ed0e189c01000428eebcb0,
width=(int)1920, height=(int)1080, framerate=(fraction)25/1,
pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0:
max-size-buffers = 5
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0:
max-size-time = 0
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0:
max-size-bytes = 2097152
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstH264Parse:h264parse0.GstPad:src:
caps = video/x-h264, stream-format=(string)byte-stream,
alignment=(string)au, level=(string)0, width=(int)1920, height=(int)1080,
framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1,
parsed=(boolean)true
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstCapsFilter:capsfilter0.GstPad:src:
caps = video/x-h264, stream-format=(string)byte-stream,
alignment=(string)au, level=(string)0, width=(int)1920, height=(int)1080,
framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1,
parsed=(boolean)true
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/xinteldec_h264:xinteldec_h264-0.GstPad:sink:
caps = video/x-h264, stream-format=(string)byte-stream,
alignment=(string)au, level=(string)0, width=(int)1920, height=(int)1080,
framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1,
parsed=(boolean)true
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstCapsFilter:capsfilter0.GstPad:sink:
caps = video/x-h264, stream-format=(string)byte-stream,
alignment=(string)au, level=(string)0, width=(int)1920, height=(int)1080,
framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1,
parsed=(boolean)true
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstCapsFilter:capsfilter0.GstPad:src:
caps = video/x-h264, stream-format=(string)byte-stream,
alignment=(string)au, level=(string)0, width=(int)1920, height=(int)1080,
framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1,
parsed=(boolean)true
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/xinteldec_h264:xinteldec_h264-0.GstPad:sink:
caps = video/x-h264, stream-format=(string)byte-stream,
alignment=(string)au, level=(string)0, width=(int)1920, height=(int)1080,
framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1,
parsed=(boolean)true
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/xinteldec_h264:xinteldec_h264-0.GstPad:src:
caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1088,
pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive,
colorimetry=(string)bt709, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0:
max-size-buffers = 5
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0:
max-size-time = 0
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMultiQueue:multiqueue0:
max-size-bytes = 2097152
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstDecodePad:src_0: caps =
video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1088,
pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive,
colorimetry=(string)bt709, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstXD3D9ExVideoSink:xd3d9exvideosink0.GstPad:sink:
caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1088,
pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive,
colorimetry=(string)bt709, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstDecodePad:src_0.GstProxyPad:proxypad5:
caps = video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1088,
pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive,
colorimetry=(string)bt709, framerate=(fraction)25/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstCapsFilter:capsfilter0.GstPad:src:
caps = video/x-h264, stream-format=(string)byte-stream,
alignment=(string)au, level=(string)0, width=(int)1920, height=(int)1080,
framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1,
parsed=(boolean)true
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/xinteldec_h264:xinteldec_h264-0.GstPad:sink:
caps = video/x-h264, stream-format=(string)byte-stream,
alignment=(string)au, level=(string)0, width=(int)1920, height=(int)1080,
framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1,
parsed=(boolean)true


Please find the attached log level 5 output (with and without decodebin)

using decodebin:
https://docs.google.com/file/d/0BwxewtoMURnScXZmS0RraEVMTHc/edit?usp=sharing

without decodebin
https://docs.google.com/file/d/0BwxewtoMURnSN0RsVGhJdk5fbUE/edit?usp=sharing

Kishore Arepalli


On Mon, Feb 4, 2013 at 1:56 PM, Tim-Philipp Müller <t.i.m at zen.co.uk> wrote:

> On Mon, 2013-02-04 at 13:16 +0100, Kishore Arepalli wrote:
>
> Hi,
>
> > How to force the decodebin to plug in h264parse before decoder?
> >
> >
> > Decoder caps are:
> >   SINK template: 'sink'
> >     Availability: Always
> >     Capabilities:
> >       video/x-h264
> >           stream-format: byte-stream
> >               alignment: au
> >
> >
> > qtdemux out caps are "video/x-h264, stream-format=avc, alignment: au"
> >
> >
> > Here, "stream-format" needs to converted from "avc" to "byte-stream".
> > So, I need to insert h264parse element in order to feed to correct
> > data to decoder. But decodebin is not inserting h264parse instead
> > directly connects qtdemux to decoder.
> >
> >
> > pipeline:
> > gst-launch-1.0.exe filesrc location=test.mp4 ! decodebin !
> > d3dvideosink
>
> Decodebin should be doing that automatically already. I also don't know
> why it would plug the decoder if its caps are clearly incompatible with
> the output of qtdemux. Do you have h264parse actually installed?
>
> It could be a bug of course, in which case a debug log might be helpful.
>
>  Cheers
>   -Tim
>
>
> _______________________________________________
> 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/20130204/b3ccdbd2/attachment-0001.html>
-------------- next part --------------
Factory Details:
  Rank:         primary (256)
  Long-name:            Intel Media SDK H264 decoder
  Klass:                Codec/Decoder/Video
  Description:          H264 decoder
  Author:               Kishore Arepalli <kishore.arepalli at gmail.com>

Plugin Details:
  Name:                 xinteldec
  Description:          Intel Media SDK Decoder
  Filename:             C:\MinGW\msys\1.0\home\temp\cerbero\dist\windows_x86\lib\gstreamer-1.0\xinteldec.dll
  Version:              0.6
  License:              Proprietary
  Source module:        www.gstreamer.com
  Binary package:       xion
  Origin URL:           http://www.gstreamer.net

GObject
 +----GInitiallyUnowned
       +----GstObject
             +----GstElement
                   +----GstVideoDecoder
                         +----xinteldec_h264

Pad Templates:
  SRC template: 'src'
    Availability: Always
    Capabilities:
      video/x-raw
                 format: { NV12 }
                  width: [ 16, 4096 ]
                 height: [ 16, 4096 ]
              framerate: [ 0/1, 2147483647/1 ]

  SINK template: 'sink'
    Availability: Always
    Capabilities:
      video/x-h264
          stream-format: byte-stream
              alignment: au


Element Flags:
  no flags set

Element Implementation:
  Has change_state() function: gst_video_decoder_change_state

Element has no clocking capabilities.
Element has no indexing capabilities.
Element has no URI handling capabilities.

Pads:
  SINK: 'sink'
    Implementation:
      Has chainfunc(): gst_video_decoder_chain
      Has custom eventfunc(): gst_video_decoder_sink_event
      Has custom queryfunc(): gst_video_decoder_sink_query
      Has custom iterintlinkfunc(): gst_pad_iterate_internal_links_default
    Pad Template: 'sink'
  SRC: 'src'
    Implementation:
      Has custom eventfunc(): gst_video_decoder_src_event
      Has custom queryfunc(): gst_video_decoder_src_query
      Has custom iterintlinkfunc(): gst_pad_iterate_internal_links_default
    Pad Template: 'src'

Element Properties:
  name                : The name of the object
                        flags: readable, writable
                        String. Default: "xinteldec_h264-0"
  parent              : The parent of the object
                        flags: readable, writable
                        Object of type "GstObject"
  accel               : Use hardware acceleration
                        flags: readable, writable
                        Enum "GstMfxImplDec" Default: 1, "sw"
                           (3): auto             - Auto Selection/In or Not Supported/Out
                           (1): sw               - Pure Software Implementation
                           (4): hw               - Hardware Accelerated Implementation
  caps                : Pre initialize the decoder to avoid conflict between hw decoder and d3d(NULL means use caps from upstream element). Setting this property takes a referdece to the supplied GstCaps object.
                        flags: writable
                        Caps (NULL) Write only
-------------- next part --------------
$ gst-inspect-1.0.exe h264parse
Factory Details:
  Rank:         primary + 1 (257)
  Long-name:            H.264 parser
  Klass:                Codec/Parser/Converter/Video
  Description:          Parses H.264 streams
  Author:               Mark Nauwelaerts <mark.nauwelaerts at collabora.co.uk>

Plugin Details:
  Name:                 videoparsersbad
  Description:          videoparsers
  Filename:             C:\MinGW\msys\1.0\home\temp\cerbero\dist\windows_x86\lib\gstreamer-1.0\libgstvideoparsersbad.dll
  Version:              1.0.4
  License:              LGPL
  Source module:        gst-plugins-bad
  Source release date:  2012-12-18
  Binary package:       GStreamer Bad Plugins (GStreamer SDK)
  Origin URL:           http://www.gstreamer.com

GObject
 +----GInitiallyUnowned
       +----GstObject
             +----GstElement
                   +----GstBaseParse
                         +----GstH264Parse

Pad Templates:
  SRC template: 'src'
    Availability: Always
    Capabilities:
      video/x-h264
                 parsed: true
          stream-format: { avc, byte-stream }
              alignment: { au, nal }

  SINK template: 'sink'
    Availability: Always
    Capabilities:
      video/x-h264


Element Flags:
  no flags set

Element Implementation:
  Has change_state() function: gst_base_parse_change_state

Element has no clocking capabilities.
Indexing capabilities:
  element can do indexing
Element has no URI handling capabilities.

Pads:
  SINK: 'sink'
    Implementation:
      Has chainfunc(): gst_base_parse_chain
      Has custom eventfunc(): gst_base_parse_sink_event
      Has custom queryfunc(): gst_base_parse_sink_query
      Has custom iterintlinkfunc(): gst_pad_iterate_internal_links_default
    Pad Template: 'sink'
  SRC: 'src'
    Implementation:
      Has custom eventfunc(): gst_base_parse_src_event
      Has custom queryfunc(): gst_base_parse_src_query
      Has custom iterintlinkfunc(): gst_pad_iterate_internal_links_default
    Pad Template: 'src'

Element Properties:
  name                : The name of the object
                        flags: readable, writable
                        String. Default: "h264parse0"
  parent              : The parent of the object
                        flags: readable, writable
                        Object of type "GstObject"
  config-interval     : Send SPS and PPS Insertion Interval in seconds (sprop parameter sets will be multiplexed in the data stream when detected.) (0 = disabled)
                        flags: readable, writable
                        Unsigned Integer. Range: 0 - 3600 Default: 0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gst-launch.PAUSED_PLAYING_without_decodebin.dot
Type: application/octet-stream
Size: 3939 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130204/b3ccdbd2/attachment-0001.obj>


More information about the gstreamer-devel mailing list