<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Wed, Jul 3, 2013 at 9:00 AM, John Pilkington <span dir="ltr">&lt;<a href="mailto:J.Pilk@tesco.net" target="_blank">J.Pilk@tesco.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">On 03/07/13 12:57, Anthony Giggins wrote:<br>

</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">
<br>
<br>
On 7 January 2004 01:14, John Pilkington &lt;<a href="mailto:J.Pilk@tesco.net" target="_blank">J.Pilk@tesco.net</a><br></div><div class="im">
&lt;mailto:<a href="mailto:J.Pilk@tesco.net" target="_blank">J.Pilk@tesco.net</a>&gt;&gt; wrote:<br>
<br>
    On 03/07/13 12:31, Anthony Giggins wrote:<br>
<br>
<br>
<br>
        On 3 July 2013 17:35, John Pilkington &lt;<a href="mailto:J.Pilk@tesco.net" target="_blank">J.Pilk@tesco.net</a><br>
        &lt;mailto:<a href="mailto:J.Pilk@tesco.net" target="_blank">J.Pilk@tesco.net</a>&gt;<br></div><div class="im">
        &lt;mailto:<a href="mailto:J.Pilk@tesco.net" target="_blank">J.Pilk@tesco.net</a> &lt;mailto:<a href="mailto:J.Pilk@tesco.net" target="_blank">J.Pilk@tesco.net</a>&gt;&gt;&gt; wrote:<br>
<br>
             On 02/07/13 12:15, Anthony Giggins wrote:<br>
<br>
                 Hi All,<br>
<br>
                 Along the lines of<br></div>
        <a href="http://www.gossamer-threads." target="_blank">http://www.gossamer-threads.</a>__<u></u>__com/lists/mythtv/users/<u></u>537328<br>
<br>
        &lt;<a href="http://www.gossamer-threads." target="_blank">http://www.gossamer-threads.</a>_<u></u>_com/lists/mythtv/users/537328<br>
        &lt;<a href="http://www.gossamer-threads.com/lists/mythtv/users/537328" target="_blank">http://www.gossamer-threads.<u></u>com/lists/mythtv/users/537328</a>&gt;<u></u>&gt;<br>
<br>
                 And <a href="http://code.mythtv.org/trac/____ticket/11593" target="_blank">http://code.mythtv.org/trac/__<u></u>__ticket/11593</a><br>
        &lt;<a href="http://code.mythtv.org/trac/__ticket/11593" target="_blank">http://code.mythtv.org/trac/_<u></u>_ticket/11593</a>&gt;<div class="im"><br>
<br>
                 &lt;<a href="http://code.mythtv.org/trac/__ticket/11593" target="_blank">http://code.mythtv.org/trac/_<u></u>_ticket/11593</a><br>
        &lt;<a href="http://code.mythtv.org/trac/ticket/11593" target="_blank">http://code.mythtv.org/trac/<u></u>ticket/11593</a>&gt;&gt;<br>
<br>
                 I tried running 0.25-fixes mythtranscode in place of my<br>
        0.26-fixes<br>
                 mythtranscode but ran into library dependancy hell,<br>
                 I&#39;m just thinking our loud here but given the state of<br>
        mythtranscode<br>
                 should the dev&#39;s just up-port 0.25 mythtranscode or is<br>
        there<br>
                 some other<br>
                 reason these bugs are not being addressed? or are<br>
        others not<br>
                 experiencing these issues?<br>
<br>
                 the alternative lossless cut options are not nearly as<br>
        reliable,<br>
<br></div>
        <a href="http://www.mythtv.org/wiki/____Lossless_Cut" target="_blank">http://www.mythtv.org/wiki/___<u></u>_Lossless_Cut</a><br>
        &lt;<a href="http://www.mythtv.org/wiki/__Lossless_Cut" target="_blank">http://www.mythtv.org/wiki/__<u></u>Lossless_Cut</a>&gt;<div class="im"><br>
<br>
                 &lt;<a href="http://www.mythtv.org/wiki/__Lossless_Cut" target="_blank">http://www.mythtv.org/wiki/__<u></u>Lossless_Cut</a><br>
        &lt;<a href="http://www.mythtv.org/wiki/Lossless_Cut" target="_blank">http://www.mythtv.org/wiki/<u></u>Lossless_Cut</a>&gt;&gt;<br>
                 due to issues with HDHR recordings also rather I/O<br>
        intensive<br>
                 works much<br>
                 better with ionice -c3<br>
<br></div>
        <a href="http://www.mythtv.org/wiki/____MythDVBcut" target="_blank">http://www.mythtv.org/wiki/___<u></u>_MythDVBcut</a><br>
        &lt;<a href="http://www.mythtv.org/wiki/__MythDVBcut" target="_blank">http://www.mythtv.org/wiki/__<u></u>MythDVBcut</a>&gt;<div class="im"><br>
<br>
                 &lt;<a href="http://www.mythtv.org/wiki/__MythDVBcut" target="_blank">http://www.mythtv.org/wiki/__<u></u>MythDVBcut</a><br>
        &lt;<a href="http://www.mythtv.org/wiki/MythDVBcut" target="_blank">http://www.mythtv.org/wiki/<u></u>MythDVBcut</a>&gt;&gt;<br>
                 Works great with simple cuts only ie. leading/trailing<br>
        only, not<br>
                 so good<br>
                 with Ad removal<br>
<br>
<br>
             As the perpetrator of this script, let me comment.  It<br>
        works well<br>
             for me for recordings (DVB-T UK) where the video is<br>
        identified by<br>
             ffmpeg as &#39;mpeg2video (Main)&#39;, which it cuts using<br>
        Project-X.  For<br>
             other formats short audio glitches are to be expected at<br>
        internal cuts.<br>
<br>
             John P<br>
<br>
<br>
<br>
        Hi John,<br>
<br>
        And thank you for your script.<br>
<br>
        yes video is identified the same ie.<br>
        [NULL @ 0x72f180] start time is not set in estimate_timings_from_pts<br>
        [mpegts @ 0x729100] write_section_data: PID 0x499 CRC error<br>
        Input #0, mpegts, from<br></div>
        &#39;/storage3/recordings/4073___<u></u>20130703025000.mpg&#39;:<div class="im"><br>
            Duration: 01:29:58.36, start: 21314.455456, bitrate: 10094 kb/s<br>
              Stream #0:0[0x431]: Video: mpeg2video (Main), yuv420p,<br>
        1440x1080<br>
        [SAR 4:3 DAR 16:9], 11000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc<br>
              Stream #0:1[0x433](eng): Audio: ac3, 48000 Hz, stereo,<br>
        s16, 384 kb/s<br>
              Stream #0:2[0x435](eng): Subtitle: dvb_teletext<br>
              Stream #0:3[0x499]: Data: dsmcc_b<br>
        At least one output file must be specified<br>
<br>
        I&#39;m is Australia and what I&#39;m finding is simple cuts work great but<br>
        anything beyond a few cuts causes parts to be cut out<br>
        incorrectly and<br>
        creates files ALOT smaller then expected.<br>
<br>
        -rw-rw-r-- 1 seven  seven     6346752 Jul  3 21:13<br></div>
        /storage3/recordings/4073___<u></u>20130703025000.mpg<div class="im"><br>
        -rw-r--r-- 1 mythtv mythtv 6811607352 Jul  3 14:20<br></div>
        /storage3/recordings/4073___<u></u>20130703025000.mpg.old<div class="im"><br>
<br>
        Cheers,<br>
<br>
        Anthony<br>
<br>
<br>
    Hmm. Sorry to hear that.  All my mpeg2 stuff is 720x576 or less and<br>
    it works ok.  There&#39;s a note on the wiki page about the remuxing<br>
    failing at higher bitrates, and an mkv workaround, but I&#39;ve not used<br>
    that myself.<br>
<br>
    Cheers,<br>
<br>
    John<br>
<br>
OK sorry I dont know how I missed that thread or the comment on the wiki,<br>
<br>
is this ment to go into the existing script?<br>
<br>
mythffmpeg -fflags +genpts -i $DEMUXPREF.m2v -i $DEMUXAUDIO -vcodec copy<br>
-acodec copy &quot;$OUTFILE&quot;<br>
<br>
or is this a manual work around, It is more than likely a HD issue as<br>
the one that work reliably are not HD, perhaps this can be used only on<br>
a specific channel or perhaps depending on the resolution, what are your<br>
thoughts on automating this?<br>
<br>
Cheers,<br><br>
Anthony<br>
<br>
</div></blockquote>
<br>
That&#39;s not really something I want to get into - but mythffmpeg will tell you if it&#39;s an HD recording and you could set USEPJX=false for those.  The script should then work just it does for DVB-T2 HD h264 here in the UK. Not perfect, but it might suit better than what you have already.<br>

<br><br></blockquote><div>John has updated his script since I provided the HDHR HD workaround, so the variable names in my snippet are out of date. If you want to try my workaround you will need to replace:</div><div><br>
</div><div>CMD=&quot;ionice -c3  mplex -o &quot;$1&quot; -V -f 9 $TEMPHEAD.m2v $TEMPAUDIO&quot;<br></div><div><br></div><div>With something like this (the &quot;mediainfo&quot; package is required for this to work):</div>
<div><br></div><div>filename=`mediainfo &#39;--Inform=General;%FileName%&#39; &quot;$1&quot;`<br></div><div><br></div><div>OUTFILE=&quot;$filename&quot;.mkv<br></div><div><br></div><div>CMD=&quot;ionice -c3 mythffmpeg -fflags +genpts -i $TEMPHEAD.m2v -i $TEMPAUDIO -vcodec copy -acodec copy $OUTFILE &quot;</div>
<div><br></div><div><div># tell mythDB about new filename</div><div><br></div><div>echo &quot;update recorded set basename=&#39;${OUTFILE}&#39; where chanid=$chanid and starttime=&#39;$starttime&#39;;&quot; | mysql -N -u${DBUserName} -p${DBPassword} -h${DBLocalHostName} ${DBName}</div>
</div><div><br></div><div><br></div><div>You will as need to replace &quot;$1&quot; with &quot;$OUTFILE&quot; in the following lines:</div><div><br></div><div>CMD=&quot;ionice -c3 mythcommflag -q --rebuild --file $1 &quot;<br>
</div><div><br></div><div>echo -e &quot;Output file is $1. \n&quot;<br></div><div><br></div><div>echo -e &quot;\nRunning:  mythffmpeg -i &quot;$1&quot; 2&gt;&amp;1 | grep -C 4 Video&quot; | tee -a log$$<br></div><div><br>
</div><div>mythffmpeg -i &quot;$1&quot; 2&gt;&amp;1 | grep -C 4 Video | tee -a log$$<br></div><div><br></div><div>CMD=&quot;mv ${TEMPHEAD}_log.txt  ${LOGDIR}/$1.PXcut$$.txt&quot;<br></div><div><br></div><div>As I mentioned above, I am using a modified version of John&#39;s earlier script so this is untested. Let me know if this doesn&#39;t work.</div>
<div><br></div><div>Mike</div></div></div></div>