<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 21 March 2018 at 03:36, John Pilkington <span dir="ltr"><<a href="mailto:J.Pilk@tesco.net" target="_blank">J.Pilk@tesco.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On 01/02/18 13:10, John Pilkington wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hi:  I rarely record DVB-T2 HD h264 recordings in which I want to make internal cuts, but it would be good to be able to do make them in a way that doesn't introduce glitches in playback.<br>
<br>
I find that Mythfrontend does a good job in playing uncut recordings with cutlists, but uPnP then plays all the ads and skipping is painful.<br>
<br>
My MythDVBcut script chops at videokeyframes; there may be glitches at cuts but there's no long-term loss of quality or a/v sync.  I've found other scripts that work similarly and are more elegantly coded. Frontend and uPnP glitches may differ in style and severity.<br>
<br>
I've tried going via mkvmerge but at present see a/v sync drift and haven't found an mkv/audio format that my tv plays acceptably via uPnP<br>
<br>
So, before I waste yet more time, has anyone found (or developed) a toolchain that is available and does this job properly?<br>
<br>
Thanks,<br>
<br>
</blockquote>
<br></span>
I posted that a few weeks ago.  There hasn't been much comeback, perhaps because multi-terabyte disks have become affordable, or perhaps through disillusionment, but I do now have a script that works reasonably well with UK DVB-T2 HD h264 recordings and might be useful elsewhere.  I have appended it to the MythDVBcut entry in the MythTV wiki; I've called it MythTScut.<br>
<br>
It uses mythffmpeg, with mapping to give one video and one audio stream.  That could probably be changed, but I haven't tested any more.  I find that it needs two runs, the first with no cutlist, to discard unrecognised streams and get the cuts in (about) the right position.  At present the most successful commands seem to be:<br>
============<br>
with no cutlist<br>
<br>
mythTScut.sh /path/to/infile.ts R 1<br>
<br>
mv infile.ts.old ... to somewhere else, say infile_orig.ts<br>
<br>
establish editpoints showing wanted keyframes using the frontend editor<br>
<br>
mythTScut.sh /path/to/infile.ts R 1<br>
============<br>
The output may be either a Recording (R), replacing the renamed original file and clearing its cutlist and bookmarks, or a Video (V) which leaves these unchanged. The third parameter (1,2) is intended to define the way in which the input streams are synched, but I find that 2 is still rather unpredictable or prone to failure.  I have tried several ffmpeg options without getting anything that seemed better. YMMV<br>
<br>
ffmpeg complains during both passes, which are primarily disk-speed-limited.  It still usually works.<br>
<br>
Like my earlier scripts, this is intended for use from the desktop, giving feedback and creating a logfile that includes the position of the cutpoints in the output, and stream details from ffprobe.  The first page needs editing to define working directories and database access, and intermediate files are not all erased on exit.<br>
<br>
I'm posting it as work-in-progress with no guarantees and no implied support, in the hope that it may be useful.<div class="gmail-HOEnZb"><div class="gmail-h5"><br>
<br>
> John P<br><br></div></div></blockquote><div>Thanks John,</div><div><br></div><div>I'll give it a whirl, typically I just been avoiding recording h264 channels where possible.</div><div><br></div><div>Cheers,</div><div><br></div><div>Anthony</div></div><br></div></div>