[FFmpeg-devel] Is video stream interlaced?

Reuben Martin reuben.m
Sat Sep 4 20:55:37 CEST 2010


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.


More information about the ffmpeg-devel mailing list