Linux: Mux Audio and Video

When there is a need to mux audio and video tracks into an audio-video track, use the following script to take it forward.

ffmpeg

Using a ffmpeg free software:

#!/bin/bash
sourceVideo="video.avi"
sourceAudio="music.mp3"
result="output.avi"
ffmpeg -i "$sourceVideo" -i "$sourceAudio" -vcodec copy -acodec copy "$result"
Advertisements
This entry was posted in Audio/Video, Linux and tagged , . Bookmark the permalink.