User:Rtsai1111

From MythTV Official Wiki
Revision as of 16:42, 18 August 2006 by Rtsai1111 (talk | contribs) (Experimental Commercial Flagging)

Jump to: navigation, search

See http://www.tsaiberspace.net/projects/mythtv/

Experimental Commercial Flagging

Code from branches/commdetector2 has been merged back into SVN trunk. To use it, go to the "Setup : TV Settings : General : General (Jobs)" configuration screen, and select the "Experimental" commercial flagging method. The "Strict Commercial Detection" setting does not apply to the "Experimental" commercial flagger.

To perform any kind of troubleshooting, be sure to run mythbackend/mythcommflag with "-v commflag", and update the following database settings:

INSERT INTO settings (value, data) VALUES ('TemplateFinderDebugLevel', '1');
INSERT INTO settings (value, data) VALUES ('TemplateMatcherDebugLevel', '1');
INSERT INTO settings (value, data) VALUES ('HistogramAnalyzerDebugLevel', '1');
INSERT INTO settings (value, data) VALUES ('BlankFrameDetectorDebugLevel', '1');

The TemplateFinder and TemplateMatcher debug levels can go up to 2 or 3, but they will generate a very large amount of output (~100MB, many JPG frames). The HistogramAnalyzer and BlankFrame debug levels can also go up to 2 or 3, which will result in more detailed logfile output. Also, the TemplateFinder will use ImageMagick to generate debugging JPG images, so that will also need to be installed if you don't already have it.

These debugging settings will generate "*-debug" directories in your MythTV recordings directory; they will not be automatically cleaned up when your recordings are deleted, so you will have to periodically clean them up yourself. The extra debugging output should be useful to non-developers; it identifies exactly where the various kinds of breaks are. If you then use the "Edit Recordings" UI to examine your recording, you can get an idea of why or why not a particular segment was flagged in a certain way.

The extra debugging files in "*-debug" directories are the results of the commercial-flagging analysis; they will provide more detail as to why a certain frame was flagged a certain way. Also, subsequent runs of mythcommflag will run much more quickly (useful if you want to play around with tuning internal parameters).

When analyzing results (why was a frame flagged as "blank", etc.), the frame numbers are more useful than the timestamp. Use an OSD theme that includes a "framedisplay" element, and use the "Edit Recording" UI. For example:

<textarea name="framedisplay" align="right">
    <area>108,104,65,16</area>
    <font>smallfont</font>
</textarea>

To help in troubleshooting, please provide the following information:

  • Output from mythcommflag (in mythbackend.log if run via mythbackend), with the appropriate "-v" and database DebugLevel settings.
  • Information about recording (analog or digital source, country of recording).