[FFmpeg-devel] Is video stream interlaced?

Michael Niedermayer michaelni
Wed Sep 8 16:54:43 CEST 2010


On Sat, Sep 04, 2010 at 01:55:37PM -0500, Reuben Martin wrote:
> 
> Hi,
> 
> I'm working on a patch to improve the gxf encoding. Most of what I've already got most of what I wanted to do worked out save for one thing, I can't figure out how to determine if the video stream is interlaced or not. There doesn't seem to be any direct query I can use to make that determination. I thought I might be able to assume the stream is encoded if tbc == tbr * 2, but the results when calculating tbc within gxfenc.c reflect the frame rate rather than the field rate despite that the utils.c function shows the field rate of the input video stream for tbc in the terminal.  And even if the tbc calculation reflected the field rate as shown by the utils.c output, tbr returns 0.
> 
> I've only been poking around in the ffmpeg code base for a couple days, so please excuse me if there is an obvious means of doing this that I haven't yet discovered.

AVFrame contains some flags but the reliability of that should not be
overestimated, these flags are just set from what is stored in the bitstream

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100908/fb991965/attachment.pgp>



More information about the ffmpeg-devel mailing list