Creating a MPEG4 with subtitles using mencoder

Note to self: This is a reminder of how I managed to reencode an AVC1/AC3 video in a Matroska container to a low-profile MPEG-4 (aka “XViD” or “DivX”) video with the original AC3 sound in an AVI container, just like modern video players like their files (no sign of players supporting h.264 where I live yet).

mencoder the_darned_movie.mkv -sub subtitles.srt -utf8 -subfont-text-scale 3.3 -subpos 96 -aspect 2 -oac copy -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell=yes:v4mv=yes:aspect=16/9:vbitrate=1200:vpass=1 -o /dev/null

and then the actual encoding (make sure to copy the log file from the first pass somewhere safe just in case):

mencoder the_darned_movie.mkv -sub subtitles.srt -utf8 -subfont-text-scale 3.3 -subpos 96 -aspect 2 -oac copy -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell=yes:v4mv=yes:vbitrate=1200:aspect=16/9:vpass=2 -o the_darned_movie.avi

I made a couple of fix ups, such as converting the srt file to UTF-8, with gaupol.

Advertisements