[mythtv-users] mythtranscode in V31

John Finlay finlay at moeraki.com
Tue Apr 7 17:06:20 UTC 2020


Am I correct in assuming that the gotcha you mentioned is the fact that 
mythtranscode can only losslessly cut h264 video by using --cleancut? 
Thanks for the heads up on that; I had assumed that you were transcoding 
mpeg2.

Lucky for me currently all videos I record OTA are mpeg2 so lossless cut 
mythtranscode using --mpeg2 works well but someday I will probably have 
to use --cleancut.


On 4/7/20 5:53 AM, David King wrote:
> On 4/5/20 10:08 PM, Stephen Worthington wrote:
>> On Sun, 5 Apr 2020 15:08:12 -0400, you wrote:
>>
>>> I'm biased against MPG or TS files as being
>>> less compact than MKV (H264) files with similar quality.
>> You have the wrong idea about MPG and TS files.  They are container
>> formats - what is inside them is what matters.  In New Zealand, they
>> contain what is broadcast here, which is H.264, just as you are
>> putting in MKV files.  Your MKV files are likely more compact for one
>> or both of two reasons:
>>
>> 1) Your source (broadcast) recording format is not using H.264 inside,
>> but something that is less efficient (MPEG2 video, for example).
>>
>> 2) You are telling your MKV conversion software to do lossy
>> compression to a lower bit rate in H.264 than the original file.  So
>> of course it will be smaller, but also lower quality, both because of
>> the lower bit rate, and due to the inevitable loss of quality caused
>> by any lossy conversion process.
>>
>> If you want the best quality in your MKV H.264 conversions then you
>> should be using a profile that specifies the best H.264 format that
>> your playback devices can play.  It is likely that if you are just
>> using a default setting for the profile that it will be creating a
>> mid-range H.264 profile like Main at L2.  If you encode in High at L4, for
>> example, which MythTV can play happily, you get significantly higher
>> quality for the same bit rate, or a lower bit rate for the same
>> quality, or some combination of both.  High at L4 is what New Zealand TV
>> broadcasts use.
>>
>> See here for some information about H.264 profiles and levels:
>>
>> https://www.rgb.com/h264-profiles
>> https://en.wikipedia.org/wiki/Advanced_Video_Coding
> Just like you, my starting point is MythTV recordings with h264 video
> and ac3 audio in a TS (MPEG2) container.  My experience is that when I
> that use Myth's tools to transcode that down to anything smaller, the
> quality/file size trade-off is nowhere near as good as when I use
> something like ffmpeg or HandBrake to re-encode the video into h264/ac3
> in a MP4 or MKV container, regardless of which mythtranscode profile I
> use.  Logically this never made sense to me as all of these tools are
> based on the same set of underlying codec libraries.  But it was what it
> was and I never cared enough to wade through the myriad of encoding
> options to analyse the cause.  I just used the tools, and options, that
> gave me the results I wanted.
>
> I started out years ago with a script that did what John Finley
> described as his workflow, to "edit" the TS recording using MythTV's
> tools and set a cut list, do a lossless transcode to remove the
> commercials using --cleancut and pipes as I described earlier, and then
> use HandBrake to re-encode and shrink the file into a more compact
> h264/aac MP4 container.  Recently I rewrote this script to eliminate the
> middle step, the lossless transcode.  Now I go directly from the
> original recording, transcoding it with the --cleancut option and piping
> it to ffmpeg which outputs a final re-encoded, compact h264/ac3 MKV file.
>
> I'm not trying to convince anyone that my approach is best.  All I was
> doing was letting John know about a "gotcha" that I ran into when I was
> working out my process to do what he appears to be trying to do, while
> trying to get precise edits in my videos.  At the time, it took me weeks
> to learn about the --cleancut option, and how to use it.  I thought
> maybe I could save him a little time.  I had no intention of starting up
> a technical back-and-forth over which codecs and which container formats
> are best.
>
> David King
> dave at daveking dot com
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org



More information about the mythtv-users mailing list