[mythtv-users] mythtranscode in V31

John Finlay finlay at moeraki.com
Sun Apr 5 21:18:12 UTC 2020


On 4/5/2020 10:50 AM, John Pilkington wrote:
> On 05/04/2020 18:07, John Finlay wrote:
>> On 4/4/2020 9:25 PM, David King wrote:
>>> On 4/4/20 2:41 PM, James Abernathy wrote:
>>>> I guess a detected commercial list is different from a cut list????
>>> True, they are indeed two separate things.  The "mythutil --gencutlist
>>> ..." command-line utility can be used to automatically generate a
>>> cutlist from the commercial marks.  But this would require a custom
>>> transcoding script, and since you're still going to manually edit the
>>> file to adjust the location of the cuts anyway, mythutil probably isn't
>>> an answer for you.
>>>
>>> I have a custom script that I use to do sort of the same thing that you
>>> are doing, except that my ultimate target is to put the cleaned up
>>> recording into a TV Series/Season folder in the Videos part of MythTV,
>>> not to have it replace the original recording file.  One of the 
>>> things I
>>> learned when doing this is that the cuts made by running "mythtranscode
>>> --honorcutlist" outputing into a file aren't precise.  These cuts are
>>> made at keyframe boundaries.  So, when you're editing your 
>>> recording, if
>>> you're putting your cut points on individual frames that are in between
>>> the keyframes, this level of precision is going to be lost when these
>>> recordings are transcoded.  The way to make precise frame-level cuts is
>>> to use the "mythtranscode --cleancut" option.  The problem with that
>>> option is that it requires that the output be directed into FIFO pipes,
>>> one for the audio and one for video.  Something else has to be running
>>> at the other end of those pipes, ffmpeg for example, reading the data
>>> from the pipes and encoding it into a video file.  Once again, this
>>> means writing your own script.
>>>
>>> If you decide to go that route:
>>>
>>> Here's a template for a custom transcoding script:
>>> https://www.mythtv.org/wiki/Transcode_wrap
>>>
>>> Here's the script that I use to transcode a recording into a video
>>> file.  It has lots of extraneous stuff in it that you might not care
>>> about, but it does show how I did the mythtranscode
>>> --cleancut->pipes->ffmpeg->file thing that I described above:
>>> https://github.com/dlk3/recording2video
>>>
>>> David King
>>> dave at daveking dot com
>>>
>>>
>> The last time I used mythtranscode specifying the lossless cut of 
>> mpeg2 files with the -m (--mepg2) option the cutlist cuts not on 
>> keyframes were honored by transcoding the section between the 
>> cutpoint and the next keyframe while copying the parts between 
>> keyframes. Has mythtranscode has been changed since then (0.29)?
>>
>> John
>
> Yes, I thought that it was able to make frame-accurate cuts in mpeg2 
> as you describe; I don't know when that came in, but probably several 
> (> 10) years ago.
>
> I stopped using it (enqueue transcode is by default X) because 
> attempts to make DVDs from the results would sometimes fail with no 
> obvious escape route.  I've been cutting at keyframes for years.  I 
> believe that in most digital transmissions edit points at source will 
> usually coincide with keyframes anyway, and if the object is only to 
> skip quickly over an ad-break, why worry about single-frame precision?
>
> John P

My experience is different - I find that USA OTA recordings esp. from 
PBS usually have keyframes which are not at transition points and by 
using keyframes as cutpoints there can be loss of needed video or audio 
or inclusion of unwanted video or audio.

John


More information about the mythtv-users mailing list