Opened 8 years ago

Last modified 5 years ago

#10793 new Patch - Feature

CommFlagger improvements — at Version 1

Reported by: Mark Spieth Owned by: cpinkham
Priority: minor Milestone: unknown
Component: MythTV - Mythcommflag Version: Unspecified
Severity: medium Keywords:
Cc: Ticket locked: no

Description (last modified by Mark Spieth)

This ticket is to share work on comm flagger improvements.

The comm flagger has been working worse for me over time so I decided to have a look at the algorithms.

The main components are:

  1. Command line method parsing fix. Was completely broken. See first patch
  2. Audio silence and change data fusion
  3. Scene changer param change. 0.85 was way too high to get useful scene cut info. Still not sure what the right value is. Debugging procedure to adventurers will follow.

2 and 3 are in the comm-detector-audio patch. This patch is completely independent of the myth libraries so that it is easier to test. There are some enum changes that will eventually make it into libmyth.
Only the all method is implemented.
Audio power min and max dont appear to add anything useful and will probably be removed.

It seems to work better so far for the few Ive tested.

DB Settings to play with (new and old)

Things to do:

  1. Subtitle info fusion
    This should help with segment classification
  2. Logo detector is sporadic. Need to find out why. Some programs (same channel) can find the logo but other can.

Test with

DEBUGCOMMFLAG=1 nice -19 ./mythcommflag --chanid $CHAN --starttime $STARTTIME --loglevel debug --outputmethod full --method all --outputfile output.txt -v commflag --nodblog --logpath .

Grab interesting things parsing the log e.g. for scene change values

cat x.log | perl -e 'print "frame,sc\n"; while (<>) {($x, $y) = /Frame:\s+(\d+) ->\s+\d+\s+\d+\s+\d+\s+(\d+)/; print "$x,$z\n";}' > sc.csv

Plot with your favorite app (I use R from pkg r-base)

sc = read.table("$FILE",sep=",", header=TRUE)
hist(sc\$sc, breaks=100)

Also examine the log for common comm lengths and update CommDetectCommLengths? to suit.

For convenience, convert output.txt to min:seconds with attached

Or just replace the installed mythcommflag with a link to the temp built one.

As always testing is appreciated.

Change History (6)

Changed 8 years ago by Mark Spieth

Attachment: commflag-options.patch added

Changed 8 years ago by Mark Spieth

Attachment: comm-detector-audio.1.patch added

Changed 8 years ago by Mark Spieth

Attachment: added

convert output.txt to min:sec format

Changed 8 years ago by Mark Spieth

Attachment: added

sample script run debug mode mythcommflag in gdb

comment:1 Changed 8 years ago by Mark Spieth

Description: modified (diff)

Changed 8 years ago by Mark Spieth

improved comm detector patch #2

Note: See TracTickets for help on using tickets.