[FFmpeg-user] Is it possible to add audio without re-encoding?

Lou lou at lrcd.com
Sat Feb 4 02:50:50 CET 2012

On Sat, 4 Feb 2012 02:09:22 +0200
Andrew Gora <master at io.ua> wrote:

> Hi,
> There are 30.000 videos converted to H.264 without audio by mistake.
> Would you please advice, is it possible to take just audio from
> original videos and add to the converted ones without re-encoding?
> BIG thanks in advance,
> Andrew

Yes. This example will take the first video stream from video.mp4 and
the first audio stream from audio.mp4 and mux them into out.mp4 without

    ffmpeg -i video.mp4 -i audio.mp4 -map 0:0 -map 1:1 -c copy out.mp4

You may want to add the "-shortest" option if the durations of the
video and audio inputs vary for some reason. The -map option has seen
some syntax updates lately. See Changelog for more detailed information.

More information about the ffmpeg-user mailing list