Wednesday, May 28, 2008

file conversion

Open source developers have focussed a lot of energy on the plumbing. Here are some examples for manipulating file types:

# convert between video formats
> ffmpeg -i input.flv output.mpg

# convert between image formats
> convert input.png output.jpeg

# join together audio files
> sox in_1.wav in_2.wav out.wav

# remove sound from video
> mencoder -ovc copy -nosound video.avi -o video_nosound.avi
# add sound to video
> mencoder -ovc copy -audiofile soundtrack.mp3 -oac copy video_nosound.avi -o video_sound.avi