Saturday, November 23, 2013

Linux/Ubuntu - Video editing - video/audio merging, soundtrack replacing

1) Merge multiple mp3 files into one
sudo apt-get install mp3wrap
mp3wrap onemp3.mp3 file1.mp3 file2.mp3 file3.mp3 ...
mp3wrap onemp3.mp3 -a file1-append.mp3 file1-append.mp3 ...

2) Change video file soundtrack
mencoder -ovc copy -nosound video.avi -o video_nosound.avi
mencoder -ovc copy -audiofile soundtrack.mp3 -oac copy video_nosound.avi -o video_new.avi

3) Merge multiple video files into one
sudo apt-get install mencoder
mencoder -oac copy -ovc copy -idx -o megavideo.avi *.avi

4) Resize video
mencoder input.avi -o output.avi -ovc xvid -xvidencopts bitrate=3000 -oac mp3lame

5) Speed up video (with Avidemux)
sudo apt-get install avidemux
Avidemux - Menu: Video -> Frame rate (set it to 100 for example) -> Save video  

Observation: Speeding up the video should be performed on a video file with the soundtrack removed (see above how to achieve this).

No comments: