[Libav-user] Analyzing frames WITHOUT deinterlacing.

Carl Eugen Hoyos cehoyos at ag.or.at
Wed Jun 29 09:13:12 CEST 2016


David Harrison <dosirrah at ...> writes:

> I have been handed a tool that analyzes frames along with 
> its source code.

Where can I find this tool?

> The tool uses libav.  

Note that only FFmpeg is supported here.

> In some cases the video input to this tool is interlaced. 
> The tool operates just fine, but because my intent is not 
> to render the video but to extract and analyze features 
> from the video I would prefer to analyze the video in a 
> lossless manner.

libavcodec is bit-exact by default for codecs that define 
an exact (lossless) output (mpegvideo does not iirc).

> In other words, I DO NOT want to deinterlace the video.

This is the default, deinterlacing was removed from 
libavcodec, you need to specify a deinterlacing filter 
now.

> I would rather operate on half fields.

What kind of input do you provide? For all "real" codecs, 
there is only frame output, there are encoders that 
produce field-encoded files for j2k and hevc but FFmpeg so 
far does not support merging the fields automatically (as 
required for every usecase I can think of).

If FFmpeg would not provide frame output for mpeg2video, 
h264 and vc1, it would not be lossless and not bit-exact.
(vc1 usually is not bit-exact but this is unrelated.)
The specifications all require frame output and this is 
what the reference (and hardware) decoders do.

Carl Eugen


More information about the Libav-user mailing list