Video Recoding

To convert from quicktime format to flash video format, use ffmpeg:

ffmpeg -i file.flv

By default, this will encode the file using a video quantizer scale of 31, which is the worst. Using the -sameq (same quality) option forces ffmpeg to use a quantizer scale of 1, which means it retains full quality. Unfortunately this also produces flv files that are about four times bigger than the quicktime source files. In order to get a decent compromise between file quality and file size, you can use the -qscale q option, which allows you to set that number anywhere between 1 and 31. As an example, -qscale 10 added 6MB to a 20MB quicktime file and the resulting quality was about 85% as good as the original.

Split a video file:

ffmpeg -i file.flv -acodec libfaac -ss 00:00:00 -t 00:04:03 -sameq vid1.flv

To convert a vob file (ie. direct from DVD) to a file that is playable on a basic Windows box (ie. with no DiVX support, no Quicktime, etc):

ffmpeg -sameq -deinterlace -i file.vob file.mpeg

Yet Another Programming Blog

Where James Gordon rambles about PHP, Laravel and web development in general.

Find me on Google Plus Find me on Twitter Find me on Stack Exchange Find me on Github Subscribe