Thanks @leafo for the ffmpeg idea!