[mythtv-users] run transcode on selected programs schedules

Larry K lunchtimelarry at gmail.com
Sat Nov 19 17:27:35 EST 2005


Chris, thanks for the script. It worked great for me once I added the -l
switch to honor the commercial cut list. I didn't bother doing the
mythcommflag rebuild since my purpose here is to completely get rid of the
commercials.

My mythtv system is set up to commercial flag all shows, but I never set it
to cut the commercials because it is not 100% accurate. So, my requirement
was to cut commercials for ONLY those shows that I know are flagged 100%
correctly (i.e., Modern Marvels and Forensic Files both flag 100% correct.
Many other shows do not).

I found that the myth out-of-the-box behavior did not work well for me in
this situation. I struggled with recording profiles, trying to get transcode
to run AFTER I applied the commercial cut list. It never worked quite
right...

Now, here is what I do now for shows that I know are reliably commercial
flagged::

1. Auto commercial flag is done as with all shows
2. I enable custom job (#1) to apply the cut list:

 mythcommflag --chanid %CHANID% --starttime %STARTTIME% --gencutlist

 2. I enable custom job (#2) to transcode and remove the commercials:

transcode_job.sh %CHANID% %STARTTIMEISO% %DIR% %FILE%

The script looks pretty much like the one Chris posted. Seems to work just
fine.

I wonder, though...is transcoding the only way to remove commercials per the
cut list? I mean, I'm not transcoding to reduce the size of the files, or to
change the format of the recorded files, which I assume is the primary
purpose of transcoding. Is there another (easier) way to whack the
commercials besides transcoding?

Larry


On 10/18/05, Chris Pinkham <cpinkham at bc2va.org> wrote:
>
> > I want to transcode some shows automatically, but not all.
>
> <snip comments about using 0.18.1 version>
>
> > Do I need to use a user-job for this? If so can someone suggest a
> > working command line?
>
> You'll need to make a shell script then run the shell script as
> the user job. The shell script needs to run mythtranscode
> and then rename or copy the resulting file over the original
> file. You might need to rerun mythcommflag to rebuild the seektable
> for the recording afterwards. Something like this should work but
> might need some tweaking:
>
> ------cut here------
> #!/bin/sh
>
> CHANID="$1"
> STARTTIME="$2"
> DIR="$3"
> FILE="$4"
>
> mythtranscode -c ${CHANID} -s ${STARTTIME} -p autodetect
>
> if [ $? = 0 -a -r "${DIR}/${FILE}.tmp" ]
> then
> # transcode returned 0 for success and generated the .tmp new file
>
> # Comment out the next line if you do NOT want to keep the original
> mv ${DIR}/${FILE} ${DIR}/${FILE}.orig
>
> # Copy the new transcoded recording into place
> mv ${DIR}/${FILE}.tmp ${DIR}/${FILE}
>
> mythcommflag --rebuild --chanid ${CHANID} --starttime ${STARTTIME}
> fi
>
> ------cut here------
>
> If that script was called transcode_job.sh, you'd call it from the
> JobQueue as:
>
> transcode_job.sh %CHANID% %STARTTIMEISO% %DIR% %FILE%
>
> No attempt is made at error checking so you probably want to keep the
> first mv line uncommented for now. I also wrote this script up on the
> fly and haven't actually run it, so I'd run it on a test recording to
> begin with. :)
>
> --
> Chris
>
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20051119/66bfe854/attachment.htm


More information about the mythtv-users mailing list