[mythtv-commits] Ticket #10793: CommFlagger improvements
MythTV
noreply at mythtv.org
Sun Jun 3 01:28:38 UTC 2012
#10793: CommFlagger improvements
-----------------------------------+-----------------------------
Reporter: markspieth | Owner: cpinkham
Type: Patch - Feature | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - Mythcommflag | Version: Unspecified
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
-----------------------------------+-----------------------------
Description changed by markspieth:
Old 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:
>
> 1. Command line method parsing fix. Was completely broken. See first
> patch[[BR]]
> 1. Audio silence and change data fusion[[BR]]
> 1. 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.[[BR]]
>
> 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.[[BR]]
> Only the '''all''' method is implemented.[[BR]]
> Audio power min and max dont appear to add anything useful and will
> probably be removed.[[BR]]
>
> 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:[[BR]]
> 1. Subtitle info fusion[[BR]]
> This should help with segment classification
> 1. 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.
New 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:
1. Command line method parsing fix. Was completely broken. See first
patch[[BR]]
2. Audio silence and change data fusion[[BR]]
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.[[BR]]
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.[[BR]]
Only the '''all''' method is implemented.[[BR]]
Audio power min and max dont appear to add anything useful and will
probably be removed.[[BR]]
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:[[BR]]
1. Subtitle info fusion[[BR]]
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)
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.
--
--
Ticket URL: <http://code.mythtv.org/trac/ticket/10793#comment:1>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
More information about the mythtv-commits
mailing list