Proper CMAF config for media convert

0

I am using AWS lambda to create a job for media convert (using python). I was convert an input video in CMAF H265 format, but I am unable to figure out the correct settings for this. The createJob function returns an error :

botocore.errorfactory.BadRequestException: An error occurred (BadRequestException) when calling the CreateJob operation: /outputGroups/0/outputs/0: Should match exactly one schema defined in "oneOf"

The error displayed in log files of lambda has only this information and does not mention the exact fields which are missing the validation. When i compare my config with the sdk code, I am unable to find the possible error. Please help here.

Since the error is in outputs, including the corresponding object:

{
            "ContainerSettings": {
              "Container": "CMFC",
                  "CmfcSettings": {
                       "IFrameOnlyManifest": "EXCLUDE"
              }
            },
            "VideoDescription": {
              "Width": 468,
              "ScalingBehavior": "DEFAULT",
              "Height": 264,
              "TimecodeInsertion": "DISABLED",
              "AntiAlias": "ENABLED",
              "Sharpness": 50,
              "CodecSettings": {
                "Codec": "H_265",
                "H265Settings": {
                  "InterlaceMode": "PROGRESSIVE",
                  "NumberReferenceFrames": 3,
                  "GopClosedCadence": 1,
                  "GopSize": 90,
                  "Slices": 1,
                  "GopBReference": "DISABLED",
                  "SlowPal": "DISABLED",
                  "SpatialAdaptiveQuantization": "ENABLED",
                  "TemporalAdaptiveQuantization": "ENABLED",
                  "FlickerAdaptiveQuantization": "DISABLED",
                  "FramerateControl": "INITIALIZE_FROM_SOURCE",
                  "RateControlMode": "QVBR",
                  "QvbrSettings": {
                    "QvbrQualityLevel": 7
                  },
                  "MaxBitrate": 500000,
                  "CodecProfile": "MAIN_HIGH",
                  "CodecLevel": "LEVEL_3",
                  "Telecine": "NONE",
                  "MinIInterval": 0,
                  "AdaptiveQuantization": "HIGH",
                  "SceneChangeDetect": "ENABLED",
                  "QualityTuningLevel": "SINGLE_PASS_HQ",
                  "FramerateConversionAlgorithm": "DUPLICATE_DROP",
                  "UnregisteredSeiTimecode": "DISABLED",
                  "GopSizeUnits": "FRAMES",
                  "ParControl": "INITIALIZE_FROM_SOURCE",
                  "NumberBFramesBetweenReferenceFrames": 2,
                  "WriteMp4PackagingType":"HEV1"
                }
              },
              "AfdSignaling": "NONE",
              "DropFrameTimecode": "ENABLED",
              "RespondToAfd": "NONE",
              "ColorMetadata": "INSERT"
            },
            "AudioDescriptions": [
              {
                "AudioTypeControl": "FOLLOW_INPUT",
                "CodecSettings": {
                  "Codec": "AAC",
                  "AacSettings": {
                    "AudioDescriptionBroadcasterMix": "NORMAL",
                    "Bitrate": 96000,
                    "RateControlMode": "CBR",
                    "CodecProfile": "LC",
                    "CodingMode": "CODING_MODE_2_0",
                    "RawFormat": "NONE",
                    "SampleRate": 48000,
                    "Specification": "MPEG4"
                  }
                },
                "LanguageCodeControl": "FOLLOW_INPUT"
              }
            ],
            "NameModifier": "_468"
          }
已提問 1 年前檢視次數 372 次
1 個回答
0

Hi there,

Looking at your Output config JSON, I see that you have MUXED the Video and Audio for your CMAF output. What that means is that you have included the Video and Audio under a single output. Currently it looks like this:

CMAF Output Group: |
                   . -> Output-1:|
                                 . ->Video-Data,
                                 . ->Audio-Data

Per CMAF architecture, this is an incorrect way of designing a CMAF stream. The correct way would be to produce the same Video and Audio parameters, but in their separate outputs. This should look something like this:

CMAF Output Group: |
                   . -> Output-1:|
                                 . ->Video-Data
                   . -> Output-2:|
                                 . ->Audio-Data

You may try the following Output JSON instead of the one shared above:

{
    "ContainerSettings": {
        "Container": "CMFC",
        "CmfcSettings": {
            "IFrameOnlyManifest": "EXCLUDE"
        }
    },
    "VideoDescription": {
        "Width": 468,
        "ScalingBehavior": "DEFAULT",
        "Height": 264,
        "TimecodeInsertion": "DISABLED",
        "AntiAlias": "ENABLED",
        "Sharpness": 50,
        "CodecSettings": {
            "Codec": "H_265",
            "H265Settings": {
                "InterlaceMode": "PROGRESSIVE",
                "NumberReferenceFrames": 3,
                "GopClosedCadence": 1,
                "GopSize": 90,
                "Slices": 1,
                "GopBReference": "DISABLED",
                "MaxBitrate": 500000,
                "SlowPal": "DISABLED",
                "SpatialAdaptiveQuantization": "ENABLED",
                "TemporalAdaptiveQuantization": "ENABLED",
                "FlickerAdaptiveQuantization": "DISABLED",
                "FramerateControl": "INITIALIZE_FROM_SOURCE",
                "RateControlMode": "QVBR",
                "QvbrSettings": {
                    "QvbrQualityLevel": 7
                },
                "CodecProfile": "MAIN_HIGH",
                "Telecine": "NONE",
                "MinIInterval": 0,
                "AdaptiveQuantization": "HIGH",
                "CodecLevel": "LEVEL_3",
                "SceneChangeDetect": "ENABLED",
                "QualityTuningLevel": "SINGLE_PASS_HQ",
                "FramerateConversionAlgorithm": "DUPLICATE_DROP",
                "UnregisteredSeiTimecode": "DISABLED",
                "GopSizeUnits": "FRAMES",
                "ParControl": "INITIALIZE_FROM_SOURCE",
                "NumberBFramesBetweenReferenceFrames": 2,
                "WriteMp4PackagingType": "HEV1"
            }
        },
        "AfdSignaling": "NONE",
        "DropFrameTimecode": "ENABLED",
        "RespondToAfd": "NONE",
        "ColorMetadata": "INSERT"
    },
    "NameModifier": "_468"
}, {
    "ContainerSettings": {
        "Container": "CMFC",
        "CmfcSettings": {
            "IFrameOnlyManifest": "EXCLUDE"
        }
    },
    "AudioDescriptions": [{
        "AudioTypeControl": "FOLLOW_INPUT",
        "AudioSourceName": "Audio Selector 1",
        "CodecSettings": {
            "Codec": "AAC",
            "AacSettings": {
                "AudioDescriptionBroadcasterMix": "NORMAL",
                "Bitrate": 96000,
                "RateControlMode": "CBR",
                "CodecProfile": "LC",
                "CodingMode": "CODING_MODE_2_0",
                "RawFormat": "NONE",
                "SampleRate": 48000,
                "Specification": "MPEG4"
            }
        },
        "LanguageCodeControl": "FOLLOW_INPUT"
    }],
    "NameModifier": "_468"
}
AWS
支援工程師
已回答 1 年前
  • Thank you so much. Let me try this out and update soon.

  • Thanks, A modification to the baove config, finally worked. But i realised, I was looking for generating fmp4 H265 HLS streams. I am a little confused if CMAF with a different config will be used or Apple HLS .

    Is there any documentation I can refer to for this. Apologies for the possibly noob question

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南