Julius Plenz – Blog

Old DVDs and mplayer

I was just watching an old DVD of mine (from 2003), but was annoyed that the video had "hardcoded" black bars at the top and the bottom and was in interlaced format. A fast motion looks like this:

In motion, no deinterlacing, boders

But mplayer can do everything! You just need to know how. Here it is: Use the cropdetect video filter, skip to the actual video and let it run for a while (it will detect the black areas that don't change). Then copy the output:

$ mplayer -vf cropdetect dvd://
...
[CROP] Crop area: X: 5..717  Y: 57..421  (-vf crop=704:352:10:64).

Now, play the movie in 4:3 aspect racio, and force cropping at the numbers you just found out. Additionally, use the yadif deinterlacer:

$ mplayer -aspect 4:3 -vf yadif,crop=704:352:10:64 dvd://

Now the same scene (with heavy motion) looks much nicer:

In motion, deinterlacing, boders cropped

posted 2011-12-29 tagged mplayer