[Ffmpeg-devel] Field encoding

Rich Felker dalias
Thu Aug 25 23:27:36 CEST 2005


On Thu, Aug 25, 2005 at 08:06:34PM +0100, M?ns Rullg?rd wrote:
> 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
> encoding, set CODEC_FLAG_INTERLACED_DCT and CODEC_FLAG_INTERLACED_ME
> 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.

If the source is field pictures, you can just interleave them before
passing them to the encoder, BTW. Then you get to pick the field
dominance.

Rich





More information about the ffmpeg-devel mailing list