[Ffmpeg-devel] Field encoding

Måns Rullgård mru
Thu Aug 25 21:06:34 CEST 2005

Ian Gowen <ian.gowen at gmail.com> writes:

> Does libavcodec support encoding fields, e.g. MPEG-2 for DVD? If so, what 
> fields(heh) do I set to make it aware that the input I'm giving has fields?

Libavcodec supports interlaced encoding, but only as frame pictures
containing both fields.  There is no support for encoding top and
bottom fields separately as field pictures.  To activate interlaced
in AVCodecContext.flags.  When encoding interlaced material, it is
important to also set the top_field_first flag properly, or watching
the result on a TV will give you a headache.

FWIW, DVD also allows progressive encoding, which is what is normally
used for filmed material, as opposed to material recorded with a TV
camera.  Movies are normally progressively encoded, with a 3:2
pulldown in regions that need this.  Material originally intended for
TV (such as TV shows), is typically interlaced.  Sometimes filmed
material is telecined (3:2 pulldown before encoding), and encoded
interlaced.  Such DVDs are best avoided.

I suppose you are intending to create your own DVDs, so you'll need to
check whether your source is interlaced, and set the mode accordingly.

M?ns Rullg?rd
mru at inprovide.com

More information about the ffmpeg-devel mailing list