Capturing/scaling retro video

This is just a scratchpad for some useful FFmpeg recipes etc. that I use when dealing with old video from tapes, videogames, etc.

Capturing from DOSbox

The best way to capture from DOSbox is to use the built-in video recorder - it seems to do a nearly perfect job, and getting the audio from the game even when you have it muted so you don't have to listen to hours of machine gun noises is a great feature.

DOSbox video recording starts/stops with Ctrl+Alt+F5. The codec is ZMBV, which you'll need a codec for (it's readily available On Line, will upload it here at some future date.) ZMBV movies will not RELIABLY play correctly in any player that I've tried - VLC for instance does not seem to decode the palette correctly, but FFmpeg will correctly transcode the video.

If you're transcoding to mp4, you really want to scale while doing it, or it's going to trash your video no matter what quality it is - x264 just will not work with 320x200 video. Pushing to 1280x800 (4x scale) works great for me, it looks good in a 4k video at fullscreen.

The FFmpeg for this is simple:

ffmpeg -i "FILENAME.AVI" -vf "scale=1280x800:flags=neighbor" "OUTPUT.MP4"

I use a batch file for this purpose, which looks like this:

for %%f in (./*.avi) do @ffmpeg -i "%%f" -threads 16 -vf "scale=1280x800:flags=neighbor" "output\%%~nf.mp4"

This transcodes all .avi files in the current folder into a folder called "output". I copy the files from the dosbox capture folder, run this script, let it complete, then drag all the .avi's to a "finished" subfolder so they don't get processed again.

Converting 60i captured video / DV

If converting from DV, or other 60i video, I absolutely hate all forms of deinterlacing other than bob / yadif. It is surprisingly hard to get the weenies on video forums to cough up the recipe for this, because they all think it's a violation of the sanctity of life or something.

Here's my FFmpeg command:

ffmpeg -i INPUT.DV -vf "yadif=1,scale=1440x1080:flags=lanczos" "OUTPUT.MP4"

The "yadif=1" is critical; I believe yadif=0 results in a """"""more correct"""""" downconvert to 30p, while yadif=1 produces the 60p output that everyone actually wants. 1440x1080 isn't always the exact right resolution to use, but practically speaking it's probably going to look fine for e.g. youtube purposes - it's the 4:3 equivalent of 1080, of course. And lanczos just looks best to my eyes.

And here's the batch:

for %%f in (./*.avi) do @ffmpeg -i "%%f" -vf "yadif=1,scale=1440x1080:flags=lanczos" "output\%%~nf.mp4"

If this was interesting to you, or if you did something interesting with it, email me:

If you like my work, consider tossing me a few bucks. It takes a lot of effort and payment helps me stay motivated.

List of Articles