ffmpeg

Cheat sheet

FLAC to MP3 at 320k

for fn in *.flac
ffmpeg -map_metadata 0:0 -i $fn -ab 320k -ac 2 -ar 44100 ${fn%.flac}.mp3

Extract a video clip

Copes ten seconds of video from one minute into the video:

ffmpeg -ss 00:01:00 -t 00:00:10 -i in.mp4 -acodec copy -vcodec copy out.mp4

ALAC to FLAC, preserving metadata

for fn in *.flac
ffmpeg -i $fn -acodec alac ${fn%.flac}.m4a -map_metadata $fn:${fn%.flac}.m4a

I'm not sure if this worked.

Folder of images to video

ffmpeg -r 12 -b 1200k -f images -i %03d.jpg out.mp4

Not entirely clear what this does, but it would seem to have a framerate of 12 fps.

Get audio from a video

ffmpeg -i input.mp4 -vn -acodec copy out.m4a 

Clip audio

ffmpeg -ss 00:00:00.00 -t 25 -i large.wav -acodec copy clip.wav 

Clip the first 25 seconds of large.wav into clip.wav. Apparently ffmpeg is particularly picky about the ordering of the parameters.