Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 591
Ricardo Avatar asked Feb 17 '17 11:02

Ricardo


People also ask

What is Qtdemux?

qtdemux — Demultiplex a QuickTime file into audio and video streams.

What is queue in GStreamer?

The queue creates a new thread on the source pad to decouple the processing on sink and source pad. The default queue size limits are 200 buffers, 10 MB of data, or one second worth of data, whichever is reached first. Sample pipeline with queue element: gst-launch-1.0 filesrc location="/media/card/input-file.mp4" !


1 Answers

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.

like image 105
jgorostegui Avatar answered Sep 28 '22 00:09

jgorostegui