Detecting interlaced video with ffmpeg
Created on 2023-06-06T19:44:40-05:00
- Extracting more frames (raising -frames:v) improves the accuracy of detection.
- High numbers of TFF and BFF mean a video is very likely interlaced.
- TFF means interlaced with "top" frames and BFF means interlaced with "bottom" frames.
Interlaced content is relatively rare to encounter in the wild now.
ffmpeg -filter:v idet \ -frames:v 100 \ -an \ -f rawvideo -y /dev/null \ -i ~/Downloads/some_interlaced_video.mkv # Example output (this is interlaced, TFF style) # [Parsed_idet_0 @ 0x1ccf7c0] Single frame detection: TFF:167 BFF:0 Progressive:1 Undetermined:0 # [Parsed_idet_0 @ 0x1ccf7c0] Multi frame detection: TFF:168 BFF:0 Progressive:0