[Cin] megapatch series 8

Andrew Randrianasulu randrianasulu at gmail.com
Tue Apr 19 18:14:54 CEST 2022


well, case 2 is for usual 2.0 stereo (two channels) .. but it has
identifier symbolically defined as bluray_audio_format_stereo and value of
this constant is '3' ....

so, for truehd you were getting 12 'channels' for usual 5.1 sound? so this
check failed..?



On Tuesday, April 19, 2022, Phyllis Smith <phylsmith2017 at gmail.com> wrote:

> For Truehd, in bdwrite.C getting error message as shown in second Bold
> below when 004 ffmpeg truehd new 4 patches added.
> In addition it shows "case 2" as STEREO although earlier in the code it is
> "3" as shown immediately below (and COMBO 12 not handled).
>
>   BLURAY_AUDIO_FORMAT_MONO = 1,
>   *BLURAY_AUDIO_FORMAT_STEREO = 3,*
>   BLURAY_AUDIO_FORMAT_MULTI_CHAN = 6,
>   BLURAY_AUDIO_FORMAT_COMBO = 12,   // Stereo ac3/dts,
> ...
> static int bd_audio_format(int channels)
> {
>   int audio_format = 0;
>   switch( channels ) {
>   case 1:
>     audio_format = BLURAY_AUDIO_FORMAT_MONO;
>     break;
>   case 2:
>     audio_format = BLURAY_AUDIO_FORMAT_STEREO;
>     break;
>   case 6:
>     audio_format = BLURAY_AUDIO_FORMAT_MULTI_CHAN;
>     break;
>   default:
>     fprintf(stderr, *"unknown bluray audio format %d ch\n", channels*);
>     exit(1);
>   }
>   return audio_format;
> }
>
> On Mon, Apr 18, 2022 at 10:33 PM Andrew Randrianasulu <
> randrianasulu at gmail.com> wrote:
>
>>
>>
>> On Tuesday, April 19, 2022, Phyllis Smith <phylsmith2017 at gmail.com>
>> wrote:
>>
>>> Forgot to add that this patch also applied and result checked in even
>>> though not yet functional:
>>>    0012-truehd-experimental-bluray-profile.patch
>>>
>>> On Mon, Apr 18, 2022 at 6:21 PM Phyllis Smith <phylsmith2017 at gmail.com>
>>> wrote:
>>>
>>>> Checked into GIT from megapile_8 the patches related to creating Bluray
>>>> media by Andrew:
>>>>
>>>> 0005-EXPERIMENT-update-bdwrite-for-lpcm-hevc.patch
>>>> 0006-EXPERIMENTAL-add-variable-chapter-interval-to-bdwrit.patch
>>>> 0007-EXPERIMENTAL-add-bd_profile-array-to-bdcreate.C-so-i.patch
>>>> 0008-EXPERIMENTAL-bdcreate-add-m2ts-profiles-part-1.patch
>>>> 0009-Fix-bdcreate.C-layout.patch
>>>> 0010-EXPERIMENTAL-attempt-to-get-value-from-popuptextbox.
>>>> patch0012-truehd-experimental-bluray-profile.patch
>>>> 0013-EXPERIMENTAL-add-truehd-audio-profile-for-bdcreate.C.patch
>>>> 0014-EXPERIMENTAL-add-tsmuxer-checkbox.patch
>>>> 0015-EXPERIMENTAL-fix-layout-in-bdcreate-after-tsmuxer-ch.patch
>>>> 0016-NOT-YET.patch
>>>> 0017-EXPERIMENTAL-shell-script-run-tsmuxer-conditionally-.patch
>>>> 0018-Attempt-at-fixing-bdwrite-stream_type-coding_type-co.patch
>>>> 0019-EXPERIMENTAL-attempt-at-fixing-bdwrite-on-Android-af.patch
>>>> 0020-EXPERIMENTAL-real-fix-for-bdwrite.patch
>>>> 0021-EXPERIMENTAL-try-to-add-lpcm-to-tsmuxer-meta-file.patch
>>>> 0022-EXPERIMENTAL-really-fix-audio-names-fir-tsmuxer-meta.patch
>>>> 0037-freebsd-in-bdcreate-bdwrite.patch
>>>>   and from megapile_10:
>>>> 0077-Better-layout-in-bdcreate.C-after-my-changes.patch
>>>>
>>>> Already in from a previous checkin as related to Bluray from megapile_8
>>>> were:
>>>> 0001-ffmpeg-4.4-bluray-lpcm-encoder.patch
>>>> 0002-Fix-ffmpeg-4.4-bluray-lpcm-patch-for-5.1.patch
>>>> 0003-Add-simple-m2ts-lpcm-profile.patch
>>>> 0011-Rename-m2ts_pcm.m2ts-to-bluray_lpcm.m2ts.patch
>>>> But because I forgot to test    0004-Improve-truehd-decoder-
>>>> encoder-from-ffmpeg.git.patch   the choice in bdcreate.C for truehd
>>>> (line 865) was commented out until I can test a smaller set tomorrow.
>>>> Although *I am confused why the following lines of code (around line
>>>> 70) in bdcreate.C do not include truehd as an option???*  I looked in
>>>> megapile_10 to see if I missed a related patch but did not see anything.
>>>>    static struct bd_profile {
>>>>         const char *name;
>>>> } bd_profiles[] = {
>>>>         {"bluray.m2ts"},
>>>>         {"bluray_lpcm.m2ts"},
>>>> };
>>>>
>>>
>>
>> I think I just did things a little bit different,  so may be  this piece
>> if code no longer needed -  need to look again (just wake up)
>>
>>
>>
>>>> and around line 350 (and maybe other places too?):
>>>>         fprintf(fp,"MUXOPT --blu-ray --hdmv-descriptors\n");
>>>>         fprintf(fp,"V_MPEG4/ISO/AVC, bd.m2ts, track=4113\n");
>>>>         if(!strcmp(use_profile, "bluray.m2ts"))
>>>>         fprintf(fp,"A_AC3, bd.m2ts, track=4352\n");
>>>>         if(!strcmp(use_profile, "bluray_lpcm.m2ts"))
>>>>         fprintf(fp,"A_LPCM, bd.m2ts, track=4352\n");
>>>>         fprintf(fp,"\n");
>>>>         fclose(fp);
>>>>
>>>
>>
>>
>> yes, not yet for tsmuxer - not quite sure how it works there (latery I
>> read truehd must come with ac3 'core' embedded, not sure if ffmpeg can
>> output this in one pass? - https://forum.doom9.org/
>> showthread.php?t=176668&page=61 - comment 1202 and around...)
>>
>> it will be very interesting to hear from your experiment!
>>
>>
>>
>>>> oh YES, you are right, I swapped those unintentionally!
>>>>>
>>>>> probably explains your bug with chapters?
>>>>>
>>>> YOU ARE RIGHT ! now chapters work (hopefully you understand why it
>>>> takes me so long to test and check in changes as I do not want to add
>>>> problems -- the oxen is slow, but the earth is patient).
>>>>
>>>
>>
>> yes, very big thanks for  NOT rushing things out!
>>
>>>
>>>> "lpcm" works too and when I press the "info" button on the remote
>>>> control on the LG bluray player, it clearly shows it is lpcm -- this not
>>>> working was my mistake due to not getting the current GIT head.
>>>>
>>>
>> \0/
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20220419/9f162b05/attachment-0001.htm>


More information about the Cin mailing list