Home > Uncategorized > Replace the audio track in a video

Replace the audio track in a video

Problem
You have a video with an audio track (call it video.mp4). You have an audio file (e.g. audio.mp3) that you want to put on the video, replacing the original audio of the video file.

Solution
With Audacity, you can open both video.mp4 and audio.mp3 and you can synchronize the mp3 to match the original audio. Important points: speech/music should start at the same time, and its length should be the same or a little bit less than the original audio.

Once you have a good audio.mp3 file, do the replacement with the following command:

ffmpeg -i audio.mp3 -i video.mp4 -c copy final_video.mp4

Solution #2
Before the previous solution, I used Avidemux, but it tends to crash sometimes :) When I have such videos where Avidemux crashes, I use ffmpeg from the command-line.

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: