ffmpeg-commands for editing videos

I was using Pitivi in the last few months to edit demos and family videos. But Pitivi doesn’t have it all, so sometimes it’s just easier to turn to the command line and use ffmpeg. Bellow are few of the commands I’ve used for future reference.

Extract audio from video:

$ ffmpeg -i input-video.avi -vn -acodec copy output-audio.aac

Get the first frame as a picture (good when you need to freeze the screen for a while):

$ ffmpeg -i video.mkv -vf "select=eq(n\,0)"  picture.jpg

Removing all audio channels from a video:

$ ffmpeg -i video-with-sound.mp4 -map 0 -map -0:a -c copy video-without-sound.mp4

Convert AAC sound to WAV:

$ ffmpeg -i sound.aac  sound.wav

And here is a collection from protrolium with even more commands.