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

Blesson blessonfrost at gmail.com
Thu Nov 1 08:43:01 UTC 2018


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. 


1)To Play Audio files (.mp3) I am using following cmd  

 gst-launch-1.0 filesrc location=/media/Storage/audio_stream_pipe !
decodebin ! audioconvert ! audiotrack audio-name=Testplayer &

2)To Play video files (.mp4) (with Audio + Video Data) i am using following
cmd

gst-launch-1.0 filesrc location=/media/Storage/video_stream_pipe ! decodebin
name=dec ! audioconvert ! audiotrack audio-name=Testplayer dec. !
videoconvert ! autovideosink & 

3) To Play video files (.mp4) (without Audio Data) I am using following cmd

gst-launch-1.0 filesrc location=/media/Storage/video_stream_pipe ! decodebin
! videoconvert ! autovideosink &

With above 3 different commands, I am able to play my files but I need
single command hence I tried below command using demux. 

gst-launch-1.0 filesrc location=/media/Storage/video_stream_pipe ! qtdemux
name=demuxer demuxer. ! queue ! decodebin ! videoconvert ! autovideosink
demuxer. ! queue ! decodebin ! audioconvert ! audiotrack
audio-name=Testplayer &

In above command when I give any .mp4 files with Audio + Video Data then it
works fine but when I give any .mp3 file which has no video data or any .mp4
files which has no audio data then it gives error - 

"
ERROR: from element /GstPipeline:pipeline0/GstQTDemux:demuxer: This file
contains no playable streams.
Additional debug info:
qtdemux.c(653): gst_qtdemux_post_no_playable_stream_error ():
/GstPipeline:pipeline0/GstQTDemux:demuxer:
no known streams found
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
"


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.

Thanks,
Blesson

 



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list