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

Mailing List Archive: MythTV: Users

How to transcode+cut commercials 100% lossless

 

 

MythTV users RSS feed   Index | Next | Previous | View Threaded


bobbygill at rogers

Aug 7, 2008, 11:30 PM

Post #1 of 16 (482 views)
Permalink
How to transcode+cut commercials 100% lossless

I'm wondering how I can basically take a recording, say a 60 min show, and
have it automatically transcode so that it ONLY cuts the commercials and the
result is *exactly* the same quality, basically a copy but without
commercials? (HD space not a concern so I want to retain the full quality).

Thanks very much for any help!
Bob


bolek-mythtv at curl

Aug 8, 2008, 6:39 AM

Post #2 of 16 (460 views)
Permalink
Re: How to transcode+cut commercials 100% lossless [In reply to]

Bobby Gill wrote:
> I'm wondering how I can basically take a recording, say a 60 min show,
> and have it automatically transcode so that it ONLY cuts the commercials
> and the result is *exactly* the same quality, basically a copy but
> without commercials? (HD space not a concern so I want to retain the
> full quality).

mythtranscode --mpeg2
_______________________________________________
mythtv-users mailing list
mythtv-users[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


digitalaudiorock at gmail

Aug 8, 2008, 7:54 AM

Post #3 of 16 (461 views)
Permalink
Re: How to transcode+cut commercials 100% lossless [In reply to]

On Fri, Aug 8, 2008 at 9:39 AM, Boleslaw Ciesielski
<bolek-mythtv[at]curl.com> wrote:
> Bobby Gill wrote:
>> I'm wondering how I can basically take a recording, say a 60 min show,
>> and have it automatically transcode so that it ONLY cuts the commercials
>> and the result is *exactly* the same quality, basically a copy but
>> without commercials? (HD space not a concern so I want to retain the
>> full quality).
>
> mythtranscode --mpeg2
> _______________________________________________
> mythtv-users mailing list
> mythtv-users[at]mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>

While that will create a lossless mpeg file, he's looking to cut
commercials. Unless I've missed something, I don't think there's any
way to do that automatically. That is, you can use --honorcutlist,
when specifying the channel id and start time, but that won't use the
skip list. Feel free to correct me if there's an automated way to do
this that I missed.

I've read stuff about doing the following:

mythcommflag --getskiplist -f /path/to/your/video/1071_20080718160000.mpg \
| tail -n 1 | awk '{print $4}' | sed 's/,/ /g'

...which outputs something like this:

32033-40438 85371-95205 118334-128571 149422-155734 167522-188588

...and then you can use the following with the above skip list:

mythtranscode -i /path/to/your/video/1071_20080718160000.mpg --mpeg2 \
--honorcutlist "32033-40438 85371-95205 118334-128571 149422-155734
167522-188588" -o your_output_file.mpg

The fact that mythtranscode requires this cutlist argument when run
against the file path (rather than the channel id and start time)
doesn't seem to be documented much of anywhere I've seen unless I
missed it.

In any case, the above does work.

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


bolek-mythtv at curl

Aug 8, 2008, 8:08 AM

Post #4 of 16 (459 views)
Permalink
Re: How to transcode+cut commercials 100% lossless [In reply to]

Tom Dexter wrote:
> While that will create a lossless mpeg file, he's looking to cut
> commercials. Unless I've missed something, I don't think there's any
> way to do that automatically. That is, you can use --honorcutlist,
> when specifying the channel id and start time, but that won't use the
> skip list. Feel free to correct me if there's an automated way to do
> this that I missed.

mythcommflag --gencutlist

will load the cut list from the skip list. After transcode you can clear
the cut list with

mythcommflag --clearcutlist

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


digitalaudiorock at gmail

Aug 8, 2008, 9:16 AM

Post #5 of 16 (456 views)
Permalink
Re: How to transcode+cut commercials 100% lossless [In reply to]

On Fri, Aug 8, 2008 at 11:08 AM, Boleslaw Ciesielski
<bolek-mythtv[at]curl.com> wrote:
> Tom Dexter wrote:
>> While that will create a lossless mpeg file, he's looking to cut
>> commercials. Unless I've missed something, I don't think there's any
>> way to do that automatically. That is, you can use --honorcutlist,
>> when specifying the channel id and start time, but that won't use the
>> skip list. Feel free to correct me if there's an automated way to do
>> this that I missed.
>
> mythcommflag --gencutlist
>
> will load the cut list from the skip list. After transcode you can clear
> the cut list with
>
> mythcommflag --clearcutlist
>
> Bolek

Very cool...I completely missed that one. Thanks!
Tom
_______________________________________________
mythtv-users mailing list
mythtv-users[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


drescherjm at gmail

Aug 8, 2008, 9:21 AM

Post #6 of 16 (457 views)
Permalink
Re: How to transcode+cut commercials 100% lossless [In reply to]

On Fri, Aug 8, 2008 at 12:16 PM, Tom Dexter <digitalaudiorock[at]gmail.com> wrote:
> On Fri, Aug 8, 2008 at 11:08 AM, Boleslaw Ciesielski
> <bolek-mythtv[at]curl.com> wrote:
>> Tom Dexter wrote:
>>> While that will create a lossless mpeg file, he's looking to cut
>>> commercials. Unless I've missed something, I don't think there's any
>>> way to do that automatically. That is, you can use --honorcutlist,
>>> when specifying the channel id and start time, but that won't use the
>>> skip list. Feel free to correct me if there's an automated way to do
>>> this that I missed.
>>
>> mythcommflag --gencutlist
>>
>> will load the cut list from the skip list. After transcode you can clear
>> the cut list with
>>
>> mythcommflag --clearcutlist
>>

BTW, Doing this automatically without first examining the cut points
will guarantee that a small percentage of your shows will have missed
content (for me 5% or so) and that a larger percentage of your shows
(20 to 30%) will still have a few commercials in them.

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


bobbygill at rogers

Aug 8, 2008, 11:45 AM

Post #7 of 16 (448 views)
Permalink
Re: How to transcode+cut commercials 100% lossless [In reply to]

Thanks for the input guys. Since I'm fairly new at Myth, just to clarify
then what exactly should I do if I don't have an automated process but just
pick a recording and want to cut out commercials and transcode 100%
lossless? I'd like to do this with past recordings I keep in myth.

I have taken note of the mythcommflag and mythtranscode commands, but for my
novice's sake could someone explain the steps I would take? Would I add a
job, and if so with which command and which would go first, second, etc.?
Thanks a lot for the help!! :)

Bob

On Fri, Aug 8, 2008 at 12:21 PM, John Drescher <drescherjm[at]gmail.com> wrote:

> On Fri, Aug 8, 2008 at 12:16 PM, Tom Dexter <digitalaudiorock[at]gmail.com>
> wrote:
> > On Fri, Aug 8, 2008 at 11:08 AM, Boleslaw Ciesielski
> > <bolek-mythtv[at]curl.com> wrote:
> >> Tom Dexter wrote:
> >>> While that will create a lossless mpeg file, he's looking to cut
> >>> commercials. Unless I've missed something, I don't think there's any
> >>> way to do that automatically. That is, you can use --honorcutlist,
> >>> when specifying the channel id and start time, but that won't use the
> >>> skip list. Feel free to correct me if there's an automated way to do
> >>> this that I missed.
> >>
> >> mythcommflag --gencutlist
> >>
> >> will load the cut list from the skip list. After transcode you can clear
> >> the cut list with
> >>
> >> mythcommflag --clearcutlist
> >>
>
> BTW, Doing this automatically without first examining the cut points
> will guarantee that a small percentage of your shows will have missed
> content (for me 5% or so) and that a larger percentage of your shows
> (20 to 30%) will still have a few commercials in them.
>
> John
> _______________________________________________
> mythtv-users mailing list
> mythtv-users[at]mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>


bolek-mythtv at curl

Aug 8, 2008, 1:55 PM

Post #8 of 16 (448 views)
Permalink
Re: How to transcode+cut commercials 100% lossless [In reply to]

Bobby Gill wrote:
> Thanks for the input guys. Since I'm fairly new at Myth, just to clarify
> then what exactly should I do if I don't have an automated process but
> just pick a recording and want to cut out commercials and transcode 100%
> lossless? I'd like to do this with past recordings I keep in myth.
>
> I have taken note of the mythcommflag and mythtranscode commands, but
> for my novice's sake could someone explain the steps I would take? Would
> I add a job, and if so with which command and which would go first,
> second, etc.? Thanks a lot for the help!! :)

Read this:

http://www.mythtv.org/wiki/index.php/Removing_Commercials
http://www.mythtv.org/wiki/index.php/Script_-_RemoveCommercials
http://www.mythtv.org/wiki/index.php/Talk:Script_-_RemoveCommercials
_______________________________________________
mythtv-users mailing list
mythtv-users[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


bobbygill at rogers

Aug 8, 2008, 2:05 PM

Post #9 of 16 (447 views)
Permalink
Re: How to transcode+cut commercials 100% lossless [In reply to]

Thank you, I am here:
http://www.mythtv.org/wiki/index.php/Talk:Script_-_RemoveCommercials#honorcutlist_and_mpeg2_lossless_transcoding

But this part:

"Then the script can be modified as such.

CHANID=$3
STARTTIME=`echo $4 | sed -e
's/\([0-9]\{4\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)/\1-\2-\3-\4-\5/'`
....
mythtranscode --mpgeg2 --honorcutlist -c $CHANID -s $STARTTIME -o
$VIDEODIR/$FILENAME.tmp"


Where exactly do I add that into the script? I don't wanna put it in the
wrong place. Thanks for the links!

Bob

On Fri, Aug 8, 2008 at 4:55 PM, Boleslaw Ciesielski
<bolek-mythtv[at]curl.com>wrote:

> Bobby Gill wrote:
> > Thanks for the input guys. Since I'm fairly new at Myth, just to clarify
> > then what exactly should I do if I don't have an automated process but
> > just pick a recording and want to cut out commercials and transcode 100%
> > lossless? I'd like to do this with past recordings I keep in myth.
> >
> > I have taken note of the mythcommflag and mythtranscode commands, but
> > for my novice's sake could someone explain the steps I would take? Would
> > I add a job, and if so with which command and which would go first,
> > second, etc.? Thanks a lot for the help!! :)
>
> Read this:
>
> http://www.mythtv.org/wiki/index.php/Removing_Commercials
> http://www.mythtv.org/wiki/index.php/Script_-_RemoveCommercials
> http://www.mythtv.org/wiki/index.php/Talk:Script_-_RemoveCommercials
> _______________________________________________
> mythtv-users mailing list
> mythtv-users[at]mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>


bolek-mythtv at curl

Aug 8, 2008, 2:20 PM

Post #10 of 16 (441 views)
Permalink
Re: How to transcode+cut commercials 100% lossless [In reply to]

Bobby Gill wrote:
> Thank you, I am here:
> http://www.mythtv.org/wiki/index.php/Talk:Script_-_RemoveCommercials#honorcutlist_and_mpeg2_lossless_transcoding
>
> But this part:
>
> "Then the script can be modified as such.
>
> CHANID=$3
> STARTTIME=`echo $4 | sed -e 's/\([0-9]\{4\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)/\1-\2-\3-\4-\5/'`
> ....
> mythtranscode --mpgeg2 --honorcutlist -c $CHANID -s $STARTTIME -o $VIDEODIR/$FILENAME.tmp"
>
>
>
> Where exactly do I add that into the script? I don't wanna put it in the
> wrong place. Thanks for the links!

You should be able to just use the complete script at the end of this page.

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


mythtv at corwyn

Aug 8, 2008, 2:31 PM

Post #11 of 16 (441 views)
Permalink
Re: How to transcode+cut commercials 100% lossless [In reply to]

If you get this working, pls let me know, as I've tried and it
doesn't appear to work.

At 05:20 PM 8/8/2008, Boleslaw Ciesielski wrote:
>Bobby Gill wrote:
> > Thank you, I am here:
> >
> http://www.mythtv.org/wiki/index.php/Talk:Script_-_RemoveCommercials#honorcutlist_and_mpeg2_lossless_transcoding
> >
> > But this part:
> >
> > "Then the script can be modified as such.
> >
> > CHANID=$3
> > STARTTIME=`echo $4 | sed -e
> 's/\([0-9]\{4\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)/\1-\2-\3-\4-\5/'`
> > ....
> > mythtranscode --mpgeg2 --honorcutlist -c $CHANID -s $STARTTIME -o
> $VIDEODIR/$FILENAME.tmp"
> >
> >
> >
> > Where exactly do I add that into the script? I don't wanna put it in the
> > wrong place. Thanks for the links!
>
>You should be able to just use the complete script at the end of this page.
>
>Bolek
>_______________________________________________
>mythtv-users mailing list
>mythtv-users[at]mythtv.org
>http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users



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


bobbygill at rogers

Aug 8, 2008, 6:35 PM

Post #12 of 16 (428 views)
Permalink
Re: How to transcode+cut commercials 100% lossless [In reply to]

Okay I'm getting some wierd stuff happening. For some of my recordings, the
Job Queue winds up with successfull completion, but on others it is giving
me an error that it can't find the executable (the script).

I have the file in /usr/bin, permissions are right:

~ # ls -laF /usr/bin/ | grep removecommercials
-rwxr-xr-x 1 bobby2 bobby2 2100 2008-08-08 20:51 removecommercials*
-rw-r--r-- 1 bobby2 bobby2 5641 2008-08-08 20:47 removecommercials~

This is from /var/log/mythbackend.log:

2008-08-08 20:54:17.701 JobQueue Error: User Job 'removecommercials
/media/mythtv Licence to Grill- Skateboard Dude Party- Maple mustard pork
burgers; chicken smoked pizza; corn on the cob with chili
butter.-07.10.08.mpg' failed, unable to find executable, check your PATH and
backend logs.
2008-08-08 20:54:17.790 JobQueue: Current PATH:
'/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin:/opt/kde/bin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/opt/qt/bin'
(END) "

Here's my path from /etc/profile:

export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin


I'm kind of intermediate at best with linux so hopefully someone can clarify
what I've done wrong or am missing here?? My job in mythtv-setup is still:

removecommercials %DIR% %FILE%


Now not only this, but on the recordings that ran the job successfully there
is no difference; nothing has been cut. I'm using the entire script from the
Talk page as advised by Boleslaw. Is my Job command above incorrect for this
version of the script?? This is puzzilng :(

Thanks for any help,
Bob



On Fri, Aug 8, 2008 at 5:31 PM, <mythtv[at]corwyn.net> wrote:

>
> If you get this working, pls let me know, as I've tried and it
> doesn't appear to work.
>
> At 05:20 PM 8/8/2008, Boleslaw Ciesielski wrote:
> >Bobby Gill wrote:
> > > Thank you, I am here:
> > >
> >
> http://www.mythtv.org/wiki/index.php/Talk:Script_-_RemoveCommercials#honorcutlist_and_mpeg2_lossless_transcoding
> > >
> > > But this part:
> > >
> > > "Then the script can be modified as such.
> > >
> > > CHANID=$3
> > > STARTTIME=`echo $4 | sed -e
> >
> 's/\([0-9]\{4\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)/\1-\2-\3-\4-\5/'`
> > > ....
> > > mythtranscode --mpgeg2 --honorcutlist -c $CHANID -s $STARTTIME -o
> > $VIDEODIR/$FILENAME.tmp"
> > >
> > >
> > >
> > > Where exactly do I add that into the script? I don't wanna put it in
> the
> > > wrong place. Thanks for the links!
> >
> >You should be able to just use the complete script at the end of this
> page.
> >
> >Bolek
> >_______________________________________________
> >mythtv-users mailing list
> >mythtv-users[at]mythtv.org
> >http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users[at]mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>


gvenkat at gmail

Aug 8, 2008, 9:41 PM

Post #13 of 16 (419 views)
Permalink
Re: How to transcode+cut commercials 100% lossless [In reply to]

On Fri, Aug 8, 2008 at 6:35 PM, Bobby Gill <bobbygill[at]rogers.com> wrote:

> On Fri, Aug 8, 2008 at 5:31 PM, <mythtv[at]corwyn.net> wrote:
>
>>
>> If you get this working, pls let me know, as I've tried and it
>> doesn't appear to work.
>>
>> At 05:20 PM 8/8/2008, Boleslaw Ciesielski wrote:
>> >Bobby Gill wrote:
>> > > Thank you, I am here:
>> > >
>> >
>> http://www.mythtv.org/wiki/index.php/Talk:Script_-_RemoveCommercials#honorcutlist_and_mpeg2_lossless_transcoding
>> > >
>> > > But this part:
>> > >
>> > > "Then the script can be modified as such.
>> > >
>> > > CHANID=$3
>> > > STARTTIME=`echo $4 | sed -e
>> >
>> 's/\([0-9]\{4\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)/\1-\2-\3-\4-\5/'`
>> > > ....
>> > > mythtranscode --mpgeg2 --honorcutlist -c $CHANID -s $STARTTIME -o
>> > $VIDEODIR/$FILENAME.tmp"
>> > >
>> > >
>> > >
>> > > Where exactly do I add that into the script? I don't wanna put it in
>> the
>> > > wrong place. Thanks for the links!
>> >
>> >You should be able to just use the complete script at the end of this
>> page.
>> >
>> >Bolek
>>
>
> Okay I'm getting some wierd stuff happening. For some of my recordings, the
> Job Queue winds up with successfull completion, but on others it is giving
> me an error that it can't find the executable (the script).
>
> I have the file in /usr/bin, permissions are right:
>
> ~ # ls -laF /usr/bin/ | grep removecommercials
> -rwxr-xr-x 1 bobby2 bobby2 2100 2008-08-08 20:51 removecommercials*
> -rw-r--r-- 1 bobby2 bobby2 5641 2008-08-08 20:47 removecommercials~
>
> This is from /var/log/mythbackend.log:
>
> 2008-08-08 20:54:17.701 JobQueue Error: User Job 'removecommercials
> /media/mythtv Licence to Grill- Skateboard Dude Party- Maple mustard pork
> burgers; chicken smoked pizza; corn on the cob with chili
> butter.-07.10.08.mpg' failed, unable to find executable, check your PATH and
> backend logs.
> 2008-08-08 20:54:17.790 JobQueue: Current PATH:
> '/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin:/opt/kde/bin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/opt/qt/bin'
> (END) "
>
> Here's my path from /etc/profile:
>
> export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin
>
> I'm kind of intermediate at best with linux so hopefully someone can
> clarify what I've done wrong or am missing here?? My job in mythtv-setup is
> still:
>
> removecommercials %DIR% %FILE%
>
> Now not only this, but on the recordings that ran the job successfully
> there is no difference; nothing has been cut. I'm using the entire script
> from the Talk page as advised by Boleslaw. Is my Job command above incorrect
> for this version of the script?? This is puzzilng :(
>
> Thanks for any help,
> Bob
>

From your mythbackend.log, I am seeing that the recording file name has
characters like space and semi-colons that are special to the shell and
could affect how user jobs are invoked. This could possibly be related to
the "unable to find executable" error you're seeing in the mythbackend.log
(since semi-colons that are not enclosed in quotes signify end of a command
and the start of the next command in shell). Do the jobs that complete
successfully have any special characters like space or semi-colon in their
recording file names ?

Have you tried enclosing the arguments to the "removecommercials" script in
double quotes ? This would prevent any shell interpretation of the
arguments. Also, from the talk page on the wiki, it looks like the
"removecommercials" script would need the chanid and starttime parameters
for mpeg2 lossless transcoding to work properly. Hence, you might want to
try specifying the user job in mythtv-setup as:

removecommercials "%DIR%" "%FILE%" "%CHANID%" "%STARTTIME%"

The quotes are probably not necessary for any other arguments but %FILE%,
but it makes better sense consistency wise to use the quotes uniformly on
all arguments.

-=Venkat=-


bobbygill at rogers

Aug 8, 2008, 10:32 PM

Post #14 of 16 (415 views)
Permalink
Re: How to transcode+cut commercials 100% lossless [In reply to]

You're a genius Mr. Venkat!! I changed the user job as you instructed
exactly, and I just successfully completed the job on 4 different show
episodes. I should've known, it must be that I use Mythrename.pl as a user
job as well and my recording names do have spaces in them!

Finally, recordings at full quality but commercials cut! Really appreciate
the help!

I'm curious, since I don't understand the script yet at my knowledge level,
what is happening? Is the original recording simply edited with the
appropriate commercial parts of the video file removed? Or is it taking the
original recording and reencoding it after stripping the commercials? Just
for knowledge sake.

Thanks again so much!!
Bob

On Sat, Aug 9, 2008 at 12:41 AM, G Venkataraman <gvenkat[at]gmail.com> wrote:

> On Fri, Aug 8, 2008 at 6:35 PM, Bobby Gill <bobbygill[at]rogers.com> wrote:
>
>> On Fri, Aug 8, 2008 at 5:31 PM, <mythtv[at]corwyn.net> wrote:
>>
>>>
>>> If you get this working, pls let me know, as I've tried and it
>>> doesn't appear to work.
>>>
>>> At 05:20 PM 8/8/2008, Boleslaw Ciesielski wrote:
>>> >Bobby Gill wrote:
>>> > > Thank you, I am here:
>>> > >
>>> >
>>> http://www.mythtv.org/wiki/index.php/Talk:Script_-_RemoveCommercials#honorcutlist_and_mpeg2_lossless_transcoding
>>> > >
>>> > > But this part:
>>> > >
>>> > > "Then the script can be modified as such.
>>> > >
>>> > > CHANID=$3
>>> > > STARTTIME=`echo $4 | sed -e
>>> >
>>> 's/\([0-9]\{4\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)/\1-\2-\3-\4-\5/'`
>>> > > ....
>>> > > mythtranscode --mpgeg2 --honorcutlist -c $CHANID -s $STARTTIME -o
>>> > $VIDEODIR/$FILENAME.tmp"
>>> > >
>>> > >
>>> > >
>>> > > Where exactly do I add that into the script? I don't wanna put it in
>>> the
>>> > > wrong place. Thanks for the links!
>>> >
>>> >You should be able to just use the complete script at the end of this
>>> page.
>>> >
>>> >Bolek
>>>
>>
>> Okay I'm getting some wierd stuff happening. For some of my recordings,
>> the Job Queue winds up with successfull completion, but on others it is
>> giving me an error that it can't find the executable (the script).
>>
>> I have the file in /usr/bin, permissions are right:
>>
>> ~ # ls -laF /usr/bin/ | grep removecommercials
>> -rwxr-xr-x 1 bobby2 bobby2 2100 2008-08-08 20:51 removecommercials*
>> -rw-r--r-- 1 bobby2 bobby2 5641 2008-08-08 20:47 removecommercials~
>>
>> This is from /var/log/mythbackend.log:
>>
>> 2008-08-08 20:54:17.701 JobQueue Error: User Job 'removecommercials
>> /media/mythtv Licence to Grill- Skateboard Dude Party- Maple mustard pork
>> burgers; chicken smoked pizza; corn on the cob with chili
>> butter.-07.10.08.mpg' failed, unable to find executable, check your PATH and
>> backend logs.
>> 2008-08-08 20:54:17.790 JobQueue: Current PATH:
>> '/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin:/opt/kde/bin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/opt/qt/bin'
>> (END) "
>>
>> Here's my path from /etc/profile:
>>
>> export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin
>>
>> I'm kind of intermediate at best with linux so hopefully someone can
>> clarify what I've done wrong or am missing here?? My job in mythtv-setup is
>> still:
>>
>> removecommercials %DIR% %FILE%
>>
>> Now not only this, but on the recordings that ran the job successfully
>> there is no difference; nothing has been cut. I'm using the entire script
>> from the Talk page as advised by Boleslaw. Is my Job command above incorrect
>> for this version of the script?? This is puzzilng :(
>>
>> Thanks for any help,
>> Bob
>>
>
> From your mythbackend.log, I am seeing that the recording file name has
> characters like space and semi-colons that are special to the shell and
> could affect how user jobs are invoked. This could possibly be related to
> the "unable to find executable" error you're seeing in the mythbackend.log
> (since semi-colons that are not enclosed in quotes signify end of a command
> and the start of the next command in shell). Do the jobs that complete
> successfully have any special characters like space or semi-colon in their
> recording file names ?
>
> Have you tried enclosing the arguments to the "removecommercials" script in
> double quotes ? This would prevent any shell interpretation of the
> arguments. Also, from the talk page on the wiki, it looks like the
> "removecommercials" script would need the chanid and starttime parameters
> for mpeg2 lossless transcoding to work properly. Hence, you might want to
> try specifying the user job in mythtv-setup as:
>
> removecommercials "%DIR%" "%FILE%" "%CHANID%" "%STARTTIME%"
>
> The quotes are probably not necessary for any other arguments but %FILE%,
> but it makes better sense consistency wise to use the quotes uniformly on
> all arguments.
>
> -=Venkat=-
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users[at]mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
>


bobbygill at rogers

Aug 9, 2008, 8:50 PM

Post #15 of 16 (327 views)
Permalink
Re: How to transcode+cut commercials 100% lossless [In reply to]

Okay, also I just noticed while watching a recording I ran the script on
that it is skipping during the episode, I hit E and loaded the cutlist, it
keeps seeing commercials during the episode apparently and skipping a few
minutes, but of course it's just the half hour show at 21 minutes with all
commercials cut out already. What's going on? In Edit mode I hit C to clear
the cutlist but as soon as I come back to the recording after escaping out
to the menu, it still does the same thing ???

Bob

On Sat, Aug 9, 2008 at 1:32 AM, Bobby Gill <bobbygill[at]rogers.com> wrote:

> You're a genius Mr. Venkat!! I changed the user job as you instructed
> exactly, and I just successfully completed the job on 4 different show
> episodes. I should've known, it must be that I use Mythrename.pl as a user
> job as well and my recording names do have spaces in them!
>
> Finally, recordings at full quality but commercials cut! Really appreciate
> the help!
>
> I'm curious, since I don't understand the script yet at my knowledge level,
> what is happening? Is the original recording simply edited with the
> appropriate commercial parts of the video file removed? Or is it taking the
> original recording and reencoding it after stripping the commercials? Just
> for knowledge sake.
>
> Thanks again so much!!
> Bob
>
> On Sat, Aug 9, 2008 at 12:41 AM, G Venkataraman <gvenkat[at]gmail.com> wrote:
>
>> On Fri, Aug 8, 2008 at 6:35 PM, Bobby Gill <bobbygill[at]rogers.com> wrote:
>>
>>> On Fri, Aug 8, 2008 at 5:31 PM, <mythtv[at]corwyn.net> wrote:
>>>
>>>>
>>>> If you get this working, pls let me know, as I've tried and it
>>>> doesn't appear to work.
>>>>
>>>> At 05:20 PM 8/8/2008, Boleslaw Ciesielski wrote:
>>>> >Bobby Gill wrote:
>>>> > > Thank you, I am here:
>>>> > >
>>>> >
>>>> http://www.mythtv.org/wiki/index.php/Talk:Script_-_RemoveCommercials#honorcutlist_and_mpeg2_lossless_transcoding
>>>> > >
>>>> > > But this part:
>>>> > >
>>>> > > "Then the script can be modified as such.
>>>> > >
>>>> > > CHANID=$3
>>>> > > STARTTIME=`echo $4 | sed -e
>>>> >
>>>> 's/\([0-9]\{4\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)/\1-\2-\3-\4-\5/'`
>>>> > > ....
>>>> > > mythtranscode --mpgeg2 --honorcutlist -c $CHANID -s $STARTTIME -o
>>>> > $VIDEODIR/$FILENAME.tmp"
>>>> > >
>>>> > >
>>>> > >
>>>> > > Where exactly do I add that into the script? I don't wanna put it in
>>>> the
>>>> > > wrong place. Thanks for the links!
>>>> >
>>>> >You should be able to just use the complete script at the end of this
>>>> page.
>>>> >
>>>> >Bolek
>>>>
>>>
>>> Okay I'm getting some wierd stuff happening. For some of my recordings,
>>> the Job Queue winds up with successfull completion, but on others it is
>>> giving me an error that it can't find the executable (the script).
>>>
>>> I have the file in /usr/bin, permissions are right:
>>>
>>> ~ # ls -laF /usr/bin/ | grep removecommercials
>>> -rwxr-xr-x 1 bobby2 bobby2 2100 2008-08-08 20:51 removecommercials*
>>> -rw-r--r-- 1 bobby2 bobby2 5641 2008-08-08 20:47 removecommercials~
>>>
>>> This is from /var/log/mythbackend.log:
>>>
>>> 2008-08-08 20:54:17.701 JobQueue Error: User Job 'removecommercials
>>> /media/mythtv Licence to Grill- Skateboard Dude Party- Maple mustard pork
>>> burgers; chicken smoked pizza; corn on the cob with chili
>>> butter.-07.10.08.mpg' failed, unable to find executable, check your PATH and
>>> backend logs.
>>> 2008-08-08 20:54:17.790 JobQueue: Current PATH:
>>> '/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin:/opt/kde/bin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/opt/qt/bin'
>>> (END) "
>>>
>>> Here's my path from /etc/profile:
>>>
>>> export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin
>>>
>>> I'm kind of intermediate at best with linux so hopefully someone can
>>> clarify what I've done wrong or am missing here?? My job in mythtv-setup is
>>> still:
>>>
>>> removecommercials %DIR% %FILE%
>>>
>>> Now not only this, but on the recordings that ran the job successfully
>>> there is no difference; nothing has been cut. I'm using the entire script
>>> from the Talk page as advised by Boleslaw. Is my Job command above incorrect
>>> for this version of the script?? This is puzzilng :(
>>>
>>> Thanks for any help,
>>> Bob
>>>
>>
>> From your mythbackend.log, I am seeing that the recording file name has
>> characters like space and semi-colons that are special to the shell and
>> could affect how user jobs are invoked. This could possibly be related to
>> the "unable to find executable" error you're seeing in the mythbackend.log
>> (since semi-colons that are not enclosed in quotes signify end of a command
>> and the start of the next command in shell). Do the jobs that complete
>> successfully have any special characters like space or semi-colon in their
>> recording file names ?
>>
>> Have you tried enclosing the arguments to the "removecommercials" script
>> in double quotes ? This would prevent any shell interpretation of the
>> arguments. Also, from the talk page on the wiki, it looks like the
>> "removecommercials" script would need the chanid and starttime parameters
>> for mpeg2 lossless transcoding to work properly. Hence, you might want to
>> try specifying the user job in mythtv-setup as:
>>
>> removecommercials "%DIR%" "%FILE%" "%CHANID%" "%STARTTIME%"
>>
>> The quotes are probably not necessary for any other arguments but %FILE%,
>> but it makes better sense consistency wise to use the quotes uniformly on
>> all arguments.
>>
>> -=Venkat=-
>>
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users[at]mythtv.org
>> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>>
>>
>


bobbygill at rogers

Aug 9, 2008, 8:54 PM

Post #16 of 16 (326 views)
Permalink
Re: How to transcode+cut commercials 100% lossless [In reply to]

Sorry to flood here but I just ran the job again on the recording and now it
runs smoothly with no skips, wierd. What did I do wrong? Do I have to run
this job twice on each recording?

Bob

On Sat, Aug 9, 2008 at 11:50 PM, Bobby Gill <bobbygill[at]rogers.com> wrote:

> Okay, also I just noticed while watching a recording I ran the script on
> that it is skipping during the episode, I hit E and loaded the cutlist, it
> keeps seeing commercials during the episode apparently and skipping a few
> minutes, but of course it's just the half hour show at 21 minutes with all
> commercials cut out already. What's going on? In Edit mode I hit C to clear
> the cutlist but as soon as I come back to the recording after escaping out
> to the menu, it still does the same thing ???
>
> Bob
>
>
> On Sat, Aug 9, 2008 at 1:32 AM, Bobby Gill <bobbygill[at]rogers.com> wrote:
>
>> You're a genius Mr. Venkat!! I changed the user job as you instructed
>> exactly, and I just successfully completed the job on 4 different show
>> episodes. I should've known, it must be that I use Mythrename.pl as a user
>> job as well and my recording names do have spaces in them!
>>
>> Finally, recordings at full quality but commercials cut! Really appreciate
>> the help!
>>
>> I'm curious, since I don't understand the script yet at my knowledge
>> level, what is happening? Is the original recording simply edited with the
>> appropriate commercial parts of the video file removed? Or is it taking the
>> original recording and reencoding it after stripping the commercials? Just
>> for knowledge sake.
>>
>> Thanks again so much!!
>> Bob
>>
>> On Sat, Aug 9, 2008 at 12:41 AM, G Venkataraman <gvenkat[at]gmail.com>wrote:
>>
>>> On Fri, Aug 8, 2008 at 6:35 PM, Bobby Gill <bobbygill[at]rogers.com> wrote:
>>>
>>>> On Fri, Aug 8, 2008 at 5:31 PM, <mythtv[at]corwyn.net> wrote:
>>>>
>>>>>
>>>>> If you get this working, pls let me know, as I've tried and it
>>>>> doesn't appear to work.
>>>>>
>>>>> At 05:20 PM 8/8/2008, Boleslaw Ciesielski wrote:
>>>>> >Bobby Gill wrote:
>>>>> > > Thank you, I am here:
>>>>> > >
>>>>> >
>>>>> http://www.mythtv.org/wiki/index.php/Talk:Script_-_RemoveCommercials#honorcutlist_and_mpeg2_lossless_transcoding
>>>>> > >
>>>>> > > But this part:
>>>>> > >
>>>>> > > "Then the script can be modified as such.
>>>>> > >
>>>>> > > CHANID=$3
>>>>> > > STARTTIME=`echo $4 | sed -e
>>>>> >
>>>>> 's/\([0-9]\{4\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)/\1-\2-\3-\4-\5/'`
>>>>> > > ....
>>>>> > > mythtranscode --mpgeg2 --honorcutlist -c $CHANID -s $STARTTIME -o
>>>>> > $VIDEODIR/$FILENAME.tmp"
>>>>> > >
>>>>> > >
>>>>> > >
>>>>> > > Where exactly do I add that into the script? I don't wanna put it
>>>>> in the
>>>>> > > wrong place. Thanks for the links!
>>>>> >
>>>>> >You should be able to just use the complete script at the end of this
>>>>> page.
>>>>> >
>>>>> >Bolek
>>>>>
>>>>
>>>> Okay I'm getting some wierd stuff happening. For some of my recordings,
>>>> the Job Queue winds up with successfull completion, but on others it is
>>>> giving me an error that it can't find the executable (the script).
>>>>
>>>> I have the file in /usr/bin, permissions are right:
>>>>
>>>> ~ # ls -laF /usr/bin/ | grep removecommercials
>>>> -rwxr-xr-x 1 bobby2 bobby2 2100 2008-08-08 20:51 removecommercials*
>>>> -rw-r--r-- 1 bobby2 bobby2 5641 2008-08-08 20:47 removecommercials~
>>>>
>>>> This is from /var/log/mythbackend.log:
>>>>
>>>> 2008-08-08 20:54:17.701 JobQueue Error: User Job 'removecommercials
>>>> /media/mythtv Licence to Grill- Skateboard Dude Party- Maple mustard pork
>>>> burgers; chicken smoked pizza; corn on the cob with chili
>>>> butter.-07.10.08.mpg' failed, unable to find executable, check your PATH and
>>>> backend logs.
>>>> 2008-08-08 20:54:17.790 JobQueue: Current PATH:
>>>> '/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin:/opt/kde/bin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/opt/qt/bin'
>>>> (END) "
>>>>
>>>> Here's my path from /etc/profile:
>>>>
>>>> export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin
>>>>
>>>> I'm kind of intermediate at best with linux so hopefully someone can
>>>> clarify what I've done wrong or am missing here?? My job in mythtv-setup is
>>>> still:
>>>>
>>>> removecommercials %DIR% %FILE%
>>>>
>>>> Now not only this, but on the recordings that ran the job successfully
>>>> there is no difference; nothing has been cut. I'm using the entire script
>>>> from the Talk page as advised by Boleslaw. Is my Job command above incorrect
>>>> for this version of the script?? This is puzzilng :(
>>>>
>>>> Thanks for any help,
>>>> Bob
>>>>
>>>
>>> From your mythbackend.log, I am seeing that the recording file name has
>>> characters like space and semi-colons that are special to the shell and
>>> could affect how user jobs are invoked. This could possibly be related to
>>> the "unable to find executable" error you're seeing in the mythbackend.log
>>> (since semi-colons that are not enclosed in quotes signify end of a command
>>> and the start of the next command in shell). Do the jobs that complete
>>> successfully have any special characters like space or semi-colon in their
>>> recording file names ?
>>>
>>> Have you tried enclosing the arguments to the "removecommercials" script
>>> in double quotes ? This would prevent any shell interpretation of the
>>> arguments. Also, from the talk page on the wiki, it looks like the
>>> "removecommercials" script would need the chanid and starttime parameters
>>> for mpeg2 lossless transcoding to work properly. Hence, you might want to
>>> try specifying the user job in mythtv-setup as:
>>>
>>> removecommercials "%DIR%" "%FILE%" "%CHANID%" "%STARTTIME%"
>>>
>>> The quotes are probably not necessary for any other arguments but %FILE%,
>>> but it makes better sense consistency wise to use the quotes uniformly on
>>> all arguments.
>>>
>>> -=Venkat=-
>>>
>>> _______________________________________________
>>> mythtv-users mailing list
>>> mythtv-users[at]mythtv.org
>>> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>>>
>>>
>>
>

MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.