[FFmpeg-user] Detect if an MTS file is interlaced or not?

Thomas Worth dev at rarevision.com
Wed Jun 8 11:13:35 CEST 2011


I'd like to know if there's a way to tell if an MTS file is
interlaced, preferably without having to decode it first. The problem
I have is that libav always returns 59.94 for the frame rate of
interlaced NTSC streams, even though we know it's 29.97. And of
course, r_frame_rate always returns 0 with the "mpegts" format so I am
left to calculate the frame count manually. I need the correct frame
rate to do this, however and there's no way of telling ahead of time
whether the input video will be interlaced or not. Any ideas?


More information about the ffmpeg-user mailing list