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

Mark Himsley mark at mdsh.com
Fri May 6 00:32:22 CEST 2011

On 05/05/2011 21:36, Baptiste Coudurier wrote:
> 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.

I'd like to clarify that answer.

I agree 100% that the mp4 will be encoded progressive. The problem is
that it could be badly encoding interlaced material. What I mean is, it
will be using progressive frame encoding techniques to encode a frame
that might be carrying interlaced material, which would therefore
display with comb edges on movement etc.

>> 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.

It is different from 1 because it encodes the two fields as temporally
different half-frames (if you don't mind my over-simplification).

In your option 1, the encoder can reduce bit-rate by
throwing-away/hiding stuff on every line of the picture, in one go.
Because interlacing works by every other line being from a different
temporal snapshot, that throwing-away/hiding could move pixels from one
temporal snapshot to another. Than can look really horrible.

In your opting 3 the encoder knows that the image is made up of the two
temporal snapshots and will not do that, but can use its knowledge that
the second snapshot may contain the same image as the first snapshot,
only with some/all parts moved, to reduce the bit-rate - by encoding the
second field as deltas from the first field.


More information about the ffmpeg-user mailing list