Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

User Job to rip subtitles from each program

 

 

First page Previous page 1 2 3 4 Next page Last page  View All MythTV users RSS feed   Index | Next | Previous | View Threaded


davidcrawford83 at gmail

Jan 18, 2012, 1:18 PM

Post #1 of 89 (536 views)
Permalink
User Job to rip subtitles from each program

Hi,

I'm quite new to MythTV and im trying to setup a User Job with a script
that I use to rip subtitles automatically from a recorded show into a in
.srt format.
The Script works fine via the CMD terminal and I was using it previously
with the DVBViewer Recording Service. The script via the CMD works this way:
python ~dave/uksub2srt/uksub2srt.py -i itv.mpg -o ~dave/subtitles/itv.srt

Ive tried the following but it doesnt work:
python ~dave/uksub2srt/uksub2srt.py -i %FILE%.mpg -o
~dave/subtitles/%FILE%.srt

can anyone tell me what the correct paramters are?

also, is there a limit to jobs i can process after recordings - i will
recording as much as 20 programs at a time.

Dave


mythtv-users at lists

Jan 18, 2012, 1:52 PM

Post #2 of 89 (525 views)
Permalink
Re: User Job to rip subtitles from each program [In reply to]

David Crawford wrote:
> I'm quite new to MythTV and im trying to setup a User Job with a script
> that I use to rip subtitles automatically from a recorded show into a in
> .srt format.
> The Script works fine via the CMD terminal and I was using it previously
> with the DVBViewer Recording Service. The script via the CMD works this way:
> python ~dave/uksub2srt/uksub2srt.py -i itv.mpg -o ~dave/subtitles/itv.srt
>
> Ive tried the following but it doesnt work:
> python ~dave/uksub2srt/uksub2srt.py -i %FILE%.mpg -o ~dave/subtitles/%FILE%.srt
>
> can anyone tell me what the correct paramters are?

Doesn't %FILE% already contain the file extension? So try it without ".mpg".

HTH
Thomas

BTW: Would you mind sharing the script? I'm very interested in it. How
does it handle cutlists? Will it remove the parts?
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


davidcrawford83 at gmail

Jan 18, 2012, 1:55 PM

Post #3 of 89 (526 views)
Permalink
Re: User Job to rip subtitles from each program [In reply to]

Thanks alot or the reply but actually I've tried it without .mpg and with
"%FILE%" but each time it gives me an error..

In DVBVIEWER in windows it works using this : uksub2srt.bat -i
{SOURCE_FILE}.ts -o c:subtitles/{SOURCE_FILE}.srt

On 18 January 2012 21:52, Thomas Boehm <mythtv-users [at] lists>wrote:

> David Crawford wrote:
> > I'm quite new to MythTV and im trying to setup a User Job with a script
> > that I use to rip subtitles automatically from a recorded show into a in
> > .srt format.
> > The Script works fine via the CMD terminal and I was using it previously
> > with the DVBViewer Recording Service. The script via the CMD works this
> way:
> > python ~dave/uksub2srt/uksub2srt.py -i itv.mpg -o ~dave/subtitles/itv.srt
> >
> > Ive tried the following but it doesnt work:
> > python ~dave/uksub2srt/uksub2srt.py -i %FILE%.mpg -o
> ~dave/subtitles/%FILE%.srt
> >
> > can anyone tell me what the correct paramters are?
>
> Doesn't %FILE% already contain the file extension? So try it without
> ".mpg".
>
> HTH
> Thomas
>
> BTW: Would you mind sharing the script? I'm very interested in it. How
> does it handle cutlists? Will it remove the parts?
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>


raymond at wagnerrp

Jan 18, 2012, 3:08 PM

Post #4 of 89 (528 views)
Permalink
Re: User Job to rip subtitles from each program [In reply to]

On 1/18/2012 16:18, David Crawford wrote:
> I'm quite new to MythTV and im trying to setup a User Job with a
> script that I use to rip subtitles automatically from a recorded show
> into a in .srt format.

Sounds like all you need to do is run 'mythccextractor'.

https://github.com/MythTV/mythtv/tree/master/mythtv/programs/mythccextractor
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


davidcrawford83 at gmail

Jan 18, 2012, 3:24 PM

Post #5 of 89 (527 views)
Permalink
Re: User Job to rip subtitles from each program [In reply to]

Thanks for the answer but doesnt CCExtractor only work with US closed
captions - i forgot to mention im working with teletext dvb-s subtitles
here that need to be ripped using a program called ProjectX.

On 18 January 2012 23:08, Raymond Wagner <raymond [at] wagnerrp> wrote:

> On 1/18/2012 16:18, David Crawford wrote:
> > I'm quite new to MythTV and im trying to setup a User Job with a
> > script that I use to rip subtitles automatically from a recorded show
> > into a in .srt format.
>
> Sounds like all you need to do is run 'mythccextractor'.
>
>
> https://github.com/MythTV/mythtv/tree/master/mythtv/programs/mythccextractor
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>


raymond at wagnerrp

Jan 18, 2012, 3:45 PM

Post #6 of 89 (527 views)
Permalink
Re: User Job to rip subtitles from each program [In reply to]

On 1/18/2012 18:24, David Crawford wrote:
> On 18 January 2012 23:08, Raymond Wagner <raymond [at] wagnerrp
> <mailto:raymond [at] wagnerrp>> wrote:
>
> On 1/18/2012 16:18, David Crawford wrote:
> > I'm quite new to MythTV and im trying to setup a User Job with a
> > script that I use to rip subtitles automatically from a recorded
> show
> > into a in .srt format.
>
> Sounds like all you need to do is run 'mythccextractor'.
>
> https://github.com/MythTV/mythtv/tree/master/mythtv/programs/mythccextractor
>
> Thanks for the answer but doesnt CCExtractor only work with US closed
> captions - i forgot to mention im working with teletext dvb-s
> subtitles here that need to be ripped using a program called ProjectX.

MYTHccextractor, not ccextractor. It's a utility built into MythTV,
using MythTV's internal subtitle support. If they are text format
subtitles, and MythTV can display them, that utility should be able to
extract them to a subrip file.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


davidcrawford83 at gmail

Jan 19, 2012, 6:19 AM

Post #7 of 89 (516 views)
Permalink
Re: User Job to rip subtitles from each program [In reply to]

Thanks, I'll check that out, are there any instructions to set that up?

Only thing is - the scirpt i use exports the srt files to a certain folder
and in a certain way where duplicate words from live news subtitles are
removed. I need this as I have a app that i use to make keyword searches
within in the subs. Is it possible to cut that feature from that script and
place in mythccextractor?

On 18 January 2012 23:45, Raymond Wagner <raymond [at] wagnerrp> wrote:

> On 1/18/2012 18:24, David Crawford wrote:
> > On 18 January 2012 23:08, Raymond Wagner <raymond [at] wagnerrp
> > <mailto:raymond [at] wagnerrp>> wrote:
> >
> > On 1/18/2012 16:18, David Crawford wrote:
> > > I'm quite new to MythTV and im trying to setup a User Job with a
> > > script that I use to rip subtitles automatically from a recorded
> > show
> > > into a in .srt format.
> >
> > Sounds like all you need to do is run 'mythccextractor'.
> >
> >
> https://github.com/MythTV/mythtv/tree/master/mythtv/programs/mythccextractor
> >
> > Thanks for the answer but doesnt CCExtractor only work with US closed
> > captions - i forgot to mention im working with teletext dvb-s
> > subtitles here that need to be ripped using a program called ProjectX.
>
> MYTHccextractor, not ccextractor. It's a utility built into MythTV,
> using MythTV's internal subtitle support. If they are text format
> subtitles, and MythTV can display them, that utility should be able to
> extract them to a subrip file.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>


mtdean at thirdcontact

Jan 19, 2012, 8:47 AM

Post #8 of 89 (510 views)
Permalink
Re: User Job to rip subtitles from each program [In reply to]

On 01/19/2012 09:19 AM, David Crawford wrote:
> Thanks, I'll check that out, are there any instructions to set that up?
>
> Only thing is - the scirpt i use exports the srt files to a certain
> folder and in a certain way where duplicate words from live news
> subtitles are removed. I need this as I have a app that i use to make
> keyword searches within in the subs. Is it possible to cut that
> feature from that script and place in mythccextractor?

Or rip the full subtitles with mythccextractor, then have a script that
post-processes them to manipulate them for your search stuff...

Oh, and note that mythccextractor exists only in the
unstable/development version of MythTV.

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


raymond at wagnerrp

Jan 19, 2012, 9:46 AM

Post #9 of 89 (510 views)
Permalink
Re: User Job to rip subtitles from each program [In reply to]

On 1/19/2012 09:19, David Crawford wrote:
> Thanks, I'll check that out, are there any instructions to set that up?

Note that this utility was not added until 0.25. See commit...

https://github.com/MythTV/mythtv/commit/48079bbda6e274754e3db72df8aca159d02aeb8e

In a quick test run...

> mythccextractor --infile
/srv/mounts/twotb_1/recordings/4481_20120118210000.mpg
> ls /srv/mounts/twotb_1/recordings/4481_20120118210000.*
/srv/mounts/twotb_1/recordings/4481_20120118210000.608-cc1.und.srt
/srv/mounts/twotb_1/recordings/4481_20120118210000.708-service-01.und.srt

Looking back at your original question, you would need to use
'%DIR%/%FILE%', as file is only the basename of the recording. You may
also have permissions issues writing to '~dave', since it would be run
by whatever user was running the backend. I threw together a quick
wrapper script that would be used as "mythccextract_wrapper.py %JOBID%
%VERBOSEMODE%", with optional --outdir and --rename.

> Only thing is - the scirpt i use exports the srt files to a certain
> folder and in a certain way where duplicate words from live news
> subtitles are removed. I need this as I have a app that i use to make
> keyword searches within in the subs. Is it possible to cut that
> feature from that script and place in mythccextractor?

Mythccextract writes the srt files as another player would expect them
to appear for proper playback. I expect whatever duplicate filtering
you are doing is too application specific to have much use out of your
own. You would have to wrap that around the output files, but using
mythccextract would mean you weren't having to maintain your own
mechanism for extraction captions from the video. You may want to
consider dumping the captions into a database, and doing such filtering
at runtime instead. I know SageTV operates that way, and I expect
Digital Nirvana (who submitted the mythccextract patches) configures
their systems in that manner as well.
Attachments: mythccextract_wrapper.py (2.57 KB)


davidcrawford83 at gmail

Jan 19, 2012, 11:38 AM

Post #10 of 89 (507 views)
Permalink
Re: User Job to rip subtitles from each program [In reply to]

Oh, is there no way of adding to mythbuntu? - thats what im in the middle
of testing out.

On 19 January 2012 16:47, Michael T. Dean <mtdean [at] thirdcontact> wrote:

> On 01/19/2012 09:19 AM, David Crawford wrote:
> > Thanks, I'll check that out, are there any instructions to set that up?
> >
> > Only thing is - the scirpt i use exports the srt files to a certain
> > folder and in a certain way where duplicate words from live news
> > subtitles are removed. I need this as I have a app that i use to make
> > keyword searches within in the subs. Is it possible to cut that
> > feature from that script and place in mythccextractor?
>
> Or rip the full subtitles with mythccextractor, then have a script that
> post-processes them to manipulate them for your search stuff...
>
> Oh, and note that mythccextractor exists only in the
> unstable/development version of MythTV.
>
> Mike
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>


davidcrawford83 at gmail

Jan 19, 2012, 11:56 AM

Post #11 of 89 (507 views)
Permalink
Re: User Job to rip subtitles from each program [In reply to]

Whats 0.25? Sorry trying to figure this out.

On 19 January 2012 19:38, David Crawford <davidcrawford83 [at] gmail> wrote:

> Oh, is there no way of adding to mythbuntu? - thats what im in the middle
> of testing out.
>
>
> On 19 January 2012 16:47, Michael T. Dean <mtdean [at] thirdcontact> wrote:
>
>> On 01/19/2012 09:19 AM, David Crawford wrote:
>> > Thanks, I'll check that out, are there any instructions to set that up?
>> >
>> > Only thing is - the scirpt i use exports the srt files to a certain
>> > folder and in a certain way where duplicate words from live news
>> > subtitles are removed. I need this as I have a app that i use to make
>> > keyword searches within in the subs. Is it possible to cut that
>> > feature from that script and place in mythccextractor?
>>
>> Or rip the full subtitles with mythccextractor, then have a script that
>> post-processes them to manipulate them for your search stuff...
>>
>> Oh, and note that mythccextractor exists only in the
>> unstable/development version of MythTV.
>>
>> Mike
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users [at] mythtv
>> http://www.mythtv.org/mailman/listinfo/mythtv-users
>>
>
>


support at drdos

Jan 19, 2012, 12:08 PM

Post #12 of 89 (509 views)
Permalink
Re: User Job to rip subtitles from each program [In reply to]

David Crawford wrote:
> Whats 0.25? Sorry trying to figure this out.

The next greatest version of MythTV when it's released

Doug


--

Ben Franklin quote:

"Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety."

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


davidcrawford83 at gmail

Jan 19, 2012, 12:21 PM

Post #13 of 89 (503 views)
Permalink
Re: User Job to rip subtitles from each program [In reply to]

oh ok, is there a quick an easy way of adding it by any chance?

On 19 January 2012 20:08, Doug Lytle <support [at] drdos> wrote:

>
> David Crawford wrote:
> > Whats 0.25? Sorry trying to figure this out.
>
> The next greatest version of MythTV when it's released
>
> Doug
>
>
> --
>
> Ben Franklin quote:
>
> "Those who would give up Essential Liberty to purchase a little Temporary
> Safety, deserve neither Liberty nor Safety."
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>


support at drdos

Jan 19, 2012, 12:24 PM

Post #14 of 89 (504 views)
Permalink
Re: User Job to rip subtitles from each program [In reply to]

David Crawford wrote:
> oh ok, is there a quick an easy way of adding it by any chance?


That I'll leave for others to answer, I compile from source and am still
running .23.

Doug


--

Ben Franklin quote:

"Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety."

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


davidcrawford83 at gmail

Jan 19, 2012, 12:27 PM

Post #15 of 89 (502 views)
Permalink
Re: User Job to rip subtitles from each program [In reply to]

Is there a guide or anything like to make sure im configuring everything
correctly?

On 19 January 2012 20:24, Doug Lytle <support [at] drdos> wrote:

>
> David Crawford wrote:
> > oh ok, is there a quick an easy way of adding it by any chance?
>
>
> That I'll leave for others to answer, I compile from source and am still
> running .23.
>
> Doug
>
>
> --
>
> Ben Franklin quote:
>
> "Those who would give up Essential Liberty to purchase a little Temporary
> Safety, deserve neither Liberty nor Safety."
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>


mtdean at thirdcontact

Jan 19, 2012, 4:58 PM

Post #16 of 89 (496 views)
Permalink
Re: User Job to rip subtitles from each program [In reply to]

On 01/19/2012 03:08 PM, Doug Lytle wrote:
> David Crawford wrote:
>> Whats 0.25? Sorry trying to figure this out.
> The next greatest version of MythTV when it's released
>

And note that if you enable "0.25pre" on Mythbuntu repos (
http://www.mythbuntu.org/repos ), you're enabling unstable/development
code, and you're expected to keep up with the -dev and -commits mailing
lists (so you know what works and what doesn't and don't report bugs for
things that shouldn't be working/are works in progress) and so you know
when to update to fix issues that are fixed.

Chances are, now that Raymond has told you exactly what's wrong with
your current script, you may want to use the current script until 0.25
is released, then you can switch it to use mythccextractor,
instead--especially since either way you'll need a script (as with
mythccextractor, you'll need to post-process its output to strip out
duplicate words, as you want).

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


davidcrawford83 at gmail

Jan 19, 2012, 8:25 PM

Post #17 of 89 (494 views)
Permalink
Re: User Job to rip subtitles from each program [In reply to]

So enabling that will allow me test the script out at least?

And yes that would probably be the best thing to do (use the current script
until 0.25) Raymond was right about %DIR% being the thing needed and i'm
grateful for the help, the original script writer also told me i should try
this but the thing is the script still fails as it only seems to work from
the command terminal when i open the terminal where the video/recording is
located and try
python ~dave/uksub2srt/uksub2srt.py -i video.mpg -o
~dave/subtitles/video.srt

as opposed to -i ~dave/videos/video.mpg (or where the recording is located
/lar/lib/mythtv/livetv)

i think this is because the script writes a failure folder with logs in the
directory of the video and it can't do it in this case; the error it gives
is

error: the file /var/lib/livetv/failure/var/lib/livetv/video.mpg.txt does
not exist..

why does it have to do that ? :(

thanks alot for the help btw, especially raymond -very much appreciated

On 20 January 2012 00:58, Michael T. Dean <mtdean [at] thirdcontact> wrote:

> On 01/19/2012 03:08 PM, Doug Lytle wrote:
> > David Crawford wrote:
> >> Whats 0.25? Sorry trying to figure this out.
> > The next greatest version of MythTV when it's released
> >
>
> And note that if you enable "0.25pre" on Mythbuntu repos (
> http://www.mythbuntu.org/repos ), you're enabling unstable/development
> code, and you're expected to keep up with the -dev and -commits mailing
> lists (so you know what works and what doesn't and don't report bugs for
> things that shouldn't be working/are works in progress) and so you know
> when to update to fix issues that are fixed.
>
> Chances are, now that Raymond has told you exactly what's wrong with
> your current script, you may want to use the current script until 0.25
> is released, then you can switch it to use mythccextractor,
> instead--especially since either way you'll need a script (as with
> mythccextractor, you'll need to post-process its output to strip out
> duplicate words, as you want).
>
> Mike
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>


davidcrawford83 at gmail

Jan 20, 2012, 9:57 AM

Post #18 of 89 (483 views)
Permalink
Re: User Job to rip subtitles from each program [In reply to]

Any advice on how to setup mythccextractor in mythbuntu by any chance?

Cheers

On 20 January 2012 04:25, David Crawford <davidcrawford83 [at] gmail> wrote:

> So enabling that will allow me test the script out at least?
>
> And yes that would probably be the best thing to do (use the current
> script until 0.25) Raymond was right about %DIR% being the thing needed and
> i'm grateful for the help, the original script writer also told me i should
> try this but the thing is the script still fails as it only seems to work
> from the command terminal when i open the terminal where the
> video/recording is located and try
> python ~dave/uksub2srt/uksub2srt.py -i video.mpg -o
> ~dave/subtitles/video.srt
>
> as opposed to -i ~dave/videos/video.mpg (or where the recording is located
> /lar/lib/mythtv/livetv)
>
> i think this is because the script writes a failure folder with logs in
> the directory of the video and it can't do it in this case; the error it
> gives is
>
> error: the file /var/lib/livetv/failure/var/lib/livetv/video.mpg.txt does
> not exist..
>
> why does it have to do that ? :(
>
> thanks alot for the help btw, especially raymond -very much appreciated
>
> On 20 January 2012 00:58, Michael T. Dean <mtdean [at] thirdcontact> wrote:
>
>> On 01/19/2012 03:08 PM, Doug Lytle wrote:
>> > David Crawford wrote:
>> >> Whats 0.25? Sorry trying to figure this out.
>> > The next greatest version of MythTV when it's released
>> >
>>
>> And note that if you enable "0.25pre" on Mythbuntu repos (
>> http://www.mythbuntu.org/repos ), you're enabling unstable/development
>> code, and you're expected to keep up with the -dev and -commits mailing
>> lists (so you know what works and what doesn't and don't report bugs for
>> things that shouldn't be working/are works in progress) and so you know
>> when to update to fix issues that are fixed.
>>
>> Chances are, now that Raymond has told you exactly what's wrong with
>> your current script, you may want to use the current script until 0.25
>> is released, then you can switch it to use mythccextractor,
>> instead--especially since either way you'll need a script (as with
>> mythccextractor, you'll need to post-process its output to strip out
>> duplicate words, as you want).
>>
>> Mike
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users [at] mythtv
>> http://www.mythtv.org/mailman/listinfo/mythtv-users
>>
>
>


mtdean at thirdcontact

Jan 20, 2012, 10:14 AM

Post #19 of 89 (485 views)
Permalink
Re: User Job to rip subtitles from each program [In reply to]

fixed top posting

On 01/20/2012 12:57 PM, David Crawford wrote:
> On 20 January 2012 04:25, David Crawford wrote:
>> On 20 January 2012 00:58, Michael T. Dean wrote:
>>> On 01/19/2012 03:08 PM, Doug Lytle wrote:
>>>> David Crawford wrote:
>>>>> Whats 0.25? Sorry trying to figure this out.
>>>> The next greatest version of MythTV when it's released
>>> And note that if you enable "0.25pre" on Mythbuntu repos (
>>> http://www.mythbuntu.org/repos ), you're enabling unstable/development
>>> code, and you're expected to keep up with the -dev and -commits mailing
>>> lists (so you know what works and what doesn't and don't report bugs for
>>> things that shouldn't be working/are works in progress) and so you know
>>> when to update to fix issues that are fixed.
>>>
>>> Chances are, now that Raymond has told you exactly what's wrong with
>>> your current script, you may want to use the current script until 0.25
>>> is released, then you can switch it to use mythccextractor,
>>> instead--especially since either way you'll need a script (as with
>>> mythccextractor, you'll need to post-process its output to strip out
>>> duplicate words, as you want).
>> So enabling that will allow me test the script out at least?
>>
>> And yes that would probably be the best thing to do (use the current
>> script until 0.25) Raymond was right about %DIR% being the thing needed and
>> i'm grateful for the help, the original script writer also told me i should
>> try this but the thing is the script still fails as it only seems to work
>> from the command terminal when i open the terminal where the
>> video/recording is located and try
>> python ~dave/uksub2srt/uksub2srt.py -i video.mpg -o
>> ~dave/subtitles/video.srt
>>
>> as opposed to -i ~dave/videos/video.mpg (or where the recording is located
>> /lar/lib/mythtv/livetv)
>>
>> i think this is because the script writes a failure folder with logs in
>> the directory of the video and it can't do it in this case; the error it
>> gives is
>>
>> error: the file /var/lib/livetv/failure/var/lib/livetv/video.mpg.txt does
>> not exist..
>>
>> why does it have to do that ? :(
>>
>> thanks alot for the help btw, especially raymond -very much appreciated
> Any advice on how to setup mythccextractor in mythbuntu by any chance?
>

Most important advice: going to unstable/development is basically a
one-way process. You can't downgrade a database to -fixes/stable, after
using it with any unstable/development apps. Therefore, you can only
downgrade after restoring a pre-upgrade database backup:
http://www.mythtv.org/wiki/Database_Backup_and_Restore (which means you
lose any changes that occurred when running the unstable/development
code). If you really want to try, just enable 0.25pre--and sign up for
(and catch up and keep up with)
http://www.mythtv.org/mailman/listinfo/mythtv-commits and
http://www.mythtv.org/mailman/listinfo/mythtv-dev .

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


davidcrawford83 at gmail

Jan 30, 2012, 11:34 AM

Post #20 of 89 (352 views)
Permalink
Re: User Job to rip subtitles from each program [In reply to]

Hi,

I managed to get the script to work as a userjob in the end (whay hey!)

only thing is the file names system of the recordings. I use an app to
search through the subtitles and its designed to work with files with a
particular format (basicially the one used in DVBVIewer).

Is there a way that I can maybe add a script that can change the filenames
of the ripped subtitle files to read like:
%date%-%time%-%channel%-%programme% ?

Dave

On 20 January 2012 18:14, Michael T. Dean <mtdean [at] thirdcontact> wrote:

> fixed top posting
>
> On 01/20/2012 12:57 PM, David Crawford wrote:
> > On 20 January 2012 04:25, David Crawford wrote:
> >> On 20 January 2012 00:58, Michael T. Dean wrote:
> >>> On 01/19/2012 03:08 PM, Doug Lytle wrote:
> >>>> David Crawford wrote:
> >>>>> Whats 0.25? Sorry trying to figure this out.
> >>>> The next greatest version of MythTV when it's released
> >>> And note that if you enable "0.25pre" on Mythbuntu repos (
> >>> http://www.mythbuntu.org/repos ), you're enabling unstable/development
> >>> code, and you're expected to keep up with the -dev and -commits mailing
> >>> lists (so you know what works and what doesn't and don't report bugs
> for
> >>> things that shouldn't be working/are works in progress) and so you know
> >>> when to update to fix issues that are fixed.
> >>>
> >>> Chances are, now that Raymond has told you exactly what's wrong with
> >>> your current script, you may want to use the current script until 0.25
> >>> is released, then you can switch it to use mythccextractor,
> >>> instead--especially since either way you'll need a script (as with
> >>> mythccextractor, you'll need to post-process its output to strip out
> >>> duplicate words, as you want).
> >> So enabling that will allow me test the script out at least?
> >>
> >> And yes that would probably be the best thing to do (use the current
> >> script until 0.25) Raymond was right about %DIR% being the thing needed
> and
> >> i'm grateful for the help, the original script writer also told me i
> should
> >> try this but the thing is the script still fails as it only seems to
> work
> >> from the command terminal when i open the terminal where the
> >> video/recording is located and try
> >> python ~dave/uksub2srt/uksub2srt.py -i video.mpg -o
> >> ~dave/subtitles/video.srt
> >>
> >> as opposed to -i ~dave/videos/video.mpg (or where the recording is
> located
> >> /lar/lib/mythtv/livetv)
> >>
> >> i think this is because the script writes a failure folder with logs in
> >> the directory of the video and it can't do it in this case; the error it
> >> gives is
> >>
> >> error: the file /var/lib/livetv/failure/var/lib/livetv/video.mpg.txt
> does
> >> not exist..
> >>
> >> why does it have to do that ? :(
> >>
> >> thanks alot for the help btw, especially raymond -very much appreciated
> > Any advice on how to setup mythccextractor in mythbuntu by any chance?
> >
>
> Most important advice: going to unstable/development is basically a
> one-way process. You can't downgrade a database to -fixes/stable, after
> using it with any unstable/development apps. Therefore, you can only
> downgrade after restoring a pre-upgrade database backup:
> http://www.mythtv.org/wiki/Database_Backup_and_Restore (which means you
> lose any changes that occurred when running the unstable/development
> code). If you really want to try, just enable 0.25pre--and sign up for
> (and catch up and keep up with)
> http://www.mythtv.org/mailman/listinfo/mythtv-commits and
> http://www.mythtv.org/mailman/listinfo/mythtv-dev .
>
> Mike
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>


jeremy.dwain.jones at gmail

Jan 30, 2012, 3:33 PM

Post #21 of 89 (347 views)
Permalink
Re: User Job to rip subtitles from each program [In reply to]

On Mon, Jan 30, 2012 at 1:34 PM, David Crawford
<davidcrawford83 [at] gmail> wrote:
> Hi,
>
> I managed to get the script to work as a userjob in the end (whay hey!)
>
> only thing is the file names system of the recordings. I use an app to
> search through the subtitles and its designed to work with files with a
> particular format (basicially the one used in DVBVIewer).
>
> Is there a way that I can maybe add a script that can change the filenames
> of the ripped subtitle files to read like:
> %date%-%time%-%channel%-%programme% ?
>
> Dave

Take a look at mythlink.pl. It is designed to create symbolic links
of your recordings with *pretty* names like you described above, but
with some string substitutions, I bet you can piece something together
to work for your user created subtitle files. (If I understand what
you are doing in your userjob correctly)

Jeremy
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


davidcrawford83 at gmail

Jan 30, 2012, 4:09 PM

Post #22 of 89 (347 views)
Permalink
Re: User Job to rip subtitles from each program [In reply to]

Yeah, I actually took a look at that. The thing is I want to actually
re-name the subtitle files only in this "pretty" format otherwise the
application I have wont be able to read them properly. Just not sure how to
piece together what i need..


On 30 January 2012 23:33, Jeremy Jones <jeremy.dwain.jones [at] gmail> wrote:

> On Mon, Jan 30, 2012 at 1:34 PM, David Crawford
> <davidcrawford83 [at] gmail> wrote:
> > Hi,
> >
> > I managed to get the script to work as a userjob in the end (whay hey!)
> >
> > only thing is the file names system of the recordings. I use an app to
> > search through the subtitles and its designed to work with files with a
> > particular format (basicially the one used in DVBVIewer).
> >
> > Is there a way that I can maybe add a script that can change the
> filenames
> > of the ripped subtitle files to read like:
> > %date%-%time%-%channel%-%programme% ?
> >
> > Dave
>
> Take a look at mythlink.pl. It is designed to create symbolic links
> of your recordings with *pretty* names like you described above, but
> with some string substitutions, I bet you can piece something together
> to work for your user created subtitle files. (If I understand what
> you are doing in your userjob correctly)
>
> Jeremy
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>


mtdean at thirdcontact

Jan 30, 2012, 5:03 PM

Post #23 of 89 (344 views)
Permalink
Re: User Job to rip subtitles from each program [In reply to]

fixed top-posting

On 01/30/2012 07:09 PM, David Crawford wrote:
> On 30 January 2012 23:33, Jeremy Jones wrote:
>> On Mon, Jan 30, 2012 at 1:34 PM, David Crawford wrote:
>>> I managed to get the script to work as a userjob in the end (whay hey!)
>>>
>>> only thing is the file names system of the recordings. I use an app to
>>> search through the subtitles and its designed to work with files with a
>>> particular format (basicially the one used in DVBVIewer).
>>>
>>> Is there a way that I can maybe add a script that can change the
>>> filenames of the ripped subtitle files to read like:
>>> %date%-%time%-%channel%-%programme% ?
>> Take a look at mythlink.pl. It is designed to create symbolic links
>> of your recordings with *pretty* names like you described above, but
>> with some string substitutions, I bet you can piece something together
>> to work for your user created subtitle files. (If I understand what
>> you are doing in your userjob correctly)
> Yeah, I actually took a look at that. The thing is I want to actually
> re-name the subtitle files only in this "pretty" format otherwise the
> application I have wont be able to read them properly. Just not sure how to
> piece together what i need..

I was thinking your script is in Python, in which case you probably want
to use the Python bindings' support for creating pretty names. It works
with the same formatting specifiers as the Perl bindings'/mythlink.pl ones.

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users


davidcrawford83 at gmail

Jan 30, 2012, 5:16 PM

Post #24 of 89 (344 views)
Permalink
Re: User Job to rip subtitles from each program [In reply to]

Where can I find such a post process script? The script rips the subtitles
fine, just the filename of the .srt files thats the problem.

On 19 January 2012 16:47, Michael T. Dean <mtdean [at] thirdcontact> wrote:

> On 01/19/2012 09:19 AM, David Crawford wrote:
> > Thanks, I'll check that out, are there any instructions to set that up?
> >
> > Only thing is - the scirpt i use exports the srt files to a certain
> > folder and in a certain way where duplicate words from live news
> > subtitles are removed. I need this as I have a app that i use to make
> > keyword searches within in the subs. Is it possible to cut that
> > feature from that script and place in mythccextractor?
>
> Or rip the full subtitles with mythccextractor, then have a script that
> post-processes them to manipulate them for your search stuff...
>
> Oh, and note that mythccextractor exists only in the
> unstable/development version of MythTV.
>
> Mike
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>


raymond at wagnerrp

Jan 30, 2012, 5:27 PM

Post #25 of 89 (344 views)
Permalink
Re: User Job to rip subtitles from each program [In reply to]

On 1/30/2012 20:03, Michael T. Dean wrote:
> fixed top-posting
>
> On 01/30/2012 07:09 PM, David Crawford wrote:
>> On 30 January 2012 23:33, Jeremy Jones wrote:
>>> On Mon, Jan 30, 2012 at 1:34 PM, David Crawford wrote:
>>>> I managed to get the script to work as a userjob in the end (whay hey!)
>>>>
>>>> only thing is the file names system of the recordings. I use an app to
>>>> search through the subtitles and its designed to work with files with a
>>>> particular format (basicially the one used in DVBVIewer).
>>>>
>>>> Is there a way that I can maybe add a script that can change the
>>>> filenames of the ripped subtitle files to read like:
>>>> %date%-%time%-%channel%-%programme% ?
>>> Take a look at mythlink.pl. It is designed to create symbolic links
>>> of your recordings with *pretty* names like you described above, but
>>> with some string substitutions, I bet you can piece something together
>>> to work for your user created subtitle files. (If I understand what
>>> you are doing in your userjob correctly)
>> Yeah, I actually took a look at that. The thing is I want to actually
>> re-name the subtitle files only in this "pretty" format otherwise the
>> application I have wont be able to read them properly. Just not sure how to
>> piece together what i need..
> I was thinking your script is in Python, in which case you probably want
> to use the Python bindings' support for creating pretty names. It works
> with the same formatting specifiers as the Perl bindings'/mythlink.pl ones.

Specifically
http://www.mythtv.org/wiki/0.24_Python_bindings/Data_Handlers#formatPath

You could do something like...

import os
from MythTV import MythBE, findfile
be = MythBE()
prog = be.getRecording(<chanid>, <starttime>)
oldbase = prog.basename.rsplit('.',1)[0]
newbase = prog.formatPath('...').rsplit('.',1)[0]
sg = findfile(prog.basename, prog.storagegroup)
if sg is None:
raise Exception('file not found')
for f in os.listdir(sg.dirname):
if not (f.startswith(oldbase) and f.endswith('srt')):
continue
os.rename(os.path.join(sg.dirname, f), os.path.join(sg.dirname,
newbase+'.'+f.split('.')[1]))
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-users

First page Previous page 1 2 3 4 Next page Last page  View All MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.