[mythtv-users] automating commercial removal

Tom Metro tmetro+mythtv-users at gmail.com
Wed Sep 26 01:24:27 UTC 2007


Chris Pinkham wrote:
> If you are confident enough in the commercial flagger to always copy
> the commercial skip list to the cut list automatically before
> transcoding...

I'm not. As I mentioned in another thread, the flagger routinely messes 
up on the last commercial break and includes the last segment of the 
show as part of the break. (I understand why this happens. The last 
segment is brief, and probably has scene changes of a frequency similar 
to commercials.)

But I'm also not transcoding universally. I was planning to only 
transcode certain "low value" shows. And shows in which the last segment 
only contains credits. (Although I'm considering a hack of having a user 
job that deleted the last cut from the cut list.)

Assuming most people don't universally transcode shows, I'd think 
copying the flag list to the cut list by default would be fairly 
harmless. If nothing else, it saves a keystroke when you go to manually 
tweak the cut list before running a manual transcode.


>     #!/bin/sh
>     mythcommflag --chanid $1 --starttime $2 -V $3
>     RESULT=$?
> 
>     mythcommflag --chanid $1 --starttime $2 -V $3 --gencutlist
>     exit $?

What's the purpose of "RESULT=$?" if RESULT is never used?


> I think you can even put multiple commands in the "Commercial Flagger
> command" setting as long as they are separated by a semi-colon.  So you
> might want to try the following instead of making a wrapper shell script:
> 
> mythcommflag -c %CHANID% -s %STARTTIME% -V %VERBOSELEVEL% ; mythcommflag -c %CHANID% -s %STARTTIME% -V %VERBOSELEVEL% --gencutlist

I'd substitute && for ;, but otherwise this is the approach I'd try first.

Running mythcommflag --gencutlist ... as a user job seemed to work fine, 
but this is something I'd like to apply universally.


>> Feels like there should be an --alsocopycutlist option, or something
>> like that.
> 
> Since you'd have to modify the "Commercial Flagger command" anyway to add
> this command line option and it's so easy to do this anyway by calling
> mythcommflag twice, I don't see a big need to add another option.

True. I guess my ideal would be flipping the behavior and adding a 
switch to *not* copy the cut list. Copying then becomes the default, and 
for those users that universally transcode, they can add the option to 
disable it.

  -Tom



More information about the mythtv-users mailing list