Combining an image with an audio stream

Flavian Hautbois flavian at trax-air.com
Thu Aug 20 04:53:10 PDT 2015


Hello,

I have been trying to piece together an image and an audio file but I am
struggling with one of the last steps. Here is my pipeline (gst 0.10):

gst-launch -e mp4mux name="muxer" faststart=true ! filesink
location=video.mp4\
    filesrc location="cover.jpg" ! decodebin2 ! ffmpegcolorspace !
videoscale ! video/x-raw-yuv,width=1080,height=1080 ! ffmpegcolorspace !
imagefreeze ! ffmpegcolorspace ! x264enc bframes=2 profile=high pass=pass1
! muxer. \
    filesrc location="audio.mp3" ! decodebin2 ! audioconvert ! voaacenc
bitrate=384000 ! muxer.

When I launch this, not much happens: video.mp4 is creaded but stays empty.
I have tested the audio and video sub-pipelines successfully with
autovideosink and autoaudiosink. I suspect that because the stream of
images is infinite, the fact that the audio stops does not result in a
global EOS. I tried to change the output file to an ogg container, and this
time data was being written, but the resulting video lasted much longer
than the audio (which was padded on the right with silence).

Is there a way to fix this and stop the video right at the moment the music
stops?

Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150820/40f07053/attachment.html>


More information about the gstreamer-devel mailing list