[FFmpeg-user] How to use ffmpeg to detect commercials

David Niklas doark at mail.com
Fri Oct 1 23:19:19 EEST 2021


On some US TV channels the commercial breaks are timed. As in, they start
at A, B, and C time and end at X, Y, and Z time.
Perhaps that will work for your needs.

Alternatively, you could combine several approaches and write a basic
identification guessing engine and then pass the cut clip to the user for
approval/disapproval.

Another thing to take into consideration is that normally theres a marked
volume decrease before a commercial break on US TV. People stop talking
and events stop happening. This doesn't apply to really old shows because
they insert more and more commercial breaks, but for anything slightly
recent it would work.

Overall, it seems you'll have to double check whatever method of
commercial detection you choose to use. This will save you time, but not
a huge amount.

Sincerely,
David


More information about the ffmpeg-user mailing list