gstreamerdecodegst-launch

Which elements are contained in decodebin?


I'm looking to decode and demux an mp4 file with gst-launch-1.0. Instead of using a bin - decodebin - I'd rather work with the seperate elements. Unfortunately, I did not find this.

My question is simple: what basic elements are contained in the decodebin?

If you can direct me to a place where I can find the composition of other bins or autopluggers that whould also be nice.


Solution

  • The decodebin will use all available elements in your gstreamer installation. Remember that you can launch the pipeline with decodebin and using verbose -v and guess what elements is the decodebin creating. For example, in the next pipeline that plays succesfully a mp4 file (video and audio):

    gst-launch-1.0 -v filesrc location=/home/usuario/GST_/BigBuckBunny_320x180.mp4 ! queue ! qtdemux name=demuxer demuxer.video_0 ! queue ! decodebin ! videoconvert ! autovideosink demuxer.audio_0 ! queue ! decodebin ! audioconvert ! autoaudiosink
    

    Watching the output I can conclude that the resulting pipeline is:

    gst-launch-1.0 -v filesrc location=/home/usuario/GST_/BigBuckBunny_320x180.mp4 ! queue ! qtdemux name=demuxer demuxer.video_0 ! queue ! h264parse ! avdec_h264 ! videoconvert ! autovideosink demuxer.audio_0 ! queue ! aacparse ! avdec_aac ! audioconvert ! autoaudiosink
    

    The playback components from gstreamer are available here. The playbin element will give you the full pipeline (video, audio, etc...) from the uri input.

    For example, if you even don't know what kind of source you have, you can use playbin element:

    gst-launch-1.0 playbin uri=file:///home/usuario/GST_/BigBuckBunny_320x180.mp4 -v
    

    This will play automatically the file (if it is possible), and verbose output will show you the used plugins and status information.