====== Video encoding recipes ====== Random video transcoding recipes, mainly to convert stupid formats to editable ones. To use ffmpeg to turn weird MOV files into gigantic AVIs using ffv1, a ffmpeg-specific lossless codec supported by libavcodec on windows, do the following. Note that we use ffmpeg because mencoder seemed to choke on the MOVs I was working with. ffmpeg -i $infile -vcodec ffv1 $outfile Normal generic transcoding with mencoder: opt="vbitrate=2160000:keyint=30:threads=4" mencoder -oac copy -ovc lavc -lavcopts vcodec=mpeg4:$opt $infile -o $outfile I used the thing below to transcode some really weird screencap videos in the past. It extracts the audio and re-weaves it with video in two steps. opt="vbitrate=2160000:keyint=30:threads=4" opt2="acodec=pcm" mplayer -vo null -ao pcm:file=$infile.wav $infile mencoder -oac pcm -ovc lavc -lavcopts vcodec=mpeg4:$opt $infile -audiofile $infile.wav -o $outfile Transcode using the x264 codec in mencoder: mencoder -oac copy -ovc x264 $infile -x264encopts subq=6:partitions=all:8x8dct:me=umh:frameref=5:bframes=3:weight_b:bitrate=80000:keyint=30 -o $outfile