I used a command like:
ffmpeg -i video.avi -i audio.mp3 -vcodec codec -acodec codec output_video.avi -newaudio
in latest version for adding new audio track to video (not mix).
But I updated the ffmpeg to the newest version (ffmpeg version git-2012-06-16-809d71d) and now in this version the parameter -newaudio doesn’t work.
Tell me please how I can add new audio to my video (not mix) using ffmpeg.
Replace audio
-mapoption allows you to manually select streams / tracks. See FFmpeg Wiki: Map for more info.-c:v copyto stream copy (mux) the video. No re-encoding of the video occurs. Quality is preserved and the process is fast.-c:v copyto-c copyto stream copy both the video and audio.-c:v copy/-c copy.-shortestoption will make the output the same duration as the shortest input.Add audio
-mapoption allows you to manually select streams / tracks. See FFmpeg Wiki: Map for more info.-c:v copyto stream copy (mux) the video. No re-encoding of the video occurs. Quality is preserved and the process is fast.-c:v copyto-c copyto stream copy both the video and audio.-c:v copy/-c copy.-shortestoption will make the output the same duration as the shortest input.Mixing/combining two audio inputs into one
Use video from
video.mkv. Mix audio fromvideo.mkvandaudio.m4ausing the amerge filter:See FFmpeg Wiki: Audio Channels for more info.
Generate silent audio
You can use the anullsrc filter to make a silent audio stream. The filter allows you to choose the desired channel layout (mono, stereo, 5.1, etc) and the sample rate.
Also see