Commercial detection

This is the process by which MythTV detects commercial breaks in recorded shows and marks jump points in the database so that such breaks can be skipped (or later cut out of the recording during transcoding).

Contents

Configuration

In .24-fixes Commercial detection can be configured within the 'General' page of 'Utilities/Setup > Setup > TV settings > General' in mythfrontend.

In .25 it can be configured in 'Setup > Video > General'

Commercial skip method: A variety of different methods can be used to detect commercial breaks.

Methods

Blank Frame Detection - Is used to determine when a programme fades to black (this invariably happens between show segments)

Blank Frame & scene change detection - As above but tries to determine that a large amount of the picture has changed

Scene change detection - Tries to determine that a large amount of the picture has changed

Logo detection - Looks for a part of the picture that does not change during a recorded show - i.e. an onscreen logo. Logos are usually removed for the duration of commercial breaks, making them 'easier' to spot.

All - Use all commercial detection methods at the same time. This detection method uses information from blank-frame, scene change, and logo detection and can easily be modified to take advantage of other detection information. It works in a fundamentally different way than the normal blank-frame and scene change methods. The code groups the frames into blocks separated by blank frames and rates each block based upon several factors such as the rate of scene change, what percentage of frames in the block have a logo present, how long/short the block is, etc.. Indications that a block is part of a commercial (such as very high rates of scene changes) lower the block's score, while indications that a block is part of the show (such as having a logo present on most frames) raise the block's score. In the end the blocks are looked at as a group and various bits of logic applied to make the final determination where commercials start and end. On most of the shows tested, this method seems to be doing a much better job than just blank-frame or blank-frame plus scene-change.

Miscellaneous

An additional option - 'Strict Commercial Detection' - tightens up the rules used to detect commercials. This should be disabled if commercials are not being detected & marked.

Setting the 'Run commercial flagger' tickbox under "Default JobQueue settings" enables commercial detection by default for all new recording rules on channels which are not set to 'commercial free'.

Usage

Once recordings in MythTV have been flagged for commercials, ad-breaks can be skipped.

During playback

The End or Z key (by default) jump to the next commercial break marker. The Home or Q (by default) key will jump back to the previous commercial break marker.

Commercial skipping can be enabled on a show-by-show basis by bringing up the OSD menu during playback (O key) and selecting a commercial skipping option. Choices given are:

Off - i.e. do nothing when markers are reached

Notify but do not skip - indicate that a commercial marker has been reached

Skip automatically - skip between markers automatically

As a default option

Within the 'TV playback' section in mythfrontend's setup menus, there is a 'Commercial Skip' settings page.

Here the options for default actions on commercial flagged recordings can be set: