Mailing List Archive

Commercial Flagging (UK, DVB-T)
In all the years I've used mythtv (every release from 0.22 to 0.26) it has *never* detected a commercial break. I've had about 3 false detections, and that's it. I know it must work for other people so my question is, for all UK users, what settings do you use to make it work? And how do I turn on extra debugging in mythcommflag so I can try to figure out why mine doesn't?

Thanks,

Mark
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 10/25/2012 05:23 PM, Mark Greenwood wrote:
> ... And how do I turn on extra debugging in mythcommflag so I can try to figure out why mine doesn't?

Hi;

You get more data with: mythbackend --setverbose commflag and mythbackend --setloglevel debug.
Next time the backend runs mythcommflag, it will log more data. Restore the logging to normal
with mythbackend --setverbose general and mythbackend --setloglevel info.

--
Bill
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On Thu, 25 Oct 2012 23:23:22 +0100, Mark Greenwood <fatgerman@gmail.com>
wrote:

> In all the years I've used mythtv (every release from 0.22 to 0.26) it
> has *never* detected a commercial break. I've had about 3 false
> detections, and that's it. I know it must work for other people so my
> question is, for all UK users, what settings do you use to make it work?

I had the same experience with mythcommflag when I tried it (some time
ago).

However, have you tried http://www.mythtv.org/wiki/Mythcommflag-wrapper ?
I find the silence-detect method works brilliantly most of the time.

The wiki version is for 0.24. I remember having to modify it for 0.25
(IIRC the setcutlist options moved from mythcommflag to mythutil). I
haven't tried it on 0.26 yet.
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 26 October 2012 09:47, Roger Siddons <dizygotheca@ntlworld.com> wrote:

> **
> On Thu, 25 Oct 2012 23:23:22 +0100, Mark Greenwood <fatgerman@gmail.com>
> wrote:
>
> > In all the years I've used mythtv (every release from 0.22 to 0.26) it
> > has *never* detected a commercial break. I've had about 3 false
> > detections, and that's it. I know it must work for other people so my
> > question is, for all UK users, what settings do you use to make it work?
>
> I had the same experience with mythcommflag when I tried it (some time
> ago).
>
> However, have you tried http://www.mythtv.org/wiki/Mythcommflag-wrapper ?
> I find the silence-detect method works brilliantly most of the time.
>
> The wiki version is for 0.24. I remember having to modify it for 0.25
> (IIRC the setcutlist options moved from mythcommflag to mythutil). I
> haven't tried it on 0.26 yet.
>
> silence-detect
works pretty well in Australia too on most channels however the default
commflag and the silent-detect are pretty useless on the HD Channels.

would be nice to see silent-detect added to the inbuilt commflagging as it
could benefit from black screens and logo detection.

Cheers,

Anthony
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
Mark Greenwood wrote:
>... for all UK users, what settings do you use to make it work?

FWIW, I find the defaults do an "OK" job a lot of the time. It does vary ...

On ITV1 I find it's hit and miss between mostly OK and no point. But
on imports from the USA (CSI*, Ice Road Truckers, and that sort of
thing) it tends to work fairly well - well enough that I've not got
annoyed enough to try anything else.

Now there was a request on this list a short while ago for samples of
stuff that didn't commflag properly - must go back and figure out who
it was. So I have kept some examples. I just found myself with an
"unexpected project" which left me with no spare time to pull out the
database entries or note the correct cut-points to go with them.

--
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
Quoting Roger Siddons <dizygotheca@ntlworld.com>:
> However, have you tried
> http://www.mythtv.org/wiki/Mythcommflag-wrapper ? I find the
> silence-detect method works brilliantly most of the time.

My contribution to MythTV is here:

http://www.mythtv.org/wiki/Commercial_detection_with_silence_for_UK_freeviewHD

It's based on the one above but works on DVB-T2 as well, does not need
to transcode the audio stream and can be run in realtime. I've not
figured out how to get it to update the frontends as it progresses yet
(help needed).

It works on all the Freeview channels I receive but don't try it on
cartoons/animation they have silences that confuse it.

Cheers,
Tim.


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 26 Oct 2012, at 09:22, Tim Phipps wrote:

>
> Quoting Roger Siddons <dizygotheca@ntlworld.com>:
>> However, have you tried http://www.mythtv.org/wiki/Mythcommflag-wrapper ? I find the silence-detect method works brilliantly most of the time.
>
> My contribution to MythTV is here:
>
> http://www.mythtv.org/wiki/Commercial_detection_with_silence_for_UK_freeviewHD
>
> It's based on the one above but works on DVB-T2 as well, does not need to transcode the audio stream and can be run in realtime. I've not figured out how to get it to update the frontends as it progresses yet (help needed).
>
> It works on all the Freeview channels I receive but don't try it on cartoons/animation they have silences that confuse it.

That looks really interesting Tim, I'd love to give it a try. However you'll have to help me with :

Compile the two C programs

This non-C programmer needs more information. Save the two files somewhere and then type…. what?

Cheers,

Mark

>
> Cheers,
> Tim.
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
Quoting Mark Greenwood <fatgerman@gmail.com>:

> On 26 Oct 2012, at 09:22, Tim Phipps wrote:
>
> That looks really interesting Tim, I'd love to give it a try.
> However you'll have to help me with :
>
> Compile the two C programs
>
> This non-C programmer needs more information. Save the two files
> somewhere and then type?. what?

Good point. Save the files to catagrower.c and mausc.c the run:

gcc -std=c99 -Wall -Wextra -Werror -O catagrower.c -o catagrower
gcc -std=c99 -Wall -Wextra -Werror -O mausc.c -o mausc -lsndfile -lm

Then copy catagrowr and masuc to /usr/local/bin.

Cheers,
Tim.


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 26 Oct 2012, at 09:55, Tim Phipps wrote:

>
> Quoting Mark Greenwood <fatgerman@gmail.com>:
>
>> On 26 Oct 2012, at 09:22, Tim Phipps wrote:
>>
>> That looks really interesting Tim, I'd love to give it a try. However you'll have to help me with :
>>
>> Compile the two C programs
>>
>> This non-C programmer needs more information. Save the two files somewhere and then type?. what?
>
> Good point. Save the files to catagrower.c and mausc.c the run:
>
> gcc -std=c99 -Wall -Wextra -Werror -O catagrower.c -o catagrower
> gcc -std=c99 -Wall -Wextra -Werror -O mausc.c -o mausc -lsndfile -lm

Actually not that good a point, since I've just noticed all that information is in the comments at the start of each file :) Must put glasses on before looking at screen..

Thanks though, I'm going to give this a try now, I'll post pack with how I got on.

Mark

>
> Then copy catagrowr and masuc to /usr/local/bin.
>
> Cheers,
> Tim.
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 26 Oct 2012, at 09:55, Tim Phipps wrote:

>
> Quoting Mark Greenwood <fatgerman@gmail.com>:
>
>> On 26 Oct 2012, at 09:22, Tim Phipps wrote:
>>
>> That looks really interesting Tim, I'd love to give it a try. However you'll have to help me with :
>>
>> Compile the two C programs
>>
>> This non-C programmer needs more information. Save the two files somewhere and then type?. what?
>
> Good point. Save the files to catagrower.c and mausc.c the run:
>
> gcc -std=c99 -Wall -Wextra -Werror -O catagrower.c -o catagrower

Ah.

gcc -std=c99 -Wall -Wextra -Werror -O catagrower.c -o catagrower
catagrower.c: In function ‘main’:
catagrower.c:46:13: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result]
cc1: all warnings being treated as errors

My knowledge of C being what it isn't, I'm stumped by even the simplest cryptic messages from compilers. I compiled it again without the -Werror because I don't think this error/warning actually matters, and carried on.

> gcc -std=c99 -Wall -Wextra -Werror -O mausc.c -o mausc -lsndfile -lm

This compiled OK, once I noticed I needed libsndfile1-dev installed.

Where your instructions say

Follow the instructions on Mythcommflag-wrapper.

I assume this means to change the Advert-detection command in the backend setup to '/usr/local/bin/mausc_wrapper.py -j %JOBID% -V 0'

I then went to my recorded programs and started commercial flagging for one of them. Nothing appears to be happening. There's nothing in any log anywhere… so I'm not sure if it's working or not. Other than watching the show to see if it has commercial breaks detected, what else can I look for?

Cheers,

Mark


>
> Then copy catagrowr and masuc to /usr/local/bin.
>
> Cheers,
> Tim.
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
Quoting Mark Greenwood <fatgerman@gmail.com>:

> My knowledge of C being what it isn't, I'm stumped by even the
> simplest cryptic messages from compilers. I compiled it again
> without the -Werror because I don't think this error/warning
> actually matters, and carried on.

Yes, I'll take that out of the wiki. bit rot strikes again.

>
> Where your instructions say
>
> Follow the instructions on Mythcommflag-wrapper.
>
> I assume this means to change the Advert-detection command in the
> backend setup to '/usr/local/bin/mausc_wrapper.py -j %JOBID% -V 0'

It should be '/usr/local/bin/mausc_wrapper.py %JOBID%'. That's me
being lazy and not adding in enough options.

I'll put that in the wiki too.

>
> I then went to my recorded programs and started commercial flagging
> for one of them. Nothing appears to be happening. There's nothing in
> any log anywhere? so I'm not sure if it's working or not. Other than
> watching the show to see if it has commercial breaks detected, what
> else can I look for?

Once you change the backend settings make sure the channel is not
marked as commercial-free or it won't run. If you have mythweb set up
you should be able to see it in the backend status page job queue
section.

Cheers,
Tim.


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 26 October 2012 07:54, Simon Hobson <linux@thehobsons.co.uk> wrote:

>
> Now there was a request on this list a short while ago for samples of
> stuff that didn't commflag properly - must go back and figure out who it
> was. So I have kept some examples. I just found myself with an "unexpected
> project" which left me with no spare time to pull out the database entries
> or note the correct cut-points to go with them.
>
>
It was Gavin Hurlbut (gjhurlbu@gmail.com), I've got some samples together,
just not sent them off yet, trying to get a good range of stuff.

I use the silence detect on mine, apart from channel 5 that has mostly US
stuff and seems to work better with default myth options. Don't remember
having to modify it at all like Roger said, haven't had any errors, so
think it is still working, best check though!

Thanks for the script Tim, will have to give that a go now I have HD
channels

Cheers

Martin
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 26 Oct 2012, at 11:59, Martin Moores wrote:

> On 26 October 2012 07:54, Simon Hobson <linux@thehobsons.co.uk> wrote:
>
> Now there was a request on this list a short while ago for samples of stuff that didn't commflag properly - must go back and figure out who it was. So I have kept some examples. I just found myself with an "unexpected project" which left me with no spare time to pull out the database entries or note the correct cut-points to go with them.
>
>
> It was Gavin Hurlbut (gjhurlbu@gmail.com), I've got some samples together, just not sent them off yet, trying to get a good range of stuff.

I could supply …. anything I've ever recorded. What info does he need?

>
> I use the silence detect on mine, apart from channel 5 that has mostly US stuff and seems to work better with default myth options. Don't remember having to modify it at all like Roger said, haven't had any errors, so think it is still working, best check though!

Well, mythcommflag-wrapper has just found commercial breaks in two programs for me, correctly and quickly. This is the first time in, what, 4 years that myth has found any adverts so I'm quite happy.

>
> Thanks for the script Tim, will have to give that a go now I have HD channels

Unfortunately it's not working for me Tim (on SD channels), it seems from what I can tell that it exits very quickly so I'm thinking it's probably not doing anything. However it's also not generating any log messages anywhere that I know to look (/var/log/mythtv) so I'm stuck for where to go next.

Cheers,

Mark

>
> Cheers
>
> Martin
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
Quoting Mark Greenwood <fatgerman@gmail.com>:
>
> Unfortunately it's not working for me Tim (on SD channels), it seems
> from what I can tell that it exits very quickly so I'm thinking it's
> probably not doing anything. However it's also not generating any
> log messages anywhere that I know to look (/var/log/mythtv) so I'm
> stuck for where to go next.

You can run it from the command line (same user as mythbackend):

mausc-wrapper.py --chanid 1010 --starttime 20121025205800

will operate on the file 1010_20121025205800.mpg in the recordings
directory and it should print out the breaks that it finds.

Cheers,
Tim.


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 26 October 2012 12:17, Mark Greenwood <fatgerman@gmail.com> wrote:

>
> I could supply …. anything I've ever recorded. What info does he need?
>

A USB stick with the full original recordings on and info on what channel
they were from. I was thinking that it may be cheaper to post samples from
one of us in the UK, but looking on Royal Mail, it's only £3 for a 100g
small packet. I do assume Gavin still has this on the cards, it was a
while since it was last discussed and I got his address

Martin
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 26 Oct 2012, at 12:17, Mark Greenwood wrote:

>
> On 26 Oct 2012, at 11:59, Martin Moores wrote:
>
>> On 26 October 2012 07:54, Simon Hobson <linux@thehobsons.co.uk> wrote:
>>
>> Now there was a request on this list a short while ago for samples of stuff that didn't commflag properly - must go back and figure out who it was. So I have kept some examples. I just found myself with an "unexpected project" which left me with no spare time to pull out the database entries or note the correct cut-points to go with them.
>>
>>
>> It was Gavin Hurlbut (gjhurlbu@gmail.com), I've got some samples together, just not sent them off yet, trying to get a good range of stuff.
>
> I could supply …. anything I've ever recorded. What info does he need?
>
>>
>> I use the silence detect on mine, apart from channel 5 that has mostly US stuff and seems to work better with default myth options. Don't remember having to modify it at all like Roger said, haven't had any errors, so think it is still working, best check though!
>
> Well, mythcommflag-wrapper has just found commercial breaks in two programs for me, correctly and quickly. This is the first time in, what, 4 years that myth has found any adverts so I'm quite happy.
>
>>
>> Thanks for the script Tim, will have to give that a go now I have HD channels
>
> Unfortunately it's not working for me Tim (on SD channels), it seems from what I can tell that it exits very quickly so I'm thinking it's probably not doing anything. However it's also not generating any log messages anywhere that I know to look (/var/log/mythtv) so I'm stuck for where to go next.

OK, so

Commflag_35 jobqueue.cpp:2281 (DoFlagCommercialsThread) JobQueue: Commercial Detection Starting for "The Inbetweeners":"The First Day" recorded from channel 1029 at 2012-10-23T23:05:00Z

When I then try :
mausc_wrapper.py --chanid=1029 --starttime=2012-10-23T23:05:00Z
Local access to recording not found.

mausc_wrapper.py --chanid=1029 --starttime=2012-10-23T23:05:00
Could not find recording.

I wonder if this has anything to do with the recent change to everything being in UTC?

Mark

>
> Cheers,
>
> Mark
>
>>
>> Cheers
>>
>> Martin
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users@mythtv.org
>> http://www.mythtv.org/mailman/listinfo/mythtv-users
>
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 26 October 2012 12:49, Mark Greenwood <fatgerman@gmail.com> wrote:

OK, so
>
> Commflag_35 jobqueue.cpp:2281 (DoFlagCommercialsThread) JobQueue:
> Commercial Detection Starting for "The Inbetweeners":"The First Day"
> recorded from channel 1029 at 2012-10-23T23:05:00Z
>
> When I then try :
> mausc_wrapper.py --chanid=1029 --starttime=2012-10-23T23:05:00Z
> Local access to recording not found.
>
> mausc_wrapper.py --chanid=1029 --starttime=2012-10-23T23:05:00
> Could not find recording.
>
> I wonder if this has anything to do with the recent change to everything
> being in UTC?
>
> Mark
>

Most likely. Worth having a read through a recent thread where I went
through these UTC issues:

http://www.gossamer-threads.com/lists/mythtv/users/529131

Martin
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 26/10/2012 3:04 PM, Anthony Giggins wrote:
>
>
> On 26 October 2012 09:47, Roger Siddons <dizygotheca@ntlworld.com
> <mailto:dizygotheca@ntlworld.com>> wrote:
>
> On Thu, 25 Oct 2012 23:23:22 +0100, Mark Greenwood
> <fatgerman@gmail.com <mailto:fatgerman@gmail.com>> wrote:
>
> > In all the years I've used mythtv (every release from 0.22 to
> 0.26) it
> > has *never* detected a commercial break. I've had about 3 false
> > detections, and that's it. I know it must work for other people
> so my
> > question is, for all UK users, what settings do you use to make
> it work?
>
> I had the same experience with mythcommflag when I tried it (some
> time ago).
>
> However, have you tried
> http://www.mythtv.org/wiki/Mythcommflag-wrapper ? I find the
> silence-detect method works brilliantly most of the time.
>
> The wiki version is for 0.24. I remember having to modify it for
> 0.25 (IIRC the setcutlist options moved from mythcommflag to
> mythutil). I haven't tried it on 0.26 yet.
>
> silence-detect
> works pretty well in Australia too on most channels however the
> default commflag and the silent-detect are pretty useless on the HD
> Channels.

What settings do you use for silence detect in Australia? I had very
got very poor results when I played with it
>
> would be nice to see silent-detect added to the inbuilt commflagging
> as it could benefit from black screens and logo detection.
>
> Cheers,
>
> Anthony
>

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
Quoting Mark Greenwood <fatgerman@gmail.com>:
> OK, so
>
> Commflag_35 jobqueue.cpp:2281 (DoFlagCommercialsThread) JobQueue:
> Commercial Detection Starting for "The Inbetweeners":"The First Day"
> recorded from channel 1029 at 2012-10-23T23:05:00Z
>
> When I then try :
> mausc_wrapper.py --chanid=1029 --starttime=2012-10-23T23:05:00Z
> Local access to recording not found.
>
> mausc_wrapper.py --chanid=1029 --starttime=2012-10-23T23:05:00
> Could not find recording.
>
Possibly. I'm still on 0.25 till the weekend. Hopefully I can figure
out a way to get the script to work with both 0.25 and 0.26. The
second error happens when the script can't find the database entry for
the recording. The first error does find the db row so the syntax used
in the first example is correct but then it fails to find the actual
file. Are you running this on the same machine as the backend that
made the recording?

Cheers,
Tim.


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 26 Oct 2012, at 13:46, Tim Phipps wrote:

> Quoting Mark Greenwood <fatgerman@gmail.com>:
>> OK, so
>>
>> Commflag_35 jobqueue.cpp:2281 (DoFlagCommercialsThread) JobQueue: Commercial Detection Starting for "The Inbetweeners":"The First Day" recorded from channel 1029 at 2012-10-23T23:05:00Z
>>
>> When I then try :
>> mausc_wrapper.py --chanid=1029 --starttime=2012-10-23T23:05:00Z
>> Local access to recording not found.
>>
>> mausc_wrapper.py --chanid=1029 --starttime=2012-10-23T23:05:00
>> Could not find recording.
>>
> Possibly. I'm still on 0.25 till the weekend. Hopefully I can figure out a way to get the script to work with both 0.25 and 0.26. The second error happens when the script can't find the database entry for the recording. The first error does find the db row so the syntax used in the first example is correct but then it fails to find the actual file. Are you running this on the same machine as the backend that made the recording?

Yes, same machine (well through an ssh session from another machine but I don't think that matters). The recordings in the directory all have names like '1029_201212367300.mpg', not sure if that's relevant.

Cheers

Mark

>
> Cheers,
> Tim.
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 26/10/12 14:08, Mark Greenwood wrote:
>
> On 26 Oct 2012, at 13:46, Tim Phipps wrote:
>
>> Quoting Mark Greenwood <fatgerman@gmail.com>:
>>> OK, so
>>>
>>> Commflag_35 jobqueue.cpp:2281 (DoFlagCommercialsThread) JobQueue: Commercial Detection Starting for "The Inbetweeners":"The First Day" recorded from channel 1029 at 2012-10-23T23:05:00Z
>>>
>>> When I then try :
>>> mausc_wrapper.py --chanid=1029 --starttime=2012-10-23T23:05:00Z
>>> Local access to recording not found.
>>>
>>> mausc_wrapper.py --chanid=1029 --starttime=2012-10-23T23:05:00
>>> Could not find recording.

Can it find --starttime=2012-10-23T23:06:00, which would be the local
time in the UK? Or --starttime 201210230600 or perhaps 20121023060000 ?

Do you have a mix of 0.25 and 0.26?

>>>
>> Possibly. I'm still on 0.25 till the weekend. Hopefully I can figure out a way to get the script to work with both 0.25 and 0.26. The second error happens when the script can't find the database entry for the recording. The first error does find the db row so the syntax used in the first example is correct but then it fails to find the actual file. Are you running this on the same machine as the backend that made the recording?
>
> Yes, same machine (well through an ssh session from another machine but I don't think that matters). The recordings in the directory all have names like '1029_201212367300.mpg', not sure if that's relevant.

Well, if you copied that filename something is very wrong,
>
> Cheers
>
> Mark
>
>>
>> Cheers,
>> Tim.
>>

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 26/10/12 15:05, John Pilkington wrote:
> On 26/10/12 14:08, Mark Greenwood wrote:
>>
>> On 26 Oct 2012, at 13:46, Tim Phipps wrote:
>>
>>> Quoting Mark Greenwood <fatgerman@gmail.com>:
>>>> OK, so
>>>>
>>>> Commflag_35 jobqueue.cpp:2281 (DoFlagCommercialsThread) JobQueue:
>>>> Commercial Detection Starting for "The Inbetweeners":"The First Day"
>>>> recorded from channel 1029 at 2012-10-23T23:05:00Z
>>>>
>>>> When I then try :
>>>> mausc_wrapper.py --chanid=1029 --starttime=2012-10-23T23:05:00Z
>>>> Local access to recording not found.
>>>>
>>>> mausc_wrapper.py --chanid=1029 --starttime=2012-10-23T23:05:00
>>>> Could not find recording.
>
> Can it find --starttime=2012-10-23T23:06:00, which would be the local
> time in the UK? Or --starttime 201210230600 or perhaps 20121023060000 ?
>
> Do you have a mix of 0.25 and 0.26?
>
I had better correct that. It's 20121024000500 :-)

>>>>
>>> Possibly. I'm still on 0.25 till the weekend. Hopefully I can figure
>>> out a way to get the script to work with both 0.25 and 0.26. The
>>> second error happens when the script can't find the database entry
>>> for the recording. The first error does find the db row so the syntax
>>> used in the first example is correct but then it fails to find the
>>> actual file. Are you running this on the same machine as the backend
>>> that made the recording?
>>
>> Yes, same machine (well through an ssh session from another machine
>> but I don't think that matters). The recordings in the directory all
>> have names like '1029_201212367300.mpg', not sure if that's relevant.
>
> Well, if you copied that filename something is very wrong,
>>
>> Cheers
>>
>> Mark
>>
>>>
>>> Cheers,
>>> Tim.
>>>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 26 Oct 2012, at 15:05, John Pilkington wrote:

> On 26/10/12 14:08, Mark Greenwood wrote:
>>
>> On 26 Oct 2012, at 13:46, Tim Phipps wrote:
>>
>>> Quoting Mark Greenwood <fatgerman@gmail.com>:
>>>> OK, so
>>>>
>>>> Commflag_35 jobqueue.cpp:2281 (DoFlagCommercialsThread) JobQueue: Commercial Detection Starting for "The Inbetweeners":"The First Day" recorded from channel 1029 at 2012-10-23T23:05:00Z
>>>>
>>>> When I then try :
>>>> mausc_wrapper.py --chanid=1029 --starttime=2012-10-23T23:05:00Z
>>>> Local access to recording not found.
>>>>
>>>> mausc_wrapper.py --chanid=1029 --starttime=2012-10-23T23:05:00
>>>> Could not find recording.
>
> Can it find --starttime=2012-10-23T23:06:00, which would be the local time in the UK? Or --starttime 201210230600 or perhaps 20121023060000 ?
>

cd lib/mythtv/recordings/
ls
1006_20121025221500.mpg 1012_20121025200000.mpg.png 1029_20121023230500.mpg 1029_20121023233500.mpg
1006_20121025221500.mpg.png 1015_20121025200000.mpg 1029_20121023230500.mpg.-1.100x56.png 1029_20121023233500.mpg.-1.100x56.png
1012_20121025200000.mpg 1015_20121025200000.mpg.png 1029_20121023230500.mpg.png 1029_20121023233500.mpg.png

mausc_wrapper.py --chanid=1029 --starttime=20121023230500
Could not find recording

Anything I've tried other than the first line I posted gives me 'Could not find recording'. So it's finding the recording in the database, but can't find the associated file. Which is odd, because I just watched it.

> Do you have a mix of 0.25 and 0.26?

I originally installed 0.25 (from the mythbuntu 12.04 installation) but before doing any setup I enabled the repository for the 0.26 release and did a full upgrade. So although I installed 0.25 initially, I did no configuration or recording with that version. Have I missed a step? Or does it look like the upgrade didn't quite work?

>>> Possibly. I'm still on 0.25 till the weekend. Hopefully I can figure out a way to get the script to work with both 0.25 and 0.26. The second error happens when the script can't find the database entry for the recording. The first error does find the db row so the syntax used in the first example is correct but then it fails to find the actual file. Are you running this on the same machine as the backend that made the recording?
>>
>> Yes, same machine (well through an ssh session from another machine but I don't think that matters). The recordings in the directory all have names like '1029_201212367300.mpg', not sure if that's relevant.
>
> Well, if you copied that filename something is very wrong,

Sorry, that was just a bunch of random numbers :)

Mark

>>
>> Cheers
>>
>> Mark
>>
>>>
>>> Cheers,
>>> Tim.
>>>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 26 Oct 2012, at 15:11, John Pilkington wrote:

> On 26/10/12 15:05, John Pilkington wrote:
>> On 26/10/12 14:08, Mark Greenwood wrote:
>>>
>>> On 26 Oct 2012, at 13:46, Tim Phipps wrote:
>>>
>>>> Quoting Mark Greenwood <fatgerman@gmail.com>:
>>>>> OK, so
>>>>>
>>>>> Commflag_35 jobqueue.cpp:2281 (DoFlagCommercialsThread) JobQueue:
>>>>> Commercial Detection Starting for "The Inbetweeners":"The First Day"
>>>>> recorded from channel 1029 at 2012-10-23T23:05:00Z
>>>>>
>>>>> When I then try :
>>>>> mausc_wrapper.py --chanid=1029 --starttime=2012-10-23T23:05:00Z
>>>>> Local access to recording not found.
>>>>>
>>>>> mausc_wrapper.py --chanid=1029 --starttime=2012-10-23T23:05:00
>>>>> Could not find recording.
>>
>> Can it find --starttime=2012-10-23T23:06:00, which would be the local
>> time in the UK? Or --starttime 201210230600 or perhaps 20121023060000 ?
>>
>> Do you have a mix of 0.25 and 0.26?
>>
> I had better correct that. It's 20121024000500 :-)

:-) I didn't spot that either. using that gives me the 'Local access to recording not found' error.

So, putting some print statements in, in the style of all the best script monkeys :), I find that

rec.basename = 1029_20121023230500.mpg - a file which exists
rec.storagegroup = Default

The Default storage group points to /var/lib/mythtv/recordings, which is where the file is. But findfile(rec.basename, rec.storagegroup, db=db) returns 'None'.

Mark

>
>>>>>
>>>> Possibly. I'm still on 0.25 till the weekend. Hopefully I can figure
>>>> out a way to get the script to work with both 0.25 and 0.26. The
>>>> second error happens when the script can't find the database entry
>>>> for the recording. The first error does find the db row so the syntax
>>>> used in the first example is correct but then it fails to find the
>>>> actual file. Are you running this on the same machine as the backend
>>>> that made the recording?
>>>
>>> Yes, same machine (well through an ssh session from another machine
>>> but I don't think that matters). The recordings in the directory all
>>> have names like '1029_201212367300.mpg', not sure if that's relevant.
>>
>> Well, if you copied that filename something is very wrong,
>>>
>>> Cheers
>>>
>>> Mark
>>>
>>>>
>>>> Cheers,
>>>> Tim.
>>>>
>>
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users@mythtv.org
>> http://www.mythtv.org/mailman/listinfo/mythtv-users
>>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 26 Oct 2012, at 16:04, Mark Greenwood wrote:

>
> On 26 Oct 2012, at 15:11, John Pilkington wrote:
>
>> On 26/10/12 15:05, John Pilkington wrote:
>>> On 26/10/12 14:08, Mark Greenwood wrote:
>>>>
>>>> On 26 Oct 2012, at 13:46, Tim Phipps wrote:
>>>>
>>>>> Quoting Mark Greenwood <fatgerman@gmail.com>:
>>>>>> OK, so
>>>>>>
>>>>>> Commflag_35 jobqueue.cpp:2281 (DoFlagCommercialsThread) JobQueue:
>>>>>> Commercial Detection Starting for "The Inbetweeners":"The First Day"
>>>>>> recorded from channel 1029 at 2012-10-23T23:05:00Z
>>>>>>
>>>>>> When I then try :
>>>>>> mausc_wrapper.py --chanid=1029 --starttime=2012-10-23T23:05:00Z
>>>>>> Local access to recording not found.
>>>>>>
>>>>>> mausc_wrapper.py --chanid=1029 --starttime=2012-10-23T23:05:00
>>>>>> Could not find recording.
>>>
>>> Can it find --starttime=2012-10-23T23:06:00, which would be the local
>>> time in the UK? Or --starttime 201210230600 or perhaps 20121023060000 ?
>>>
>>> Do you have a mix of 0.25 and 0.26?
>>>
>> I had better correct that. It's 20121024000500 :-)
>
> :-) I didn't spot that either. using that gives me the 'Local access to recording not found' error.
>
> So, putting some print statements in, in the style of all the best script monkeys :), I find that
>
> rec.basename = 1029_20121023230500.mpg - a file which exists
> rec.storagegroup = Default
>
> The Default storage group points to /var/lib/mythtv/recordings, which is where the file is. But findfile(rec.basename, rec.storagegroup, db=db) returns 'None'.

Right, found what I suspect is a bug in the python bindings for 0.26

The script calls

sg = findfile(rec.basename, rec.storagegroup, db=db)

But in the source I find:

def findfile(filename, sgroup, db=None):
"""
findfile(filename, sgroup, db=None) -> StorageGroup object

Will search through all matching storage groups, searching for file.
Returns matching storage group upon success.
"""
db = DBCache(db)
for sg in db.getStorageGroup(groupname=sgroup):
# search given group
if sg.local:
if os.access(sg.dirname+filename, os.F_OK):
return sg

Now, thanks to some debugging I find

sg.dirname+filename == /var/lib/mythtv/recordings1029_20121023230500.mpg

So, change the call to

sg = findfile('/'+rec.basename, rec.storagegroup, db=db)

and the script runs. (Haven't yet checked whether it has found the breaks correctly)

Looks like sg.dirname is stripping a trailing slash where it shouldn't. Where should I report this?

Mark




>
> Mark
>
>>
>>>>>>
>>>>> Possibly. I'm still on 0.25 till the weekend. Hopefully I can figure
>>>>> out a way to get the script to work with both 0.25 and 0.26. The
>>>>> second error happens when the script can't find the database entry
>>>>> for the recording. The first error does find the db row so the syntax
>>>>> used in the first example is correct but then it fails to find the
>>>>> actual file. Are you running this on the same machine as the backend
>>>>> that made the recording?
>>>>
>>>> Yes, same machine (well through an ssh session from another machine
>>>> but I don't think that matters). The recordings in the directory all
>>>> have names like '1029_201212367300.mpg', not sure if that's relevant.
>>>
>>> Well, if you copied that filename something is very wrong,
>>>>
>>>> Cheers
>>>>
>>>> Mark
>>>>
>>>>>
>>>>> Cheers,
>>>>> Tim.
>>>>>
>>>
>>> _______________________________________________
>>> mythtv-users mailing list
>>> mythtv-users@mythtv.org
>>> http://www.mythtv.org/mailman/listinfo/mythtv-users
>>>
>>
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users@mythtv.org
>> http://www.mythtv.org/mailman/listinfo/mythtv-users
>

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 26/10/12 10:34 PM, Tim Phipps wrote:
> Quoting Mark Greenwood <fatgerman@gmail.com>:
>>
>> Unfortunately it's not working for me Tim (on SD channels), it seems
>> from what I can tell that it exits very quickly so I'm thinking it's
>> probably not doing anything. However it's also not generating any log
>> messages anywhere that I know to look (/var/log/mythtv) so I'm stuck
>> for where to go next.
>
> You can run it from the command line (same user as mythbackend):
>
> mausc-wrapper.py --chanid 1010 --starttime 20121025205800
>
> will operate on the file 1010_20121025205800.mpg in the recordings
> directory and it should print out the breaks that it finds.
>
> Cheers,
> Tim.
>
I'm really keen to give this a go (in Australia), but I appear to be
having some python troubles:

# ./mausc-wrapper 24367
Traceback (most recent call last):
File "./mausc-wrapper", line 106, in <module>
main()
File "./mausc-wrapper", line 97, in main
runjob(jobid=args[0])
File "./mausc-wrapper", line 18, in runjob
db = MythDB()
File "/usr/lib/pymodules/python2.6/MythTV/database.py", line 965, in
__init__
dbconn = xml.getConnectionInfo(pin)
File "/usr/lib/pymodules/python2.6/MythTV/connections.py", line 619,
in getConnectionInfo
dat = self._request('Myth/GetConnectionInfo', Pin=pin).readJSON()
File "/usr/lib/pymodules/python2.6/MythTV/connections.py", line 607,
in _request
for k,v in keyvars.items()])
File "/usr/lib/python2.6/urllib.py", line 1234, in quote
res = map(safe_map.__getitem__, s)
TypeError: argument 2 to map() must support iteration

What version of python are you running (and maybe what distro)? I'm on
mythbuntu lucid and I can't seem to get past this problem.
I've checked that my python2.6 packages are all up to date, as well as
my libmyth-python (2:0.25.2+fixes.20121002.139bd59-0ubuntu0mythbuntu1)

Cheers,
Andrew
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 27 Oct 2012, at 07:56, Andrew Leech wrote:

> On 26/10/12 10:34 PM, Tim Phipps wrote:
>> Quoting Mark Greenwood <fatgerman@gmail.com>:
>>>
>>> Unfortunately it's not working for me Tim (on SD channels), it seems from what I can tell that it exits very quickly so I'm thinking it's probably not doing anything. However it's also not generating any log messages anywhere that I know to look (/var/log/mythtv) so I'm stuck for where to go next.
>>
>> You can run it from the command line (same user as mythbackend):
>>
>> mausc-wrapper.py --chanid 1010 --starttime 20121025205800
>>
>> will operate on the file 1010_20121025205800.mpg in the recordings directory and it should print out the breaks that it finds.
>>
>> Cheers,
>> Tim.
>>
> I'm really keen to give this a go (in Australia), but I appear to be having some python troubles:
>
> # ./mausc-wrapper 24367
> Traceback (most recent call last):
> File "./mausc-wrapper", line 106, in <module>
> main()
> File "./mausc-wrapper", line 97, in main
> runjob(jobid=args[0])
> File "./mausc-wrapper", line 18, in runjob
> db = MythDB()
> File "/usr/lib/pymodules/python2.6/MythTV/database.py", line 965, in __init__
> dbconn = xml.getConnectionInfo(pin)
> File "/usr/lib/pymodules/python2.6/MythTV/connections.py", line 619, in getConnectionInfo
> dat = self._request('Myth/GetConnectionInfo', Pin=pin).readJSON()
> File "/usr/lib/pymodules/python2.6/MythTV/connections.py", line 607, in _request
> for k,v in keyvars.items()])
> File "/usr/lib/python2.6/urllib.py", line 1234, in quote
> res = map(safe_map.__getitem__, s)
> TypeError: argument 2 to map() must support iteration
>
> What version of python are you running (and maybe what distro)? I'm on mythbuntu lucid and I can't seem to get past this problem.
> I've checked that my python2.6 packages are all up to date, as well as my libmyth-python (2:0.25.2+fixes.20121002.139bd59-0ubuntu0mythbuntu1)

I'm using mythbuntu 12.04.1, which has python 2.7.3. I'm no python expert I'm afraid so I don't know what your error means.

Cheers,

Mark

>
> Cheers,
> Andrew
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 27/10/12 9:24 PM, Mark Greenwood wrote:
> On 27 Oct 2012, at 07:56, Andrew Leech wrote:
>
>> On 26/10/12 10:34 PM, Tim Phipps wrote:
>>> Quoting Mark Greenwood <fatgerman@gmail.com>:
>>>> Unfortunately it's not working for me Tim (on SD channels), it seems from what I can tell that it exits very quickly so I'm thinking it's probably not doing anything. However it's also not generating any log messages anywhere that I know to look (/var/log/mythtv) so I'm stuck for where to go next.
>>> You can run it from the command line (same user as mythbackend):
>>>
>>> mausc-wrapper.py --chanid 1010 --starttime 20121025205800
>>>
>>> will operate on the file 1010_20121025205800.mpg in the recordings directory and it should print out the breaks that it finds.
>>>
>>> Cheers,
>>> Tim.
>>>
>> I'm really keen to give this a go (in Australia), but I appear to be having some python troubles:
>>
>> # ./mausc-wrapper 24367
>> Traceback (most recent call last):
>> File "./mausc-wrapper", line 106, in <module>
>> main()
>> File "./mausc-wrapper", line 97, in main
>> runjob(jobid=args[0])
>> File "./mausc-wrapper", line 18, in runjob
>> db = MythDB()
>> File "/usr/lib/pymodules/python2.6/MythTV/database.py", line 965, in __init__
>> dbconn = xml.getConnectionInfo(pin)
>> File "/usr/lib/pymodules/python2.6/MythTV/connections.py", line 619, in getConnectionInfo
>> dat = self._request('Myth/GetConnectionInfo', Pin=pin).readJSON()
>> File "/usr/lib/pymodules/python2.6/MythTV/connections.py", line 607, in _request
>> for k,v in keyvars.items()])
>> File "/usr/lib/python2.6/urllib.py", line 1234, in quote
>> res = map(safe_map.__getitem__, s)
>> TypeError: argument 2 to map() must support iteration
>>
>> What version of python are you running (and maybe what distro)? I'm on mythbuntu lucid and I can't seem to get past this problem.
>> I've checked that my python2.6 packages are all up to date, as well as my libmyth-python (2:0.25.2+fixes.20121002.139bd59-0ubuntu0mythbuntu1)
> I'm using mythbuntu 12.04.1, which has python 2.7.3. I'm no python expert I'm afraid so I don't know what your error means.
>
> Cheers,
>
> Mark
Thanks for that, it gives me an avenue to try seeing as you're on a
different version. I'll try getting a backport of 2.7.3 as a first step,
and if I get some time I might look at upgrading my system, it's been a
while since it's had one.

Regards,
Andrew

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
Quoting Andrew Leech <coronasensei@gmail.com>:
> On 27/10/12 9:24 PM, Mark Greenwood wrote:
>> On 27 Oct 2012, at 07:56, Andrew Leech wrote:
>>> File "./mausc-wrapper", line 18, in runjob
>>> db = MythDB()
>>> <deleted>
>>> as my libmyth-python (2:0.25.2+fixes.20121002.139bd59-0ubuntu0mythbuntu1)
>> I'm using mythbuntu 12.04.1, which has python 2.7.3. I'm no python

I don't think that will help. I'm on crufty old Debian stable and it
has python version 2.6.6. The MythDB() call is where the failure is
rooted. Can you run mythpython and type 'db=MythDB()' into it?

Cheers,
Tim.







_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
Quoting Mark Greenwood <fatgerman@gmail.com>:
> On 26 Oct 2012, at 16:04, Mark Greenwood wrote:
>> rec.storagegroup, db=db) returns 'None'.
>
> Right, found what I suspect is a bug in the python bindings for 0.26
>
> sg.dirname+filename == /var/lib/mythtv/recordings1029_20121023230500.mpg
>
> So, change the call to
>
> sg = findfile('/'+rec.basename, rec.storagegroup, db=db)
>
> and the script runs. (Haven't yet checked whether it has found the
> breaks correctly)
>
> Looks like sg.dirname is stripping a trailing slash where it
> shouldn't. Where should I report this?

I just upgrades to 0.26 to see if I get this problem and I don't. One
thing I noticed though is that all my storage groups have a slash at
the end. Do yours? I just created a new one in mythtv-setup and it put
the slash on the end even though I didn't type it in. It could be that
they are meant to have slashes at the end, a bit odd but won't kill
anything.

Cheers,
Tim.


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 27 Oct 2012, at 22:15, Tim Phipps wrote:

> Quoting Mark Greenwood <fatgerman@gmail.com>:
>> On 26 Oct 2012, at 16:04, Mark Greenwood wrote:
>>> rec.storagegroup, db=db) returns 'None'.
>>
>> Right, found what I suspect is a bug in the python bindings for 0.26
>>
>> sg.dirname+filename == /var/lib/mythtv/recordings1029_20121023230500.mpg
>>
>> So, change the call to
>>
>> sg = findfile('/'+rec.basename, rec.storagegroup, db=db)
>>
>> and the script runs. (Haven't yet checked whether it has found the breaks correctly)
>>
>> Looks like sg.dirname is stripping a trailing slash where it shouldn't. Where should I report this?
>
> I just upgrades to 0.26 to see if I get this problem and I don't. One thing I noticed though is that all my storage groups have a slash at the end. Do yours? I just created a new one in mythtv-setup and it put the slash on the end even though I didn't type it in. It could be that they are meant to have slashes at the end, a bit odd but won't kill anything.

Funnily enough the same thought just occurred to me as this email came in. My storage groups don't have a slash at the end. I'm using a default mythbuntu install, so I didn't create them myself. So it's more likely a mythbuntu bug than an mythtv bug then I guess? When I get a slack minute I'll report it to the mythbuntu guys. I'm loath to change my storage groups now because who knows what else it might break? :)

BTW once I'd made that change, your script ran and detected commercials successfully on two recordings. The CPU usage on my atom/ION backend was still too high to do flagging during recording (not that I actually tried it, but flagging an existing recording I watched 'top' while it ran and the CPU was maxed.) It's quicker than the mythcommflag_wrapper script but uses more CPU, which is not what I was expecting and I don't think it's what you were expecting either :) Must be something odd going on there. I'll keep investigating.

Cheers,

Mark

>
> Cheers,
> Tim.
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On Sun, Oct 28, 2012 at 10:34 AM, Mark Greenwood <fatgerman@gmail.com> wrote:
>
> On 27 Oct 2012, at 22:15, Tim Phipps wrote:
>
>> Quoting Mark Greenwood <fatgerman@gmail.com>:
>>> On 26 Oct 2012, at 16:04, Mark Greenwood wrote:
>>>> rec.storagegroup, db=db) returns 'None'.
>>>
>>> Right, found what I suspect is a bug in the python bindings for 0.26
>>>
>>> sg.dirname+filename == /var/lib/mythtv/recordings1029_20121023230500.mpg
>>>
>>> So, change the call to
>>>
>>> sg = findfile('/'+rec.basename, rec.storagegroup, db=db)
>>>
>>> and the script runs. (Haven't yet checked whether it has found the breaks correctly)
>>>
>>> Looks like sg.dirname is stripping a trailing slash where it shouldn't. Where should I report this?
>>
>> I just upgrades to 0.26 to see if I get this problem and I don't. One thing I noticed though is that all my storage groups have a slash at the end. Do yours? I just created a new one in mythtv-setup and it put the slash on the end even though I didn't type it in. It could be that they are meant to have slashes at the end, a bit odd but won't kill anything.
>
> Funnily enough the same thought just occurred to me as this email came in. My storage groups don't have a slash at the end. I'm using a default mythbuntu install, so I didn't create them myself. So it's more likely a mythbuntu bug than an mythtv bug then I guess? When I get a slack minute I'll report it to the mythbuntu guys. I'm loath to change my storage groups now because who knows what else it might break? :)


Adding a slash at the end won't break anything!

>
> BTW once I'd made that change, your script ran and detected commercials successfully on two recordings. The CPU usage on my atom/ION backend was still too high to do flagging during recording (not that I actually tried it, but flagging an existing recording I watched 'top' while it ran and the CPU was maxed.) It's quicker than the mythcommflag_wrapper script but uses more CPU, which is not what I was expecting and I don't think it's what you were expecting either :) Must be something odd going on there. I'll keep investigating.
>
> Cheers,
>
> Mark
>
>>
>> Cheers,
>> Tim.
>>
>>
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users@mythtv.org
>> http://www.mythtv.org/mailman/listinfo/mythtv-users
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
Quoting Mark Greenwood <fatgerman@gmail.com>:
> Funnily enough the same thought just occurred to me as this email
> came in. My storage groups don't have a slash at the end. I'm using
> a default mythbuntu install, so I didn't create them myself. So it's
> more likely a mythbuntu bug than an mythtv bug then I guess? When I
> get a slack minute I'll report it to the mythbuntu guys. I'm loath
> to change my storage groups now because who knows what else it might
> break? :)

Well, there's only one way to find out!

> BTW once I'd made that change, your script ran and detected
> commercials successfully on two recordings. The CPU usage on my
> atom/ION backend was still too high to do flagging during recording
> (not that I actually tried it, but flagging an existing recording I
> watched 'top' while it ran and the CPU was maxed.) It's quicker than
> the mythcommflag_wrapper script but uses more CPU, which is not what
> I was expecting and I don't think it's what you were expecting
> either :) Must be something odd going on there. I'll keep
> investigating.

When you run this script on an old recording the CPU is going to be
the only limit and it will run ffmpeg/avconv at 100% CPU and mausc at
whatever it takes to keep up. If you set it to start when a recording
starts it will be throttled by the incoming data rate and will use
much less CPU, plus it won't need to read the data from disk because
it will almost certainly be in the cache. The system will take less
energy and will be done quicker.

Try it out in a quiet time with a programme you don't care about. You
should see the CPU spike at the start and then drop down once things
settle into a nice steady flow.

Cheers,
Tim.


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 28/10/12 8:09 AM, Tim Phipps wrote:
> Quoting Andrew Leech <coronasensei@gmail.com>:
>> On 27/10/12 9:24 PM, Mark Greenwood wrote:
>>> On 27 Oct 2012, at 07:56, Andrew Leech wrote:
>>>> File "./mausc-wrapper", line 18, in runjob
>>>> db = MythDB()
>>>> <deleted>
>>>> as my libmyth-python
>>>> (2:0.25.2+fixes.20121002.139bd59-0ubuntu0mythbuntu1)
>>> I'm using mythbuntu 12.04.1, which has python 2.7.3. I'm no python
>
> I don't think that will help. I'm on crufty old Debian stable and it
> has python version 2.6.6. The MythDB() call is where the failure is
> rooted. Can you run mythpython and type 'db=MythDB()' into it?
>
> Cheers,
> Tim.
Hi Tim,
Yeah you're right, it's quite a reproducible failure. I had to type:
>>> from MythTV import MythDB
before db=MythDB() would resolve but that does trigger the same failure.
Looks to me like something is out of whack with my mythtv
library/bindings, probably updating mythtv and ensuring all the packages
are up to date would help before updating the entire system.
I'm always a little reticent about doing updates to mythtv, I want to be
sure I have a bit of spare time in case I have new problems to fix. I
might have to wait a bit, it's far too nice a day outside today to dive
into a myth update just now! I'll try that later.

Thanks,
Andrew
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 26 October 2012 22:34, Michael Watson <michael@thewatsonfamily.id.au>wrote:

> On 26/10/2012 3:04 PM, Anthony Giggins wrote:
>
>>
>>
>> On 26 October 2012 09:47, Roger Siddons <dizygotheca@ntlworld.com<mailto:
>> dizygotheca@ntlworld.**com <dizygotheca@ntlworld.com>>> wrote:
>>
>> On Thu, 25 Oct 2012 23:23:22 +0100, Mark Greenwood
>> <fatgerman@gmail.com <mailto:fatgerman@gmail.com>> wrote:
>>
>> > In all the years I've used mythtv (every release from 0.22 to
>> 0.26) it
>> > has *never* detected a commercial break. I've had about 3 false
>> > detections, and that's it. I know it must work for other people
>> so my
>> > question is, for all UK users, what settings do you use to make
>> it work?
>>
>> I had the same experience with mythcommflag when I tried it (some
>> time ago).
>>
>> However, have you tried
>> http://www.mythtv.org/wiki/**Mythcommflag-wrapper<http://www.mythtv.org/wiki/Mythcommflag-wrapper>? I find the
>> silence-detect method works brilliantly most of the time.
>>
>> The wiki version is for 0.24. I remember having to modify it for
>> 0.25 (IIRC the setcutlist options moved from mythcommflag to
>> mythutil). I haven't tried it on 0.26 yet.
>>
>> silence-detect
>> works pretty well in Australia too on most channels however the default
>> commflag and the silent-detect are pretty useless on the HD Channels.
>>
>
> What settings do you use for silence detect in Australia? I had very got
> very poor results when I played with it


The defaults below are commented out

MAXCOMMBREAKSECS=400
# Max level to be considered 'silent'
SILENCE_THRESHOLD="-76"
#SILENCE_THRESHOLD="-70"
# Min duration to be considered 'silent'
SILENCE_DURATION="0.15"

I've only got this enabled for

TEN?Digital) return 0 ;;
7*) return 0 ;;
SBS*) return 0 ;;

All the other channels return no or almost no commflags

Cheers,

Anthony
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
From: Anthony Giggins
> In all the years I've used mythtv (every release from 0.22 to
0.26) it
> has *never* detected a commercial break. I've had about 3 false
> detections, and that's it. I know it must work for other people
so my
> question is, for all UK users, what settings do you use to make
it work?
Which channels must make a large difference. For me, the defaults have worked fine since I think 0.19.
I make sure to mark BBC as non-commercial channels (although the number of adverts they now run I might change this).
I get decent commflag detection on 3,5,11,12,21
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 28 Oct 2012, at 01:31, Tim Phipps wrote:

> Quoting Mark Greenwood <fatgerman@gmail.com>:
>> Funnily enough the same thought just occurred to me as this email came in. My storage groups don't have a slash at the end. I'm using a default mythbuntu install, so I didn't create them myself. So it's more likely a mythbuntu bug than an mythtv bug then I guess? When I get a slack minute I'll report it to the mythbuntu guys. I'm loath to change my storage groups now because who knows what else it might break? :)
>
> Well, there's only one way to find out!
>
>> BTW once I'd made that change, your script ran and detected commercials successfully on two recordings. The CPU usage on my atom/ION backend was still too high to do flagging during recording (not that I actually tried it, but flagging an existing recording I watched 'top' while it ran and the CPU was maxed.) It's quicker than the mythcommflag_wrapper script but uses more CPU, which is not what I was expecting and I don't think it's what you were expecting either :) Must be something odd going on there. I'll keep investigating.
>
> When you run this script on an old recording the CPU is going to be the only limit and it will run ffmpeg/avconv at 100% CPU and mausc at whatever it takes to keep up. If you set it to start when a recording starts it will be throttled by the incoming data rate and will use much less CPU, plus it won't need to read the data from disk because it will almost certainly be in the cache. The system will take less energy and will be done quicker.
>
> Try it out in a quiet time with a programme you don't care about. You should see the CPU spike at the start and then drop down once things settle into a nice steady flow.

You're right, it worked a treat - about 5% CPU usage from avconv, mausc didn't even register. I'll be using that from now on.

Cheers,

Mark

>
> Cheers,
> Tim.
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 28/10/12 11:14, Gareth Glaccum wrote:
> *From:* Anthony Giggins <mailto:seven@seven.dorksville.net>
> > In all the years I've used mythtv (every release from 0.22 to
> 0.26) it
> > has *never* detected a commercial break. I've had about 3 false
> > detections, and that's it. I know it must work for other people
> so my
> > question is, for all UK users, what settings do you use to make
> it work?
> Which channels must make a large difference. For me, the defaults have
> worked fine since I think 0.19.
> I make sure to mark BBC as non-commercial channels (although the
> number of adverts they now run I might change this).
> I get decent commflag detection on 3,5,11,12,21
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
Gareth,

Which defaults ? Are you talking about default mythcommflag, with "all
available methods" ?

Similar to OP I've never found commercial skipping to be worth doing,
more errors than successes.

3,5,11,12,21 == ITV1,Channel5,picktv,dave,viva ??

Just re-run on ITV1 and still see terrible results :-( On a 2 hour ITV1
"Lewis" episode, algorithm picks up the rubbish before program start
perfectly, then finds 2 more adverts during the show, there are actually
about 6, both the ones it does pick up included significant amounts of
the episode itself.

Not complaining it doesn't work :-), just interested that it seems to
work for you.

I also tried mythcommflag wrapper, that tended to be over enthusiastic,
and find lots of small adverts all the way through. Maybe I need to
start watching American shows with continuous laugh tracks ;-)
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 29/10/12 12:36, John wrote:
> On 28/10/12 11:14, Gareth Glaccum wrote:
>> *From:* Anthony Giggins <mailto:seven@seven.dorksville.net>
>> > In all the years I've used mythtv (every release from 0.22 to
>> 0.26) it
>> > has *never* detected a commercial break. I've had about 3 false
>> > detections, and that's it. I know it must work for other people
>> so my
>> > question is, for all UK users, what settings do you use to make
>> it work?
>> Which channels must make a large difference. For me, the defaults
>> have worked fine since I think 0.19.
>> I make sure to mark BBC as non-commercial channels (although the
>> number of adverts they now run I might change this).
>> I get decent commflag detection on 3,5,11,12,21
>>
>>
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users@mythtv.org
>> http://www.mythtv.org/mailman/listinfo/mythtv-users
> Gareth,
>
> Which defaults ? Are you talking about default mythcommflag, with "all
> available methods" ?
>
> Similar to OP I've never found commercial skipping to be worth doing,
> more errors than successes.
>
> 3,5,11,12,21 == ITV1,Channel5,picktv,dave,viva ??
>
> Just re-run on ITV1 and still see terrible results :-( On a 2 hour
> ITV1 "Lewis" episode, algorithm picks up the rubbish before program
> start perfectly, then finds 2 more adverts during the show, there are
> actually about 6, both the ones it does pick up included significant
> amounts of the episode itself.
>
> Not complaining it doesn't work :-), just interested that it seems to
> work for you.
>
> I also tried mythcommflag wrapper, that tended to be over
> enthusiastic, and find lots of small adverts all the way through.
> Maybe I need to start watching American shows with continuous laugh
> tracks ;-)
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
Just for laughs: Same episode found 127 adverts with
mythcommflag-wrapper. :-)
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
Sorry, I was wrong, I did change one variable...... maximum advert length. I up-ed it to 6 minutes. On 5 for instance (yes, the channels you guessed were correct), in CSI most of the adverts are 4 minutes 13 seconds exactly in length. This is longer than the default advert length. What I guess is that most of the devs might be American, where they tend to get much more frequent adverts, but shorter lengths.


From: John
Sent: Monday, October 29, 2012 12:36 PM
To: mythtv-users@mythtv.org
Subject: Re: [mythtv-users] Commercial Flagging (UK, DVB-T)

On 28/10/12 11:14, Gareth Glaccum wrote:

From: Anthony Giggins
> In all the years I've used mythtv (every release from 0.22 to
0.26) it
> has *never* detected a commercial break. I've had about 3 false
> detections, and that's it. I know it must work for other people
so my
> question is, for all UK users, what settings do you use to make
it work?
Which channels must make a large difference. For me, the defaults have worked fine since I think 0.19.
I make sure to mark BBC as non-commercial channels (although the number of adverts they now run I might change this).
I get decent commflag detection on 3,5,11,12,21



_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Gareth,

Which defaults ? Are you talking about default mythcommflag, with "all available methods" ?

Similar to OP I've never found commercial skipping to be worth doing, more errors than successes.

3,5,11,12,21 == ITV1,Channel5,picktv,dave,viva ??

Just re-run on ITV1 and still see terrible results :-( On a 2 hour ITV1 "Lewis" episode, algorithm picks up the rubbish before program start perfectly, then finds 2 more adverts during the show, there are actually about 6, both the ones it does pick up included significant amounts of the episode itself.

Not complaining it doesn't work :-), just interested that it seems to work for you.

I also tried mythcommflag wrapper, that tended to be over enthusiastic, and find lots of small adverts all the way through. Maybe I need to start watching American shows with continuous laugh tracks ;-)



--------------------------------------------------------------------------------
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On Mon, 29 Oct 2012 12:46:20 -0000, John <reidjr@lineone.net> wrote:

>
> Just re-run on ITV1 and still see terrible results :-( On a 2 hour ITV1
> "Lewis" episode, algorithm picks up the rubbish before >program start
> perfectly, then finds 2 more adverts during the show, there are actually
> about 6, both the ones it does pick up >included significant amounts of
> the episode itself.
>
> Not complaining it doesn't work :-), just interested that it seems to
> work for you.
>
> I also tried mythcommflag wrapper, that tended to be over enthusiastic,
> and find lots of small adverts all the way through. >Maybe I need to
> start watching American shows with continuous laugh tracks ;-)
>
> Just for laughs: Same episode found 127 adverts with
> mythcommflag-wrapper. :-)

Have you checked the log ?

When I was setting this up I saw this "127 errors" in the Status screen
after a few seconds: it turned out the job was failing.
Can't remember why exactly but I do remember the script having permission
issues when writing its log to my Mythbuntu system.

FWIW I don't watch Lewis but, like others, it does work for me on ITV1
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 29/10/12 20:33, Gareth Glaccum wrote:
> Sorry, I was wrong, I did change one variable...... maximum advert
> length. I up-ed it to 6 minutes. On 5 for instance (yes, the channels
> you guessed were correct), in CSI most of the adverts are 4 minutes 13
> seconds exactly in length. This is longer than the default advert
> length. What I guess is that most of the devs might be American, where
> they tend to get much more frequent adverts, but shorter lengths.
>
Garreth,

Thanks for the reply. I'm a touch confused still though.

Are you talking about the default mythcommflag working ? OR are you
talking about the mythcommflag-wrapper script working for you ?

If the default mythcommflag, where do you set maximum advert length ?

thanks again.
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
To be honest, I can't find the option at the moment. I did not make any mods
to the wrapper script, it would have probably been through one of the setup
pages (but at the time I did also make some direct changes to the database,
for things such as automatic sleep on a frontend if it hadn't been used for
X hours, a useful but hidden variable).
Looking through the database, there is a value of 3600 seconds for

MaximumCommercialSkip


Other values..


JobQueueCommFlagCommand

AggressiveCommDetect

AutoCommercialFlag

AutoCommflagWhileRecording
(although it does work, but I rarely use catch-up, so it isn't worth the
cycles for me)

AutoTranscodeBeforeAutoCommflag

CommercialSkipMethod

CommSkipAllBlanks

Hope it helps, not having adverts is very good.
Gareth



From: John [mailto:reidjr@lineone.net]
Sent: 30 October 2012 15:58
To: Gareth Glaccum
Cc: mythtv-users@mythtv.org
Subject: Re: [mythtv-users] Commercial Flagging (UK, DVB-T)

On 29/10/12 20:33, Gareth Glaccum wrote:
Sorry, I was wrong, I did change one variable...... maximum advert length. I
up-ed it to 6 minutes. On 5 for instance (yes, the channels you guessed were
correct), in CSI most of the adverts are 4 minutes 13 seconds exactly in
length. This is longer than the default advert length. What I guess is that
most of the devs might be American, where they tend to get much more
frequent adverts, but shorter lengths.


Garreth,

Thanks for the reply. I'm a touch confused still though.

Are you talking about the default mythcommflag working ? OR are you talking
about the mythcommflag-wrapper script working for you ?

If the default mythcommflag, where do you set maximum advert length ?

thanks again.
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 28/10/12 3:37 PM, Andrew Leech wrote:
> On 28/10/12 8:09 AM, Tim Phipps wrote:
>> Quoting Andrew Leech <coronasensei@gmail.com>:
>>> On 27/10/12 9:24 PM, Mark Greenwood wrote:
>>>> On 27 Oct 2012, at 07:56, Andrew Leech wrote:
>>>>> File "./mausc-wrapper", line 18, in runjob
>>>>> db = MythDB()
>>>>> <deleted>
>>>>> as my libmyth-python
>>>>> (2:0.25.2+fixes.20121002.139bd59-0ubuntu0mythbuntu1)
>>>> I'm using mythbuntu 12.04.1, which has python 2.7.3. I'm no python
>>
>> I don't think that will help. I'm on crufty old Debian stable and it
>> has python version 2.6.6. The MythDB() call is where the failure is
>> rooted. Can you run mythpython and type 'db=MythDB()' into it?
>>
>> Cheers,
>> Tim.
> Hi Tim,
> Yeah you're right, it's quite a reproducible failure. I had to type:
> >>> from MythTV import MythDB
> before db=MythDB() would resolve but that does trigger the same failure.
> Looks to me like something is out of whack with my mythtv
> library/bindings, probably updating mythtv and ensuring all the
> packages are up to date would help before updating the entire system.
> I'm always a little reticent about doing updates to mythtv, I want to
> be sure I have a bit of spare time in case I have new problems to fix.
> I might have to wait a bit, it's far too nice a day outside today to
> dive into a myth update just now! I'll try that later.
>
> Thanks,
> Andrew
Follow up, it had nothing to do with python problems, it turns out it's
because I had an empty ~/.mythtv/config.xml . I did have an
/etc/mythtv/config.xml but apparently that's no use.
So score one for nasty cryptic error messages!

I'll follow up later with some commercial flagging results.
Cheers,
Andrew
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On Mon, Nov 5, 2012 at 12:49 PM, Andrew Leech <coronasensei@gmail.com>wrote:

> On 28/10/12 3:37 PM, Andrew Leech wrote:
>
>> On 28/10/12 8:09 AM, Tim Phipps wrote:
>>
>>> Quoting Andrew Leech <coronasensei@gmail.com>:
>>>
>>>> On 27/10/12 9:24 PM, Mark Greenwood wrote:
>>>>
>>>>> On 27 Oct 2012, at 07:56, Andrew Leech wrote:
>>>>>
>>>>>> File "./mausc-wrapper", line 18, in runjob
>>>>>> db = MythDB()
>>>>>> <deleted>
>>>>>> as my libmyth-python (2:0.25.2+fixes.20121002.**
>>>>>> 139bd59-0ubuntu0mythbuntu1)
>>>>>>
>>>>> I'm using mythbuntu 12.04.1, which has python 2.7.3. I'm no python
>>>>>
>>>>
>>> I don't think that will help. I'm on crufty old Debian stable and it has
>>> python version 2.6.6. The MythDB() call is where the failure is rooted. Can
>>> you run mythpython and type 'db=MythDB()' into it?
>>>
>>> Cheers,
>>> Tim.
>>>
>> Hi Tim,
>> Yeah you're right, it's quite a reproducible failure. I had to type:
>> >>> from MythTV import MythDB
>> before db=MythDB() would resolve but that does trigger the same failure.
>> Looks to me like something is out of whack with my mythtv
>> library/bindings, probably updating mythtv and ensuring all the packages
>> are up to date would help before updating the entire system.
>> I'm always a little reticent about doing updates to mythtv, I want to be
>> sure I have a bit of spare time in case I have new problems to fix. I might
>> have to wait a bit, it's far too nice a day outside today to dive into a
>> myth update just now! I'll try that later.
>>
>> Thanks,
>> Andrew
>>
> Follow up, it had nothing to do with python problems, it turns out it's
> because I had an empty ~/.mythtv/config.xml . I did have an
> /etc/mythtv/config.xml but apparently that's no use.
> So score one for nasty cryptic error messages!
>

I believe your personal one is best dealt with as a link to the system wide
one.


>
> I'll follow up later with some commercial flagging results.
> Cheers,
>
> Andrew
> ______________________________**_________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://www.mythtv.org/mailman/**listinfo/mythtv-users<http://www.mythtv.org/mailman/listinfo/mythtv-users>
>
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 05/11/12 00:44, Nick Rout wrote:
>

>
> Follow up, it had nothing to do with python problems, it turns out
> it's because I had an empty ~/.mythtv/config.xml . I did have an
> /etc/mythtv/config.xml but apparently that's no use.
> So score one for nasty cryptic error messages!
>
>
> I believe your personal one is best dealt with as a link to the system
> wide one.
>

Not sure about that. In 0.25.3 I have my personal one set to readonly
as a precaoution, and get a complaint about it every time I
clearcutlist, mythcommflag --rebuild, or mythpreviewgen. But they still
work.

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 26/10/12 00:47, Roger Siddons wrote:
> On Thu, 25 Oct 2012 23:23:22 +0100, Mark Greenwood
> <fatgerman@gmail.com> wrote:
>
> > In all the years I've used mythtv (every release from 0.22 to 0.26) it
> > has *never* detected a commercial break. I've had about 3 false
> > detections, and that's it. I know it must work for other people so my
> > question is, for all UK users, what settings do you use to make it
> work?
>
> I had the same experience with mythcommflag when I tried it (some time
> ago).
>
> However, have you tried
> http://www.mythtv.org/wiki/Mythcommflag-wrapper ? I find the
> silence-detect method works brilliantly most of the time.
>
> The wiki version is for 0.24. I remember having to modify it for 0.25
> (IIRC the setcutlist options moved from mythcommflag to mythutil). I
> haven't tried it on 0.26 yet.
>
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
I have been playing around with Mythcommflag-wrapper
<http://www.mythtv.org/wiki/Mythcommflag-wrapper>. It needed some simple
changes to work on 0.26. It also lost the dependency on myth-export ( In
fact I couldn't get it to work properly with myth-export to find total
no frames). I've moved what I can to mythutil, and deleted the comments
that are no longer relevent. I added a few callsigns to the whitelist,
but you need to make sure your own callsigns match !! [ on Freeview its
ITV1 +1, on Freesat its ITV1+1 ]

I've added my edited version to
http://www.mythtv.org/wiki/Mythcommflag-wrapper. I have been testing on
0.26, but it probably works on 0.25.

My changes are superficial, and are just an update of the previous
script(s). It works for me, and on some programs its excellent, others
its not so lucky, but its a great deal better than the built in
mythcommflag for UK TV.

John
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 25 November 2012 21:30, John <reidjr@lineone.net> wrote:

I have been playing around with
Mythcommflag-wrapper<http://www.mythtv.org/wiki/Mythcommflag-wrapper>.
> It needed some simple changes to work on 0.26. It also lost the dependency
> on myth-export ( In fact I couldn't get it to work properly with
> myth-export to find total no frames). I've moved what I can to mythutil,
> and deleted the comments that are no longer relevent. I added a few
> callsigns to the whitelist, but you need to make sure your own callsigns
> match !! [ on Freeview its ITV1 +1, on Freesat its ITV1+1 ]
>
> I've added my edited version to
> http://www.mythtv.org/wiki/Mythcommflag-wrapper. I have been testing on
> 0.26, but it probably works on 0.25.
>
> My changes are superficial, and are just an update of the previous
> script(s). It works for me, and on some programs its excellent, others its
> not so lucky, but its a great deal better than the built in mythcommflag
> for UK TV.
>
> John
>
>
John,

This is great, thanks for your work on this. ALso seems to be working on
HD stuff, I saw on the list that there was an issue with this due to the
format HD audio was in.

Not tested fully, but getting more ad breaks detected anyway (more than the
usual 1 anyway!)

Cheers

Martin
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
I agree, this is awesome and so much quicker but it would be great to have
this added into the official commflagger as another commflagging option.

Cheers,

Anthony


On 27 November 2012 23:58, Martin Moores <moores.martin@gmail.com> wrote:

> On 25 November 2012 21:30, John <reidjr@lineone.net> wrote:
>
> I have been playing around with Mythcommflag-wrapper<http://www.mythtv.org/wiki/Mythcommflag-wrapper>.
>> It needed some simple changes to work on 0.26. It also lost the dependency
>> on myth-export ( In fact I couldn't get it to work properly with
>> myth-export to find total no frames). I've moved what I can to mythutil,
>> and deleted the comments that are no longer relevent. I added a few
>> callsigns to the whitelist, but you need to make sure your own callsigns
>> match !! [ on Freeview its ITV1 +1, on Freesat its ITV1+1 ]
>>
>> I've added my edited version to
>> http://www.mythtv.org/wiki/Mythcommflag-wrapper. I have been testing on
>> 0.26, but it probably works on 0.25.
>>
>> My changes are superficial, and are just an update of the previous
>> script(s). It works for me, and on some programs its excellent, others its
>> not so lucky, but its a great deal better than the built in mythcommflag
>> for UK TV.
>>
>> John
>>
>>
> John,
>
> This is great, thanks for your work on this. ALso seems to be working on
> HD stuff, I saw on the list that there was an issue with this due to the
> format HD audio was in.
>
> Not tested fully, but getting more ad breaks detected anyway (more than
> the usual 1 anyway!)
>
> Cheers
>
> Martin
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>
>
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 26/10/12 09:22, Tim Phipps wrote:

> My contribution to MythTV is here:
>
> http://www.mythtv.org/wiki/Commercial_detection_with_silence_for_UK_freeviewHD
>
>
> It's based on the one above but works on DVB-T2 as well, does not need
> to transcode the audio stream and can be run in realtime.

I tried this, it often works well, but it is not doing the same as
mythcommflag_wrapper, as it ignores the minimum time for silence.

Although min is passed as a parameter to mausc.c, it is never used.
mausc.c looks for silence in a single video frame, 1/25th of a second,
not all along 0.15 seconds (or whatever min has been set to). As soon as
there is a silent video frame, gapstart is set, so it reacts to 0.04
seconds of silence.

The result is that if there is a short silence in a programme, it is
treated as an advert break, instead of being ignored.

It is easy to drop short breaks, like this:

if (!silent && last_silent) {
if (frames < gapstart + min)
gapstart = 0
else
gapend = frames
}

but that only works on the first break (e.g. the start of an advert). We
also need code to check that the silence at the end of an ad break is > min.

Also, I wonder how we deal with recordings that start in the middle of
an advertisement, so the first silence is the end of a break? For those
of us who start recordings a few minutes before the scheduled time, that
is often the case.

David Newman
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 16/12/12 22:23, D. R. Newman wrote:
> On 26/10/12 09:22, Tim Phipps wrote:
>
>> My contribution to MythTV is here:
>>
>> http://www.mythtv.org/wiki/Commercial_detection_with_silence_for_UK_freeviewHD

> I tried this, it often works well, but it is not doing the same as
> mythcommflag_wrapper, as it ignores the minimum time for silence.

So I have written mausc2.c (attached) which takes the minimum silence
into the logic.

However, I wonder if it would be better to simply spit out of mausc the
periods of silence, then do the logic working out which bits are adverts
and which bits are programme in python?

David Newman
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 16/12/12 23:07, D. R. Newman wrote:
>
> So I have written mausc2.c (attached) which takes the minimum silence
> into the logic.

Which has a bug, so here is a corrected version.
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
Quoting "D. R. Newman" <d.r.newman@e-consultation.org>:

> On 16/12/12 23:07, D. R. Newman wrote:
>>
>> So I have written mausc2.c (attached) which takes the minimum silence
>> into the logic.
>
> Which has a bug, so here is a corrected version.

Thanks for that, I finally got around to testing it and have now
updated the wiki page.

Cheers,
Tim.


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On Mon, 11 Feb 2013 20:31:18 -0000, <phipps-hutton@sky.com> wrote:

>
> Quoting "D. R. Newman" <d.r.newman@e-consultation.org>:
>
>> On 16/12/12 23:07, D. R. Newman wrote:
>>>
>>> So I have written mausc2.c (attached) which takes the minimum silence
>>> into the logic.
>>
>> Which has a bug, so here is a corrected version.
>
> Thanks for that, I finally got around to testing it and have now updated
> the wiki page.
>
> Cheers,
> Tim.
>
>

Whilst you're updating it, I had a couple of comments that I forgot to
mention earlier;

1. Why do you set avconv to debug output ("-v 8") ? It seemed to run twice
as fast with no adverse effects when I turned it off.

2. The 'comflagged' states are: 0=not flagged, 1=flagged, 2=in progress,
3=commfree.

Thanks for the neat idea though. I wanted to try out some clustering
algorithms to get rid of the rogue silences & your approach provided the
ideal base. I'm still tuning/testing but will add it to the wiki soon.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
Quoting Roger Siddons <dizygotheca@ntlworld.com>:
> Whilst you're updating it, I had a couple of comments that I forgot
> to mention earlier;
>
> 1. Why do you set avconv to debug output ("-v 8") ? It seemed to run
> twice as fast with no adverse effects when I turned it off.
>
Accidently left in from debugging, now changed to "-v fatal".

> 2. The 'comflagged' states are: 0=not flagged, 1=flagged, 2=in
> progress, 3=commfree.

Do you (or anyone listening) know how to get the frontends to update
the skiplist if they are watching the same program? I have to stop
playback and start again to reload the skiplist.

Cheers,
Tim.


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 12/02/2013 10:58, phipps-hutton@sky.com wrote:
>
> Quoting Roger Siddons <dizygotheca@ntlworld.com>:
>> Whilst you're updating it, I had a couple of comments that I forgot to
>> mention earlier;
>>
>> 1. Why do you set avconv to debug output ("-v 8") ? It seemed to run
>> twice as fast with no adverse effects when I turned it off.
>>
> Accidently left in from debugging, now changed to "-v fatal".
>
>> 2. The 'comflagged' states are: 0=not flagged, 1=flagged, 2=in
>> progress, 3=commfree.
>
> Do you (or anyone listening) know how to get the frontends to update the
> skiplist if they are watching the same program? I have to stop playback
> and start again to reload the skiplist.

I'd love to see this working as well. My C isn't great and I've never
looked far into the mythtv codebase but it would appear that
mythcommflag sends a "message" that somehow gets to the player:

In programs/mythcommflag/main.cpp:

static void commDetectorGotNewCommercialBreakList(void)
{
frm_dir_map_t newCommercialMap;
commDetector->GetCommercialBreakList(newCommercialMap);

frm_dir_map_t::Iterator it = newCommercialMap.begin();
QString message = "COMMFLAG_UPDATE ";
message += global_program_info->MakeUniqueKey();

for (it = newCommercialMap.begin();
it != newCommercialMap.end(); ++it)
{
if (it != newCommercialMap.begin())
message += ",";
else
message += " ";
message += QString("%1:%2").arg(it.key())
.arg(*it);
}

LOG(VB_COMMFLAG, LOG_INFO,
QString("mythcommflag sending update: %1").arg(message));

gCoreContext->SendMessage(message);
}

and in libs/libmythtv/tv_play.cpp (the only other place in the
mythcodebase that "COMMFLAG_UPDATE" is mentioned based on my grep of the
.cpp files in the code:

if (message.left(15) == "COMMFLAG_UPDATE" && (tokens.size() >= 3))
{
uint evchanid = 0;
QDateTime evrecstartts;
ProgramInfo::ExtractKey(tokens[1], evchanid, evrecstartts);

PlayerContext *mctx = GetPlayerReadLock(0, __FILE__, __LINE__);
for (uint i = 0; mctx && evchanid && (i < player.size()); i++)
{
PlayerContext *ctx = GetPlayer(mctx, i);
ctx->LockPlayingInfo(__FILE__, __LINE__);
bool doit =
((ctx->playingInfo) &&
(ctx->playingInfo->GetChanID() == evchanid) &&
(ctx->playingInfo->GetRecordingStartTime() ==
evrecstartts));
ctx->UnlockPlayingInfo(__FILE__, __LINE__);


I'm not sure if this helps, but if there was some way to "send a
message" into the mythtv infrastructure and you could work out the
message format then maybe it could be integrated.

Rob.

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 11/02/13 20:31, phipps-hutton@sky.com wrote:
>
> Quoting "D. R. Newman" <d.r.newman@e-consultation.org>:
>
>> On 16/12/12 23:07, D. R. Newman wrote:
>>>
>>> So I have written mausc2.c (attached) which takes the minimum silence
>>> into the logic.
>
> Thanks for that, I finally got around to testing it and have now updated
> the wiki page.

BTW, I did try to write a program based on mausc.c that produces
statistics of silences in a program, so that if lots of people ran it on
recordings from different channels, we could find out the optimum gap
and depth of silence to count as a marker between adverts, and a longer
gap as a marker of the beginning and end of the a group of adverts.

But I couldn't get it to work properly, so I left it when I had
somethign else to do. If anyone is interested in getting it to work,
please let me know.

David Newman
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On Tue, 12 Feb 2013 10:58:03 -0000, <phipps-hutton@sky.com> wrote:

> Do you (or anyone listening) know how to get the frontends to update the
> skiplist if they are watching the same program? I have to stop playback
> and start again to reload the skiplist.
>

I finally found time to get this working using the commflag code that
Robert highlighted.
Here's some code fragments that should enable you to do the same...

#include <mythcorecontext.h>
#include <mythcontext.h>
#include <mythversion.h>
#include <programtypes.h>
#include <QCoreApplication>

// Player update message
QString updateMessage;
char message[200];

void UpdatePlayer(frame_t start, frame_t stop) {

// add comma unless it's first cut
if (!updateMessage.endsWith(' '))
updateMessage += ',';

updateMessage += QString("%1:%2,%3:%4")
.arg(start).arg(MARK_COMM_START)
.arg(stop).arg(MARK_COMM_END);

// printf("debug@Sending %s\n", updateMessage.toLatin1().data());

gCoreContext->SendMessage(updateMessage);
}

int main(int argc, char **argv) {

QCoreApplication a(argc, argv);
QCoreApplication::setApplicationName("mausc");

MythContext* gContext = new MythContext(MYTH_BINARY_VERSION);

if (!gContext->Init( false, /*use gui*/
false, /*prompt for backend*/
false, /*bypass auto discovery*/
false)) /*ignoreDB*/
{
// printf("err%cContext initialisation failed\n", DELIMITER);
exit(1);
}

gCoreContext->ConnectToMasterServer();

-----------

if (1 != sscanf(argv[5], "%s", message)) {
// report("err", ' ', "Could not parse message option into a
string", 0, 0, 0, 0);
usage(argv[0]);
exit(2);
}
updateMessage = "COMMFLAG_UPDATE " + QString(message) + ' ';

---------

Requires a new arg from mausc-wrapper.py:

# player update message needs prog id
progId = str(chanid) + '_' + str(starttime)

----------

My Makefile:

INCPATH = -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork
-I/usr/include/qt4/QtSql -I/usr/include/qt4 -I/usr/include/mythtv
LIBPATH = -L/usr/lib -L/usr/lib/i386-linux-gnu

all: mausc catagrower

mausc: mausc.c
g++ $(INCPATH) $(LIBPATH) mausc.c -o /usr/local/bin/mausc -lsndfile
-lQtCore -lmythbase-0.26 -lmyth-0.26

catagrower: catagrower.c
g++ catagrower.c -o /usr/local/bin/catagrower

--------

Good Luck!
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On Fri, 26 Oct 2012 09:22:08 +0100, Tim Phipps <phipps-hutton@sky.com>
wrote:

> My contribution to MythTV is here:
>
> http://www.mythtv.org/wiki/Commercial_detection_with_silence_for_UK_freeviewHD
>
> It's based on the one above but works on DVB-T2 as well, does not need
> to transcode the audio stream and can be run in realtime. I've not
> figured out how to get it to update the frontends as it progresses yet
> (help needed).
>
> It works on all the Freeview channels I receive but don't try it on
> cartoons/animation they have silences that confuse it.
>

Hope you don't mind that I've added my 'improved' version to your Wiki
page.
It's tunable and does a reasonable job of animations for me.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
Quoting Roger Siddons <dizygotheca@ntlworld.com>:


> Hope you don't mind that I've added my 'improved' version to your Wiki page.
> It's tunable and does a reasonable job of animations for me.

Great stuff Roger though I think it's your Wiki page now ;-)

I get a segfualt at the end that is fixed with this patch:

--- /bfd/snapshots/hourly.0/mythtv/bin/silence.cpp 2013-03-04
19:26:57.000000000 +0000
+++ silence.cpp 2013-03-05 10:05:32.490654368 +0000
@@ -414,9 +414,10 @@
currentCluster.restart(thisSilence);
}
// log silence
- report("debug", thisSilence->state_log[thisSilence->state], "Silence",
- thisSilence->start, thisSilence->end,
- thisSilence->interval, thisSilence->power);
+ if (thisSilence)
+ report("debug", thisSilence->state_log[thisSilence->state],
"Silence",
+ thisSilence->start, thisSilence->end,
+ thisSilence->interval, thisSilence->power);
}

I've not used this very long but is it waiting for the next set of
silences before recording the last advert break? It just seems to take
longer to record a break than I was expecting.

Cheers,
Tim.


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On Tue, 05 Mar 2013 10:20:38 -0000, <phipps-hutton@sky.com> wrote:

> I get a segfualt at the end that is fixed with this patch:
>

Good spot. What logging are you using? Have you tweaked it further? And
how did you detect this ?
It occurs on the last line and doesn't affect functionality but I'm
concerned that I don't see any indication of this on my system, even
though it must be segfaulting every time.

>
> I've not used this very long but is it waiting for the next set of
> silences before recording the last advert break? It just seems to take
> longer to record a break than I was expecting.
>

It does. On a typical programme, this design will only flag the 1st advert
when it reaches the 2nd. It seemed elegant when only comflagging completed
recordings, which is what I did until a couple of days ago.
I rarely watch in-progress recordings and only tacked this on as a result
of our recent discussions. So it is currently rubbish at flagging
in-progress recordings!
I'm currently re-designing it to work effectively - v2 ETA ~1 week.

Moreover, I noticed yesterday that a comflagging job still doesn't flag a
programme that you're watching (for my shoddy testing I only ran the
script manually). I was hoping to get v2 out before anyone noticed, but
the fix for that is to change silence.py #156 to:

# player update message needs prog id (with time in Qt::ISODate format)
progId = str(chanid) + '_' + str(starttime).replace(' ','T')
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 6 March 2013 02:50, Roger Siddons <dizygotheca@ntlworld.com> wrote:

> On Tue, 05 Mar 2013 10:20:38 -0000, <phipps-hutton@sky.com> wrote:
>
> I get a segfualt at the end that is fixed with this patch:
>>
>>
> Good spot. What logging are you using? Have you tweaked it further? And
> how did you detect this ?
> It occurs on the last line and doesn't affect functionality but I'm
> concerned that I don't see any indication of this on my system, even though
> it must be segfaulting every time.
>
>
>
>> I've not used this very long but is it waiting for the next set of
>> silences before recording the last advert break? It just seems to take
>> longer to record a break than I was expecting.
>>
>>
> It does. On a typical programme, this design will only flag the 1st advert
> when it reaches the 2nd. It seemed elegant when only comflagging completed
> recordings, which is what I did until a couple of days ago.
> I rarely watch in-progress recordings and only tacked this on as a result
> of our recent discussions. So it is currently rubbish at flagging
> in-progress recordings!
> I'm currently re-designing it to work effectively - v2 ETA ~1 week.
>
> Moreover, I noticed yesterday that a comflagging job still doesn't flag a
> programme that you're watching (for my shoddy testing I only ran the script
> manually). I was hoping to get v2 out before anyone noticed, but the fix
> for that is to change silence.py #156 to:
>
> # player update message needs prog id (with time in Qt::ISODate format)
> progId = str(chanid) + '_' + str(starttime).replace(' ','T')
>
>
> Hi Roger,

how did you determin your silence.presets?

trial and error or do you have some script you can run over recordings?

I find this works fine with the defaults on most Australian channels but
there are a few which it detects no ad's. ie.Nine Digital

Cheers,

Anthony
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
On 6 March 2013 21:45, Anthony Giggins <seven@seven.dorksville.net> wrote:

> On 6 March 2013 02:50, Roger Siddons <dizygotheca@ntlworld.com> wrote:
>
>> On Tue, 05 Mar 2013 10:20:38 -0000, <phipps-hutton@sky.com> wrote:
>>
>> I get a segfualt at the end that is fixed with this patch:
>>>
>>>
>> Good spot. What logging are you using? Have you tweaked it further? And
>> how did you detect this ?
>> It occurs on the last line and doesn't affect functionality but I'm
>> concerned that I don't see any indication of this on my system, even though
>> it must be segfaulting every time.
>>
>>
>>
>>> I've not used this very long but is it waiting for the next set of
>>> silences before recording the last advert break? It just seems to take
>>> longer to record a break than I was expecting.
>>>
>>>
>> It does. On a typical programme, this design will only flag the 1st
>> advert when it reaches the 2nd. It seemed elegant when only comflagging
>> completed recordings, which is what I did until a couple of days ago.
>> I rarely watch in-progress recordings and only tacked this on as a result
>> of our recent discussions. So it is currently rubbish at flagging
>> in-progress recordings!
>> I'm currently re-designing it to work effectively - v2 ETA ~1 week.
>>
>> Moreover, I noticed yesterday that a comflagging job still doesn't flag a
>> programme that you're watching (for my shoddy testing I only ran the script
>> manually). I was hoping to get v2 out before anyone noticed, but the fix
>> for that is to change silence.py #156 to:
>>
>> # player update message needs prog id (with time in Qt::ISODate
>> format)
>> progId = str(chanid) + '_' + str(starttime).replace(' ','T')
>>
>>
>> Hi Roger,
>
> how did you determin your silence.presets?
>
> trial and error or do you have some script you can run over recordings?
>
> I find this works fine with the defaults on most Australian channels but
> there are a few which it detects no ad's. ie.Nine Digital
>
> Cheers,
>
> Anthony
>
> ignore me just saw the line just below it in the wiki

"Once you understand the logging information you can easily tune your own
channels/programmes by experimenting with the --preset option directly from
a command line until you get decent results. For example;

silence.py --chanid 1004 --starttime 20130117220000 --loglevel debug
--preset "-80,,3,,180"
"

Cheers,

Anthony
Re: Commercial Flagging (UK, DVB-T) [ In reply to ]
Quoting Roger Siddons <dizygotheca@ntlworld.com>:

> On Tue, 05 Mar 2013 10:20:38 -0000, <phipps-hutton@sky.com> wrote:
>
>> I get a segfualt at the end that is fixed with this patch:
>>
>
> Good spot. What logging are you using? Have you tweaked it further?
> And how did you detect this ?
> It occurs on the last line and doesn't affect functionality but I'm
> concerned that I don't see any indication of this on my system, even
> though it must be segfaulting every time.

I am weird enough to have 'dmesg -c' running in an hourly cron job so
I get a nice email whenever something bad happens (unless it's bad
enough to take out the email system).

>>
>> I've not used this very long but is it waiting for the next set of
>> silences before recording the last advert break? It just seems to
>> take longer to record a break than I was expecting.
>>
>
> It does. On a typical programme, this design will only flag the 1st
> advert when it reaches the 2nd. It seemed elegant when only
> comflagging completed recordings, which is what I did until a couple
> of days ago.
> I rarely watch in-progress recordings and only tacked this on as a
> result of our recent discussions. So it is currently rubbish at
> flagging in-progress recordings!
> I'm currently re-designing it to work effectively - v2 ETA ~1 week.

OK, will wait with bated breath.

>
> Moreover, I noticed yesterday that a comflagging job still doesn't
> flag a programme that you're watching (for my shoddy testing I only
> ran the script manually). I was hoping to get v2 out before anyone
> noticed, but the fix for that is to change silence.py #156 to:
>
> # player update message needs prog id (with time in Qt::ISODate format)
> progId = str(chanid) + '_' + str(starttime).replace(' ','T')

Thanks.


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://www.mythtv.org/mailman/listinfo/mythtv-users