[mythtv-users] UK commflagging script

Robert Longbottom rongblor at googlemail.com
Tue Feb 1 21:10:51 UTC 2011


On 01/02/2011 10:44, Alex Butcher wrote:
> On Mon, 31 Jan 2011, Alex Butcher wrote:
>
>> I took it upon myself to hack
>> <http://www.mythtv.org/wiki/Silence-detect.sh>
>> into something practical that can actually be used to commflag UK TV
>> recordings. The results of my hacking can be found at
>> <http://www.mythtv.org/wiki/Mythcommflag-wrapper>.
>>
>> Improvements and suggestions welcome.
>
> I've just put a new version up on the wiki.
>
> It fixes all of the TODOs bar implementing a "flag all unflagged
> recordings"
> mode. Maybe when I can trust it to not go haywire... :-)
>
> So it now pulls the MySQL config from mysql.txt, automatically works out
> $RECORDINGSROOT by querying the database for storagegroups, sets a skiplist
> instead of a cutlist (but can optionally copy that skiplist to the cutlist
> automatically), and specifies that bash should be used as I use some
> bash-specific features.
>
> Best Regards,
> Alex

It's looking pretty good now.  The skiplist (rather than cutlist) 
functionality seems to be working nicely, thanks for that.

I've just queued up a load of recordings for commflagging and all but 
one say they've found breaks and the numbers found look reasonable.  I'm 
just watching one now and it's found 3 out of 4 breaks, but the 4th 
break was very short.

There seems to be some kind of problem with re-running commflagging 
(quite an edge case I guess).  I ran it against an episode of Relocation 
Relocation from Channel 4 +1 and it claimed to not find any breaks (this 
was when I'd just queued about 6 recordings for commflagging), so I ran 
it again to get the log output and it seems to have found some breaks 
second time round, but the log reports some errors towards the end (logs 
below).  Although having a quick zap through it does look like it's 
correctly found the breaks, so the maybe the errors are not really 
errors at all.


The only other thing... can you change your callsigns to match mine ;-) 
  I just overwrote the script with the latest and then realised I should 
have taken a copy of the channel whitelist - doh!


It's still the best I've seen commflagging work in Myth here in the UK 
though, so keep up the good work!

Thanks,
Robert.


/usr/bin/mythcommflag run with [-j 4481 -V 3] at Tue Feb  1 20:55:30 GMT 
2011 by mythtv
RECORDINGSROOT=/store/mythtv/recordings/
running job 4481
channel callsign is Channel 4 +1
chanid=9311 STARTTIME=2011-01-20 21:00:00
basename is 9311_20110120210000.mpg
filename is /store/mythtv/recordings/9311_20110120210000.mpg
Callsign in whitelist - will run silence_detect
silence_detect /store/mythtv/recordings/9311_20110120210000.mpg
total frames = -75 (+/- 75)
silence-detect has generated cutlist: 
1--25,12780-18878,38793-44379,68178-74279,88329-75,
silence-detect(): CHANID=9311, STARTTIME=2011-01-20 21:00:00, FRAMES=-75
silect_detect() set CUTLIST to INSERT INTO recordedmarkup 
(chanid,starttime,mark,type) VALUES (9311,'2011-01-20 21:00:00',1,4);
INSERT INTO recordedmarkup (chanid,starttime,mark,type) VALUES 
(9311,'2011-01-20 21:00:00',-25,5);
INSERT INTO recordedmarkup (chanid,starttime,mark,type) VALUES 
(9311,'2011-01-20 21:00:00',12780,4);
INSERT INTO recordedmarkup (chanid,starttime,mark,type) VALUES 
(9311,'2011-01-20 21:00:00',18878,5);
INSERT INTO recordedmarkup (chanid,starttime,mark,type) VALUES 
(9311,'2011-01-20 21:00:00',38793,4);
INSERT INTO recordedmarkup (chanid,starttime,mark,type) VALUES 
(9311,'2011-01-20 21:00:00',44379,5);
INSERT INTO recordedmarkup (chanid,starttime,mark,type) VALUES 
(9311,'2011-01-20 21:00:00',68178,4);
INSERT INTO recordedmarkup (chanid,starttime,mark,type) VALUES 
(9311,'2011-01-20 21:00:00',74279,5);
INSERT INTO recordedmarkup (chanid,starttime,mark,type) VALUES 
(9311,'2011-01-20 21:00:00',88329,4);
INSERT INTO recordedmarkup (chanid,starttime,mark,type) VALUES 
(9311,'2011-01-20 21:00:00',-75,5);
5 break(s) found.
mysql setskiplist returned 1
mythcommflag failed; returned 1




More information about the mythtv-users mailing list