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