Skip to content

Instantly share code, notes, and snippets.

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:::
@hobbes78
hobbes78 / SinglePageRedirector.user.js
Last active June 24, 2016 15:33
Requests a single page news article instead of one split across several pages
// ==UserScript==
// @name Single page redirector
// @namespace https://gist.github.com/hobbes78/c9cbbc33aef6b6b8f84e
// @version 1.5
// @description enter something useful
// @author hobbes78
// @match http://*.publico.pt/*
// @match https://*.publico.pt/*
// @grant none
// @include http://*.publico.pt/*