Contents

Mythcommflag is the internal process used by the front end to flag commercials in MythTV recordings. There are various options that can be set on how commercials are detected. See the front end configuration manual for details.

Usage

$ mythcommflag --help
Valid Options are:
-c OR --chanid chanid Flag recording with given channel ID
-s OR --starttime starttime Flag recording with given starttime
-f OR --file filename Flag recording with specific filename
--video filename Rebuild the seektable for a video (non-recording) file
--sleep Give up some CPU time after processing each frame
--rebuild Do not flag commercials, just rebuild seektable
--gencutlist Copy the commercial skip list to the cutlist
--clearcutlist Clear the cutlist
--setcutlist CUTLIST Set a new cutlist. CUTLIST is of the form:
#-#[,#-#]... (ie, 1-100,1520-3012,4091-5094
--getcutlist Display the current cutlist
-v or --verbose debug-level Use '-v help' for level info
--queue Insert flagging job into the JobQueue rather than
running flagging in the foreground
--quiet Turn OFF display (also causes the program to
sleep a little every frame so it doesn't hog CPU)
takes precedence over --blanks if given first)
--blanks Show list of blank frames if already in database
(takes precedence over --quiet if given first)
--all Re-run commercial flagging for all recorded
programs using current detection method.
--allstart YYYYMMDDHHMMSS when using --all, only flag programs starting
after the 'allstart' date (default = Jan 1, 1970).
--allend YYYYMMDDHHMMSS when using --all, only flag programs ending
before the 'allend' date (default is now).
--force Force flagging of a video even if mythcommflag
thinks it is already in use by another instance.
--hogcpu Do not nice the flagging process.
WARNING: This will consume all free CPU time.
-h OR --help This text
Note: both --chanid and --starttime must be used together
if either is used.
If no command line arguments are specified, all
unflagged videos will be flagged.

Choosing a Recording

Two methods are available to choose which recording to work on. The first is to specify the channelid and start time,

-c 1067 -s 20060424183000

Note the start time format is in YYYYMMDDHHMMSS.

The other method is to specify the file,

-f /MythTV/tv/1856_20060425200000.mpg

Rebuild Seektable

Many times the seektable may be bad, or you may do some editing of a recording outside of Myth. In order for Myth to properly FF, RW and seek it needs to have an up to date seektable. If this issue occurrs, you can use mythcommflag as one of the possible tools to repair the seektable.

Note: After rebuilding the seektable, any cutlist you have will no longer be properly synced and should be recreated.

Non Flagging Operations

The following options are mutually exclusive with commercial flagging, and if specified they will cause mythcommflag to perform an action other than commercial flagging.

--video filename Rebuild the seektable for a video (non-recording) file
--rebuild Do not flag commercials, just rebuild seektable
--gencutlist Copy the commercial skip list to the cutlist
--clearcutlist Clear the cutlist
--setcutlist CUTLIST Set a new cutlist.
--getcutlist Display the current cutlist
--blanks Show list of blank frames if already in database

Unimplemented Options

These options appear to be unimplemented or have been removed (as of .20-fixes):

--blanks Show list of blank frames if already in database

Undocumented Options

These options exist in the code (as of .20-fixes), but are not documented in the help message. They are probably for internal use by MythTV.

-O/--override-setting SETTING=VAL[,SETTING=VAL...]

override a setting loaded from the DB, where SETTING can be a variable like CommercialSkipMethod, JobQueueCPU, etc.