Skip to main content.
November 30th, 2008

deinterlacing on ubuntu players

It’s the holiday season and that means watching some classic animated TV specials like The Grinch. I’ve captured several over the years and saved them to DVD’s the way they were broadcast (ie. interlaced) but I have an HD projector. I think the interlacing artifacts look awful on the projector and I’m picky about how the interlacing is dealt with.

So, I just did some testing to figure out what exactly is going on with deinterlacing with Xine, totem-xine and gmplayer on Ubuntu 8.10. I tested two animated specials which happened to be in the DVD drive — The Happy Elf, and Mickey’s Twice Upon a Christmas — but this applies to most animated TV shows.

A Little Background on Animation Broadcast via NTSC

In case you don’t know, most TV animation is produced in 24 frames per second then converted to 60 fields per second using a process called 2:3 pulldown or telecine.The best quality approach to this content is to recover the original 24 fps frames and send those to your projector (or monitor). This is called inverse telecine (IVTC), reverse 2:3 pulldown or sometimes pullup.

For live action shows it’s a bit more complicated as some are shot on film (most primetime dramas) then telecined for broadcast but some (soaps, reality shows, news, sports, etc) were shot with interlacing cameras. For this content, progressive frames are generated using various algorithms (bob, weave, blend, median, etc.) which all have different artifacts. I’m not really going to address this topic here.

Today, many are shot with HD cameras but that doesn’t really make this issue go away since half the formats are interlaced and the other half are progressive. Fortunately, I don’t find 1080i interlacing bothersome probably because the scanlines are so small (relative to scaled up scanlines from NTSC video).

A Note about Animation on Commercial DVDs

The mpeg stream on DVDs can be progressive 24 fps which side steps this whole issue. Almost all mainstream releases in recent times (Pixar, DreamWorks, etc) will be 480p24 (24fps, progressive) on the disk. I do have a couple indie DVDs (Old Man and the Sea comes to mind) which just put the telecine version on the disk so this post applies to them, too. Yuck.

First, I confirmed these were telecined by using the "." key in mplayer or slow-mo in xine to see the individual frames. You’ll see a couple frames are fine then a couple have the interlacing.

Totem (the xine version) is the player I normally use but it looked pretty crummy when I turned on deinterlacing. In particular the edges of the titles looked deterioriated. I couldn’t find any settings for deinterlacing for totem. I’ll keep using this player for progressive content since I like the simple UI but it’s useless for interlaced content.

Xine sets deinterlacing on by default and it looks much better than totem’s algorithm (for animated content, that is). The tooltip claims it detects progressive content and does not deinterlace but I’m not sure what it’s doing there. Unfortunately, it does not appear to detect telecine content as the animated frames appeared to be blended frames. For example, a ball falling was ghosted in two locations. It looks like in the prefs it’s using the tvtime filter. It did a nice job on live action footage so this is probably my choice for interlaced live action content.

Mplayer (and gmplayer) by default does nothing about interlaced content (ie. just shows the interlaced frames) and doesn’t seem to have any option to toggle it on or off. But, of course, there are several filters buit-in which you can enable on the command line. One filter is "pullup" which reverses the 2:3 pulldown (telecine). They recommend chaining it to the "softskip" filter for some buffering or something like that. It works like a charm with my animated content. So, my new preferred player for telecined content is gmplayer with the pullup filter. For example:

gmplayer -vf pullup,softskip dvd://

Oh, and this doesn’t address the conversion from 24fps (original animation) to 60fps (projector) problem. That’s a subject for another post.

Posted by bruce as animation, computing at 1:02 AM UTC

Comments Off