[mythtv-users] Commercial Detection
Anthony Giggins
seven at seven.dorksville.net
Fri Mar 9 03:56:10 UTC 2012
On 9 March 2012 13:44, Anthony Giggins <seven at seven.dorksville.net> wrote:
>
>
> On 8 March 2012 20:47, Lawrence Rust <lvr at softsystem.co.uk> wrote:
>
>> On Wed, 2012-03-07 at 23:13 +0000, Thomas Boehm wrote:
>> > Martin Moores wrote:
>> > > On 7 March 2012 21:58, Doug Lytle <support at drdos.info
>> > > <mailto:support at drdos.info>> wrote:
>> > >
>> > >
>> > > And I believe there was an external script based on volume
>> changes on a
>> > > channel that people have reported good results with.
>> > >
>> > >
>> > > Indeed, I never got around to trying that, but many said they had a
>> lot
>> > > of success with it:
>> >
>> > It works very well for me. I changed the script so that it runs on all
>> > channels, not only the white listed ones. If there is really a show
>> > which doesn't get marked properly, I still press the forward button a
>> > few times as I did before, but most of the times it works.
>> >
>> > The mythcommflag which comes with MythTV takes much longer and basically
>> > doesn't work at all in the UK.
>>
>> I use a script based on the wiki article
>> www.mythtv.org/wiki/Mythcommflag-wrapper with good success on most UK
>> Freesat channels.
>>
>> I found that changing the silence threshold to -76 dB from -70
>> significantly improved accuracy. Also, decreasing the coalescence time
>> from 400 to 360 seconds reduced the prevalence of false positives. The
>> last useful tweak is to the awk program to add 'cut to beginning' or
>> 'cut to end' without leaving 'dangling' frames.
>>
>> This generally leaves a few frames of ads/titles before and after each
>> cut. The only annoyance is that the post ad cut doesn't position to a
>> keyframe so the cut isn't entirely invisible. I'm working on that and
>> back tracking from the start of cut to detect a scene change.
>>
>> The script can be found here:
>> http://www.softsystem.co.uk/download/mythtv/mythcommflag-silence.sh
>>
>> To run it as a user job, start mythtv-setup and find General/JobQueue
>> (Global) and set the Ad-detection command:
>> mythcommflag-silence.sh -j %JOBID% -C
>>
>> The -C option copies the list to the cutlist.
>>
>> --
>>
>
> I get an error in this script when running from a command prompt
>
> ./mythcommflag-silence.sh -c 4010 -s "2011-09-29 21:10:00" -i
> /storage3/recordings/4010_20110929211000.mpg
> mythcommflag-silence.sh: line 11: syntax error near unexpected token `cat'
>
> I assume the syntax here is not correct?
>
> Help() cat >&2 <<END
> Detect commercial breaks in a TV recording using silence detection.
> Usage: ${myname##*/} [options]
> Options:
> -b <n> Coalesce ad breaks upto [$MAXCOMMBREAKSECS] Seconds
> -c <n> Channel ID
> -d <f> Min silence duration [$SILENCE_DURATION] Seconds
> -i <path> Recording filename
> -j <n> Job ID
> -s <s> Start-time
> -t <n> Silence threshold [$SILENCE_THRESHOLD] dB (-96..0)
> -C Copy to cutlist [$COPYTOCUTLIST]
> -M <path> MythTV settings folder [$MYTHCONFDIR]
> -h Display this help and exit
> -V Display version and exit
>
> A job ID, channel ID and start-time or a recording filename must be
> specified.
> END
>
>
> Cheers,
>
> Anthony
>
Opps also tried
./mythcommflag-silence.sh -j 10087 -c 4010 -s 2011-09-29 21:10:00
but getting the same error
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.mythtv.org/pipermail/mythtv-users/attachments/20120309/c75700e3/attachment.html
More information about the mythtv-users
mailing list