ffmpeg is the swiss army knife of video and audio processing tools.
This post will be an ever growing list of
ffmpeg commands I have found useful.
Get Info About Audio/Video File
ffmpeg -i INPUT
Convert from MOV to MP4 Container
Assuming the source video codec is compatible with the MP4 container, no re-encoding will be necessary. There won’t be any loss in quality.
ffmpeg -i INPUT.mov -c:v copy -c:a copy OUTPUT.mp4
Convert Video to DVD Compatible MPEG
ffmpeg -i INPUT -target ntsc-dvd OUTPUT.mp4
Add faststart Flags to Video File
Adding faststart flags to a video file will allow the video file to begin playing as soon as possible instead of waiting for the entire video file to download in a compatible web browser.
ffmpeg -i INPUT -c:a libfaac -c:v copy -movflags faststart OUTPUT
Extract Audio Only from Video File
ffmpeg -i INPUT -vn -c:a copy OUTPUT
Extract Video Only from Video File
ffmpeg -i INPUT -an -c:v copy OUTPUT