<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-AU link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-GB>With reference to the Commercial detection with silence for UK freeviewHD wiki page at <a href="http://www.mythtv.org/wiki/Commercial_detection_with_silence_for_UK_freeviewHD">http://www.mythtv.org/wiki/Commercial_detection_with_silence_for_UK_freeviewHD</a><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-GB>I&#8217;m new to MythTV so sorry if this is a dumb question or has been covered elsewhere.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-GB>I managed to get the scripts to compile and install with no problems however was not able to get the silence detection to work correctly. It either detected no silences, or every frame as silent depending on the threshold db set with only a very small decimal change required to move from no silences to all silences. There was nothing in between, it was all or nothing.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-GB>Long story short, after much troubleshooting I found that I was having problems with the comparison between the set threshold and the avgabs variable declared in the silence.cpp code.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-GB>I found that if I replaced line 373 of silence.cpp:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><i><span lang=EN-GB>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // determine average audio level in this frame<o:p></o:p></span></i></p><p class=MsoNormal><i><span lang=EN-GB>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; long avgabs = 0;<o:p></o:p></span></i></p><p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-GB>with:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><i><span lang=EN-GB>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // determine average audio level in this frame<o:p></o:p></span></i></p><p class=MsoNormal><i><span lang=EN-GB>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; float avgabs = 0;<o:p></o:p></span></i></p><p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-GB>that the threshold comparison would work correctly and silences were detected correctly. In fact it works very well for me now.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-GB>But I am confused as to why this was causing a problem for me and not for others? Have I missed something else?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-GB>Any assistance or comments appreciated.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p></div></body></html>