Opened 14 years ago
Last modified 5 years ago
#10793 closed Patch - Feature
CommFlagger improvements — at Initial Version
| Reported by: | Mark Spieth | Owned by: | cpinkham |
|---|---|---|---|
| Priority: | minor | Milestone: | unknown |
| Component: | MythTV - Mythcommflag | Version: | Unspecified |
| Severity: | medium | Keywords: | |
| Cc: | Ticket locked: | no |
Description
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:
- Command line method parsing fix. Was completely broken. See first patch
- Audio silence and change data fusion
- 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)
- CommDetectLargeSceneChangeThreshold defaults to 50 (out of 100)
- CommDetectCommLengths defaults to 15,20,30,40,60 these are the standard commercial lengths. This works for me in AU.
- CommDetectMaxCommLength Ive set to 61 in my DB. Default remains at 125
- CommDetectSceneChangeThreshold now defaults to 60. This used to be 85 and is now parameterized for convenience.
- AggressiveCommDetect Ive set to 0
- CommercialSkipMethod Ive set to 15 for audio support
Things to do:
- Subtitle info fusion
This should help with segment classification - 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)
plot(sc)
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 showoutput.pl
Or just replace the installed mythcommflag with a link to the temp built one.
As always testing is appreciated.
Change History (4)
by , 14 years ago
| Attachment: | commflag-options.patch added |
|---|
by , 14 years ago
| Attachment: | comm-detector-audio.1.patch added |
|---|
by , 14 years ago
| Attachment: | showoutput.pl added |
|---|

convert output.txt to min:sec format