Wednesday, May 4, 2011

Encoding video with subtitles for playing on Xbox 360

mencoder HSE_0720.avi \
    -sub -subfont-text-scale 3 -utf8 \
    -o HSE_out.avi \
    -of lavf -lavfopts format=asf -ovc lavc -lavcopts vcodec=wmv2 \
    -oac lavc -lavcopts acodec=wmav2 

It encodes any video playable with mplayer so that it is playable on Xbox (via uShare or Media Center).

Subtitles are rendered into video stream, so output .avi is standalone.