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.<br>
<br>
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). <br><br>
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...<br>
<br>Now, here is what I do now for shows that I know are reliably commercial flagged::<br>
<br>
1. Auto commercial flag is done as with all shows<br>2. I enable custom job (#1) to apply the cut list:<br>
<br>
<span class="q"> mythcommflag --chanid %CHANID% --starttime %STARTTIME% --gencutlist<br>
<br>
</span>
2. I enable custom job (#2) to transcode and remove the commercials:<br>
<br>
transcode_job.sh %CHANID% %STARTTIMEISO% %DIR% %FILE%<br>
<br>
The script looks pretty much like the one Chris posted. Seems to work just fine.<br>
<br>
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?<br>
<br>
Larry<br>
<br>
<br><div><span class="gmail_quote">On 10/18/05, <b class="gmail_sendername">Chris Pinkham</b> <<a href="mailto:cpinkham@bc2va.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">cpinkham@bc2va.org
</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> I want to transcode some shows automatically, but not all.<br><br><snip comments about using 0.18.1 version><br><br>> Do I need to use a user-job for this? If so can someone suggest a<br>> working command line?
<br><br>You'll need to make a shell script then run the shell script as<br>the user job. The shell script needs to run mythtranscode<br>and then rename or copy the resulting file over the original<br>file. You might need to rerun mythcommflag to rebuild the seektable
<br>for the recording afterwards. Something like this should work but<br>might need some tweaking:<br><br>------cut here------<br>#!/bin/sh<br><br>CHANID="$1"<br>STARTTIME="$2"<br>DIR="$3"<br>
FILE="$4"<br><br>mythtranscode -c ${CHANID} -s ${STARTTIME} -p autodetect<br><br>if [ $? = 0 -a -r "${DIR}/${FILE}.tmp" ]<br>then<br> # transcode returned 0 for success and generated the .tmp new file
<br><br> # Comment out the next line if you do NOT want to keep the original<br> mv ${DIR}/${FILE} ${DIR}/${FILE}.orig<br><br> # Copy the new transcoded recording into place<br> mv ${DIR}/${FILE}.tmp ${DIR}/${FILE}
<br><br> mythcommflag --rebuild --chanid ${CHANID} --starttime ${STARTTIME}<br>fi<br><br>------cut here------<br><br>If that script was called transcode_job.sh, you'd call it from the<br>JobQueue as:<br><br>transcode_job.sh %CHANID% %STARTTIMEISO% %DIR% %FILE%
<br><br>No attempt is made at error checking so you probably want to keep the<br>first mv line uncommented for now. I also wrote this script up on the<br>fly and haven't actually run it, so I'd run it on a test recording to
<br>begin with. :)<br><br>--<br>Chris<br><br><br><br>_______________________________________________<br>mythtv-users mailing list<br><a href="mailto:mythtv-users@mythtv.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
mythtv-users@mythtv.org</a><br><a href="http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users</a><br><br><br></blockquote></div><br>