UnprocessableEntityException: outputGroups[0].outputGroupSettings.streamName additional property "streamName" exists in object when not allowed; outputGroups[0].outputGroupSettings Object does not mat

0

I am trying to create an rtmp push input and create a channel with this input only to livestream using aws elemental medialive apis.

I am facing this error, while creating the channel through createChannel API, while i was able to make the input with createInput API.

Error: UnprocessableEntityException: outputGroups[0].outputGroupSettings.streamName additional property "streamName" exists in object when not allowed; outputGroups[0].outputGroupSettings Object does not match "hlsGroup"

This is my channel config:

const channelConfig = {
        Name: "test-channel",
        ChannelClass: "SINGLE_PIPELINE", 
        InputAttachments: [
          {
            InputId: data.Input.Id,
            InputSettings: {
              AudioSelectors: [
                {
                  Name: "Audio Selector 1",
                },
              ],
              VideoSelector: {
                ColorSpace: "FOLLOW",
                ColorSpaceUsage: "FORCE",
              },
            },
          },
        ],
        Destinations: [
          {
            Id: "destination1",
            Settings: [
              {
                StreamName: "test-stream",
                Url: "rtmp://a.rtmp.youtube.com/live2/h0g0-j7sx-g6ap-ztz0-3xcj",
              },
            ],
          },
        ],
        EncoderSettings: {
          AudioDescriptions: [
            {
              AudioSelectorName: "Audio Selector 1",
              CodecSettings: {
                AacSettings: {
                  Bitrate: 96000,
                  InputType: "NORMAL",
                  Profile: "LC",
                  RateControlMode: "CBR",
                  SampleRate: 48000,
                },
              },
              LanguageCodeControl: "FOLLOW_INPUT",
              Name: "Audio Description 1",
              AudioTypeControl: "FOLLOW_INPUT",
            },
          ],
          OutputGroups: [
            {
              Name: "File Group",
              Outputs: [
                {
                  OutputSettings: {
                    HlsOutputSettings: {
                        NameModifier: "hls",
                        HlsSettings: {
                            StandardHlsSettings: {
                                AudioRenditionSets: "program_audio",
                                M3u8Settings: {
                                    AudioFramesPerPes: 4,
                                    AudioPids: "492-498",
                                    EcmPid: "8182",
                                    PatInterval: 0,
                                    PcrControl: "PCR_EVERY_PES_PACKET",
                                    PcrPeriod: 400,
                                    PcrPid: "8181",
                                },
                            },
                        },
                    },
                  },
                  VideoDescriptionName: "Video Description",
                },
              ],
                OutputGroupSettings: {
                    HlsGroupSettings: {
                        Destination:{
                            DestinationRefId: "destination1"
                        }
                    }
                    
                }
            },
          ],
          TimecodeConfig: {
            Source: "EMBEDDED",
          },
          VideoDescriptions: [
            {
              CodecSettings: {
                H264Settings: {
                  AdaptiveQuantization: "HIGH",
                  AfdSignaling: "NONE",
                  Bitrate: 500000,
                  ColorMetadata: "INSERT",
                  EntropyEncoding: "CABAC",
                  FlickerAq: "ENABLED",
                  FramerateControl: "SPECIFIED",
                  FramerateDenominator: 1,
                  FramerateNumerator: 60,
                  GopBReference: "ENABLED",
                  GopClosedCadence: 1,
                  GopNumBFrames: 3,
                  GopSize: 60,
                  GopSizeUnits: "FRAMES",
                  Level: "H264_LEVEL_3",
                  LookAheadRateControl: "HIGH",
                  MaxBitrate: 500000,
                  MinIInterval: 0,
                  NumRefFrames: 3,
                  ParControl: "INITIALIZE_FROM_SOURCE",
                  Profile: "MAIN",
                  RateControlMode: "CBR",
                  ScanType: "PROGRESSIVE",
                  SceneChangeDetect: "ENABLED",
                  Slices: 1,
                  SpatialAq: "ENABLED",
                  Syntax: "DEFAULT",
                  TemporalAq: "ENABLED",
                  TimecodeInsertion: "DISABLED",
                },
              },
              Height: 720,
              Name: "Video Description",
              RespondToAfd: "NONE",
              ScalingBehavior: "DEFAULT",
              Sharpness: 50,
              Width: 1280,
            },
          ],
        },
      }

Please help regarding the error.

  • Please redact your stream destination from this post.

2 Answers
0

Hi, Your immediate issue is you are using an HLS output group type to send to an RTMP destination. You need to create an RTMP output group instead. Please see https://docs.aws.amazon.com/medialive/latest/ug/rtmp-create-procedure.html

Regards, Steve

AWS
Steve_W
answered a year ago
  • Hey, thanks for the reply. But can you give me a suggestion about the config, as i need to create the channel using the api.

0

Hi, See https://docs.aws.amazon.com/medialive/latest/apireference/channels.html

You can only select one "outputGroupSettings" option per output group, the one you want is:

"rtmpGroupSettings": {
            "authenticationScheme": enum,
            "cacheLength": integer,
            "restartDelay": integer,
            "cacheFullBehavior": enum,
            "captionData": enum,
            "inputLossAction": enum,
            "adMarkers": [
              enum
            ]
          },

Regards, Steve

AWS
Steve_W
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions