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"
          }
질문됨 일 년 전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
지원 엔지니어
답변함 일 년 전
  • 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

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠