[FFmpeg-user] dv => mp4: deinterlace or not, and how?

Baptiste Coudurier baptiste.coudurier at gmail.com
Thu May 5 22:36:54 CEST 2011


Hi,

On 05/05/2011 01:19 PM, sean darcy wrote:
> I have an interlaced dv file. I'm transcoding it with x264 to mp4.
> 
> 1. ffmpeg -i file.dv -an -vcodec libx264 -b <x> out.mp4
> 
> If I just leave it like that, is out.mp4 interlaced or progressive?

progressive. By default encoding is progressive.

> 2. ffmpeg -i file.dv -an -vcodec libx264 -b <x> -deinterlace out.mp4
> 
> Here I assume out.mp4 is progressive. The ffmpeg documentation says:
> 
> "The alternative is to deinterlace the input stream with `-deinterlace',
> but deinterlacing introduces losses."

Correct, it is progressive. Use -vf yadif instead of -deinterlace
Deinterlacing may be a bit destructive, especially if the input is _not_
interlaced.

> [...]
>
> Given this note about losses, am I right we should never deinterlace?
> Almost never? When is deinterlacing required/better?

You have options:
if the receiving end playback interlaced (CRT tv):
encode interlaced
else if the receiver is going to deinterlace if the file is marked as
interlaced and you trust this deinterlacer, then you may encode
interlaced (deinterlacing will take cpu time)
otherwise you should deinterlace yourself using a good deinterlacer.

I suggest always deinterlace using -vf yadif if the source content is
interlaced

> 3. ffmpeg -i file.dv -an -vcodec libx264 -b <x> -flags +ilme+ildct out.mp4
> 
> Here I assume out.mp4 is interlaced. How is this different from 1.
> above? Is it different?

Correct.

> The FAQ mentions +alt as a flag. When should this be added? Does it hurt
> to use it all the time?

+alt only applies to mpeg4 and mpeg2. It's supposed to improve
compression for interlaced content.

-- 
Baptiste COUDURIER
Key fingerprint          8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer                           http://www.ffmpeg.org


More information about the ffmpeg-user mailing list