Adding an silent audio track if necessary
sebasgre
greco.sebastian at gmail.com
Fri Aug 31 09:57:28 UTC 2018
Hello,
I'm trying to achieve a single gst-launch command to convert any video file
into a webm (vp8/opus) file.
I came up with a pipeline that seemed to work just fine till some user
uploaded a video file that didn't have an audio track.
So I started to look of how to improve my pipeline, but I haven't been able
to.
One of my requirements is to rescale the video to HD, so in my example
pipeline you will be also seeing that.
So my idea was to add a silent audio track and mixit with the current file,
so if the didn't have any, at least the pipeline was going to have something
and it will not be blocked.
The thing is, I added a *audiotestsrc wave=silent*, but as you might imagine
the problem is, the src keep putting data into the pipeline and it never
ends.
Current pipeline:
/filesrc location="no_audio_video.m4v" ! decodebin name=demux ! videoconvert
! videoscale ! video/x-raw,width=1280,height=720,pixel-aspect-ratio=1/1 !
queue ! vp8enc ! queue ! webmmux name=mux ! filesink
location="output_file.webm" demux. ! audiomixer name=amx ! queue !
audioconvert ! audioresample ! opusenc ! queue ! mux. audiotestsrc
wave=silence ! amx./
So my question are:
1. Is this the right approach? If it does... how I can make the audiotestsrc
stop when the video file ends?
2. Maybe there is an entirely different/simpler way to do this that I'm
missing?
Sorry about the messy pipeline, I'm pretty new with gstreamer.
Thanks much for your time.
Cheers!
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
More information about the gstreamer-devel
mailing list