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

1 2 3  View All