View Full Version : FFmpeg and interlaced encoding

2nd June 2013, 09:42
Using FFmpeg to produce an interlaced mpeg2 output, from an interlaced source (i.e. DV), I have a doubt regarding the flags to use.

-ilme -top 1

does produce a valid interlaced output TFF, according to MediaInfo.

From FFmpeg online documentation (http://ffmpeg.org/faq.html#Which-are-good-parameters-for-encoding-high-quality-MPEG_002d1_002fMPEG_002d2_003f), 'ildct' and 'alt' parameters can be used as well:

-flags +ilme+ildct+alt -top 1

The question is: in your experience, are 'ildct' and 'alt' really needed to produce a good quality interlaced output?



3rd June 2013, 14:50
In my experience ilme & ildct suffice. The page you link to is the FAQ; from the reference documentation (http://ffmpeg.org/ffmpeg-all.html):

‘flags flags (decoding/encoding,audio,video,subtitles)’

Set generic flags.

Possible values:



Use interlaced DCT.


Apply interlaced motion estimation.

Although I haven't tried to verify this, I suspect ilme ensures field-based - as opposed to frame-based - motion estimation. Using it certainly improves the quality of interlaced encodes for me.

I have no knowledge of alt and I don't see it listed in the documentation either. Perhaps it's been deprecated and its mention in the FAQ is a left-over?

PS. As I understand it, all DV sources are BFF? E.g. http://www.dvmp.co.uk/digital-video.htm, last paragraph in 'DV & DVCAM'. For my DV camera I use '-top 0'.

PPS. I also found a DV clip that MediaInfo (incorrectly) reports as TFF. To determine correct field order, use
on scenes with motion. If motion progresses forward, backward, forward, backward etc., the clip is BFF.


4th June 2013, 21:45

thanks for the very useful inputs. The origin of the question can be found here (http://forum.doom9.org/showpost.php?p=1631111&postcount=2278).

'alt' is now deprecated and substitued by 'alternate_scan 1' even if it is not mentioned in the official documentation.