gst-launch commands for playing Audio files(.mp3) + Video Files(.mp4) and only video files without audio (.mp4)

Antonio Ospite ao2 at
Fri Nov 2 09:46:22 UTC 2018

On Thu, 1 Nov 2018 03:43:01 -0500 (CDT)
Blesson <blessonfrost at> wrote:

> I want to use gst-launch-1.0 for playing my media files but I am facing some
> issue in that.
> Anyone has any idea or suggestion then plz help me to solve this issue.
> I have 3 types of media files with me - 
>  1. Audio file (.mp3)
>  2. Video files (.mp4) (With Audio + video Data both)
>  3. Video files (.mp4) (Without Audio Data... only Video data)
> When I use the following 3 different commands then I am able to play my
> above-mentioned files but I need a single command or only 2 commands through
> which I can play my above-mentioned files. 

Check out the "playbin" element:

  gst-launch-1.0 playbin uri=<your_media>

Mind that "uri" is different from "location", for instance you'll need
to prepend "file://" to the path of local files.

You can configure many of playbin properties with gst-launch-1.0, see
"gst-inspect-1.0 playbin".

> As per my understanding if any component(i.e.Audio or video data) is missing
> then it gives the error but if the media file has both the component then it
> works fine... 
> so my question is - 
>  1. How can I solve this issue?
>  2. What changes are needed to make all the 3 different files works using
>     single command?
>  3. How can we identify if any component is missing in media files and 
>     avoid this issue?
>  4. how can I check the 'queue' element output which we are using in above 
>     command after demux to identify if any component is missing?
> Any Help or suggestion will be really helpful.

The playbin element does all that internally.

Check also gst-play-1.0 for a quick way to use GStreamer from
the command line.


Antonio Ospite

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

More information about the gstreamer-devel mailing list