De-interlacing Video

From Zanecorpwiki

Jump to: navigation, search

If you don't know what interlacing is, it'll be worthwhile to do a little additional reading.

First, you need to know whether you're image is naturally interlaced (whole images broken into two parts) or if it's been telecined (whole images multiplyed, frames added, and then broken into two parts).

Naturally Interlaced Video

PAL video is naturally interlaced; i.e. European sources. Reconstructing a full frame is easy, just use the -I option. There are 5 modes for this, I often use '3' (zoom to full frame) which causes some blurriness in the resulting full frame image, but does a good job overall and avoids obvious jagged artifacts.

- I 3

Telecined Video

If the image is telecined (meant for display on an NTSC player, like an American analog TV), then you need to apply a set of filters to reconstruct the original frame:

-J ivtc -J 32detect=force_mode=5:chromathres=2:chromadi=9 -J decimate

I'm not sure what the filters do individually (and you always use them together, they're separate so that--in theory--you could swap out the different parts for different implementations). On the whole, the process will detect the frames that telecining added to the video stream, remove them, and try to match the naturally interlaced frames in order to reconstruct the original. Unnecessary frames are dropped.

This gets you a good video, embut/em you're changing the number of frames per second to get there, so you need to change the framerate. NTSC sources are always at 29.970 fps (30000/1001.0) and you'll be encoding to 23.976 fps (24000/1001.0). So, you need to add the:

-f 4,0

If you're interested in why such weird numbers, read up on Interlacing and Telecine.

Personal tools