You are here

Debug gstreamer plugins

Ivan Radovanovic's picture

To discover which plugin is used for specific file run command similar to this:
gst-launch -v filesrc location=filename_here ! decodebin ! autoaudiosink
that should give you (among other things) output lines similar to these:
...
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = application/x-id3
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstID3Demux:id3demux0.GstPad:sink: caps = application/x-id3
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMpegAudioParse:mpegaudioparse0.GstPad:sink: caps = audio/mpeg, mpegversion=(int)1, layer=(int)3
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstMpegAudioParse:mpegaudioparse0.GstPad:src: caps = audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)3, rate=(int)44100, channels=(int)2, parsed=(boolean)true
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstFluMp3Dec:flump3dec0.GstPad:sink: caps = audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)3, rate=(int)44100, channels=(int)2, parsed=(boolean)true
...

Last line with GstDecodeBin is showing that GstFluMp3Dec is being used to decode file

Using gst-inspect it is possible to get list of installed plugins (you can find one for particular type with something similar to "gst-inspect | grep decoder | grep -i mp3"), and to test how particular plugin works you can force its use instead of automatic detection by using its name instead of decodebin - for example "gst-launch -v filesrc location=path_here ! mad ! autoaudiosink".