Pages

Sunday 3 March 2013

Add Audio to a Video in Linux Ubuntu - Audio and Video Mixing In Ubuntu


Audio can be mixed to a video using a simple command in terminal as given below.

mencoder video_name -o video_final.flv -ovc copy -oac copy -audiofile audio_name

Eg. mencoder output.flv -o video_final.flv -ovc copy -oac copy -audiofile Hot_Heat.mp3

video_name       = Video to which audio have to be mixed.
video_final.flv    = Final Video.
audio_name       = Audio to be mixed. 

video_name, video_final.flv and audio_name should be replaced by corresponding video and audio names.

Mixing Audio and Video can be done in following two steps.

Step 1:  Copy and paste the audio file and video file to a folder. Then execute the command.


Step 2: After executing the command, result will be as shown in the image given below.
Here video_final.flv is the final video which will have a background music Hot_Heat.mp3.