Skip to content

Instantly share code, notes, and snippets.

@hobbes78
Created November 17, 2015 03:25
Show Gist options
  • Save hobbes78/937a060a5de9aa3fb05b to your computer and use it in GitHub Desktop.
Save hobbes78/937a060a5de9aa3fb05b to your computer and use it in GitHub Desktop.

Converting Videos for Old DVD Players

Here's the scenario: you downloaded a movie and you want to play it using an old DVD player with a USB port that can only show DivX videos at 640×480 resolution and doesn't even display subtitles properly. One option available is mencoder, a tool you can find in your mplayer folder.

Let's say the video file is Steal This Film II.720p.mov, the subtitles file is Steal This Film II.Xvid.srt and the reencoded file you want should be called Steal_This_Film_II.640x480.en-US_audio.pt-BR_subtitles.avi. The following MS-DOS commands will reencode the video to fit a 640×480 resolution, by resizing it from 1280×720, adding black borders to maintain the aspect ratio, and additionally burn the subtitles in, i.e., they will become part of the image instead of residing in a separate file.

mencoder "Steal This Film II.720p.mov" -sub "Steal This Film II.Xvid.srt" -o NUL -ovc xvid -xvidencopts pass=1 -vf scale=640:-2,expand=640:480:::1 -nosound -nooverlapsub
mencoder "Steal This Film II.720p.mov" -sub "Steal This Film II.Xvid.srt" -o "Steal_This_Film_II.640x480.en-US_audio.pt-BR_subtitles.avi" -ovc xvid -xvidencopts pass=2:bitrate=3000 -vf scale=640:-2,expand=640:480:::1 -oac mp3lame -nooverlapsub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment