Tool

ffmpeg idet Result Interpreter: Interlaced or Telecine?

Do you see horizontal comb lines along the edges of moving objects in a DVD, a broadcast recording or old camcorder footage? Paste the numbers that ffmpeg’s idet filter prints, and the tool tells you whether the video is truly interlaced, telecine from 24 fps film, or progressive and best left alone, then builds the matching filter command. Your input is processed only inside this browser.

The numbers behind the example buttons are made-up values to show how the tool works. To get the log for your own video, run: ffmpeg -i input.ts -vf idet -frames:v 2000 -an -f null -

How do you get the idet log?

The command below does not encode the video. It only analyzes the first 2000 frames. The result appears as the last three lines on the console (stderr). If the file has long stretches of subtitles, credits or still frames, skip to a point with a lot of motion, as in -ss 60, before measuring.

ffmpeg -ss 60 -i input.ts -vf idet -frames:v 2000 -an -f null -

You can see whether the file is flagged as interlaced with ffprobe -v error -select_streams v:0 -show_entries stream=field_order,r_frame_rate -of default=nw=1 input.ts. If you paste this output together with the idet lines, the tool compares the flag with what is actually in the video, because some files have a flag that does not match reality.

What does each of the three lines mean?

  • Single frame detection: the number of frames classified as TFF, BFF or Progressive by looking only at the immediate neighbor frames. The ffmpeg documentation describes this method as considering only immediately adjacent frames.
  • Multi frame detection: the number of frames classified using the history of earlier classifications as well. The documentation describes it the same way, and when both lines are present this tool uses this one as the basis.
  • Repeated Fields: the number of times the same field was repeated between frames (Top and Bottom) and the number of times nothing was repeated (Neither). Telecine sources are known to show non-zero values here.
  • TFF and BFF: Top Field First means the top-line field comes first, Bottom Field First means the bottom-line field comes first. The filters’ parity and order values correspond to these.
  • Undetermined: frames that could not be decided either way.

How the verdict is made

The verdict follows simple rules set by this site. We have not yet run a measurement to check these thresholds against real video. The tool uses the interlaced share among the classified frames (TFF+BFF+Progressive), the Undetermined share of all frames, and the share of repeated fields.

Condition (checked in order)Verdict
Fewer than 100 frames in totalNot enough samples
Undetermined at 40% or moreCan’t tell, measure again on another section
Interlaced below 3%Progressive
Interlaced at 90% or moreTrue interlaced (if repeated fields are 10% or more, suspect telecine)
Interlaced 25–60% + repeated fields at 5% or moreSuspected hard telecine
Anything elseMixed source

3:2 pulldown stretches 4 film frames into 5 TV frames, and it is known to leave 2 of every 5 frames with fields from two different frames mixed together. That is why an interlaced share near 40% is one clue, but the percentage idet actually reports depends on the source and the motion, so we set a wide range of 25–60%. Hard telecine is only marked as ‘suspected’, and the tool has you confirm the 5-frame cycle yourself with PNG frames.

Which filter should you pick?

  • True interlaced: bwdif or yadif. The two filters and their modes (mode=0 keeps the frame rate, mode=1 outputs one frame per field) are covered in the deinterlacing lesson. We have not measured which one looks better on this site, so encode a short section with both and compare by eye.
  • Hard telecine: use fieldmatch to match the fields back into the original frames, clean up the frames it could not match with yadif=deint=interlaced, then remove duplicate frames with decimate. The ffmpeg documentation is known to recommend putting a deinterlacer after fieldmatch. The resulting fps drops one frame out of five, so 29.97 becomes 23.976.
  • Soft telecine: known as a form where the file holds the 24 fps frames as they are, with only a flag that says ‘repeat these’. In that case the decoded frames are truly progressive, so idet reports them as progressive. So if this tool says ‘progressive’ but a DVD plays back at 29.97 fps, it may be soft telecine, and even then you do not need to deinterlace. If you want to keep 24 fps, check how your encoder or player handles the repeat flags of soft telecine.
  • deint=interlaced vs. deint=all: deint=interlaced processes only the frames ‘flagged as interlaced’. On a file whose flag wrongly says progressive, the filter effectively does nothing, so the tool gives you deint=all instead.

Suggested workflow

  1. Get the log with the idet command and paste it in. The section must have motion.
  2. Check the verdict and the field order, then run the command on a short section (-t 10) first and look for comb lines and jittery motion by eye.
  3. After encoding, check field_order and the fps with ffprobe. If you worry about quality, use the video quality improvement diagnoser to see whether the source is bitrate-limited, and pick the CRF with the CRF recommender.
  4. If fps values such as 29.97 and 23.976 confuse you, see the fractional fps detector.

Limitations

  • idet only estimates each frame statistically, so it can be wrong on videos with little motion, a lot of noise, or mixed scenes. The thresholds in this tool are rules set by this site and were not verified against real sources.
  • Quality, file size and speed after deinterlacing were not measured. The CRF and preset in the commands are starting examples.
  • HandBrake option names can differ by version, and cases such as soft telecine, variable frame rate and the 2:2 field shift in PAL are not judged.
  • A source that mixes two or more kinds (different sources in different sections, or a DVD edited together) has to be measured section by section.
  • The text you enter is never sent to a server.