The commercial DB

While watching broadcast television, it is possible to use CINELERRA-GG to automatically mute commercials being aired during a broadcast capture. Visual muting as well as sound muting is done! You can NOT use ffmpeg for the format when working with the commercial DB. This database that was added is a novel architecture shared memory database, a Traveling Data Base (TDB). With TDB you have direct access to the shared database presence (instead of having to go to the server).

Basically it works as follows, but there are a few differences in just how it goes about it:

  1. Identify a zone in a timeline as a commercial.
  2. Characterize it concisely, in the audio and video timeline.
  3. Store the characterization in a database.

Then, when capturing media or building a table of contents for an mpeg transport stream (broadcast capture DVB):

  1. Characterize each I-Frame (a few frames per sec).
  2. Search the database in real-time to identify the image.
  3. If a match is identified, automatically press the mute button.
  4. Unmute if the pattern match fails, or the commercial ends.

It mostly works, but it takes more time to setup and maintain the database as the advertisements change frequently or vary by a small amount. It would take a small set of personnel to keep the database current and some finessing of the code.

Currently, to activate the commercial database (db) methods you must do the following as root:

cd <cin-path>/bin
mkdir /cinelerra              #yes, currently only in the / filesystem
./cin_db /cinelerra/media.db  #to create a new empty commercial     capture database
export BC_USE_COMMERCIALS=1   #in the command shell that is starting \CGG{}

This activates the gui tools and database access. As of yet, all of the requisite permission changes necessary to run as non-root have not been worked out (initially just easier to run as root).

When a commercial is cut, the following occurs:

  1. transmits the capture timeline fragment to /tmp
  2. scans the snip to characterize it statistically
  3. creates a miniature b/w movie of the beginning and end
  4. stores all of this into the media.db

There are 2 ways currently to identify a commercial:

  1. Load mpeg3 transport media, highlight select the commercial in the timeline, and press cut commercial on the toolbar.
  2. Use the remote control interface to indicate the boundary in/out cut points in the realtime capture timeline, and operate a cut command.

The cut command creates a popup to let you know that it is processing the captured data. This can take several seconds depending on the size and media format. The results from the scan are stored in a new record in the media.db.

The stats are somewhat disappointing. Image recognition is way past zero, it is not 100 percent. Broadcast streams have tons of minor variances which hamper digitally perfect reproduction from instance to instance of commercial presentation. This puzzle remains to be solved.

To review media stored in the media.db, and delete old expired commercial data records, press (Shift-M) from the main window. This will create a media-db window which shows the various captured samples stored there.

Currently, only a customized ati-x10 (kernel mod required) radio remote control works. But this can quite readily be modified for other remote control models.

The CINELERRA-GG Community, 2021
https://www.cinelerra-gg.org