Skip to content

AWS Media Live workflows creating h264 channels not h265

0

I have been experiencing issues when creating HVEC ingest workloads through RTMP. HVEC would just not work and id have to go back to h264. Upon looking closer at the CloudFormation stack, it appears even when HVEC is selected, it's deploying AVC channels to MediaLive. Ive tried this a few different time and with different configurations. Looking at the Cloudformation documentation it appears it should be using H265Settings not H264Settings.

{"AWSTemplateFormatVersion":"2010-09-09","Description":"Media Services Workflow created by MediaLive","Resources":{"MediaLiveInput":{"Type":"AWS::MediaLive::Input","Properties":{"Name":"h265-test-Input","Type":"RTMP_PUSH","Tags":{"MSAM-Diagram":"h265-test","MSAM-Tile":"h265-test","MediaLive-Workflow":"h265-test"},"Destinations":[{"StreamName":"setting/a"}],"InputSecurityGroups":["3957459"]},"DependsOn":[]},"MediaPackageChannel":{"Type":"AWS::MediaPackage::Channel","Properties":{"Description":"Channel created by MediaLive workflow - h265-test","Id":"h265-test","Tags":[{"Key":"MSAM-Diagram","Value":"h265-test"},{"Key":"MSAM-Tile","Value":"h265-test"},{"Key":"MediaLive-Workflow","Value":"h265-test"}]}},"MediaPackageHLSEndpoint":{"Type":"AWS::MediaPackage::OriginEndpoint","Properties":{"Id":"h265-testHLSEndpoint","ChannelId":"h265-test","Description":"HLS endpoint created by MediaLive for channel h265-test","ManifestName":"index","StartoverWindowSeconds":0,"TimeDelaySeconds":0,"HlsPackage":{"AdMarkers":"NONE","AdsOnDeliveryRestrictions":"RESTRICTED","AdTriggers":["SPLICE_INSERT","PROVIDER_ADVERTISEMENT","DISTRIBUTOR_ADVERTISEMENT","PROVIDER_PLACEMENT_OPPORTUNITY","DISTRIBUTOR_PLACEMENT_OPPORTUNITY"],"IncludeIframeOnlyStream":false,"PlaylistType":"EVENT","PlaylistWindowSeconds":60,"ProgramDateTimeIntervalSeconds":0,"SegmentDurationSeconds":6,"StreamSelection":{"StreamOrder":"ORIGINAL"},"UseAudioRenditionGroup":false},"Origination":"ALLOW","Tags":[{"Key":"MSAM-Diagram","Value":"h265-test"},{"Key":"MSAM-Tile","Value":"h265-test"},{"Key":"MediaLive-Workflow","Value":"h265-test"}]},"DependsOn":"MediaPackageChannel"},"MediaPackageCMAFEndpoint":{"Type":"AWS::MediaPackage::OriginEndpoint","Properties":{"Id":"h265-testCMAFEndpoint","ChannelId":"h265-test","Description":"CMAF endpoint created by MediaLive for channel h265-test","ManifestName":"index","StartoverWindowSeconds":0,"TimeDelaySeconds":0,"CmafPackage":{"SegmentDurationSeconds":2,"SegmentPrefix":"2","HlsManifests":[{"Id":"CMAF_HLS","PlaylistWindowSeconds":60,"PlaylistType":"EVENT","AdMarkers":"NONE","AdTriggers":["SPLICE_INSERT","PROVIDER_ADVERTISEMENT","DISTRIBUTOR_ADVERTISEMENT","PROVIDER_PLACEMENT_OPPORTUNITY","DISTRIBUTOR_PLACEMENT_OPPORTUNITY"],"AdsOnDeliveryRestrictions":"RESTRICTED","IncludeIframeOnlyStream":false}],"StreamSelection":{"StreamOrder":"ORIGINAL"}},"Origination":"ALLOW","Tags":[{"Key":"MSAM-Diagram","Value":"h265-test"},{"Key":"MSAM-Tile","Value":"h265-test"},{"Key":"MediaLive-Workflow","Value":"h265-test"}]},"DependsOn":"MediaPackageChannel"},"MediaPackageDASHEndpoint":{"Type":"AWS::MediaPackage::OriginEndpoint","Properties":{"Id":"h265-testDASHEndpoint","ChannelId":"h265-test","Description":"DASH endpoint created by MediaLive for channel h265-test","ManifestName":"index","StartoverWindowSeconds":0,"TimeDelaySeconds":0,"DashPackage":{"SegmentDurationSeconds":2,"ManifestWindowSeconds":60,"Profile":"NONE","MinUpdatePeriodSeconds":15,"MinBufferTimeSeconds":30,"SuggestedPresentationDelaySeconds":25,"PeriodTriggers":[],"ManifestLayout":"FULL","SegmentTemplateFormat":"NUMBER_WITH_TIMELINE","AdTriggers":["SPLICE_INSERT","PROVIDER_ADVERTISEMENT","DISTRIBUTOR_ADVERTISEMENT","PROVIDER_PLACEMENT_OPPORTUNITY","DISTRIBUTOR_PLACEMENT_OPPORTUNITY"],"AdsOnDeliveryRestrictions":"RESTRICTED","StreamSelection":{"StreamOrder":"ORIGINAL"}},"Origination":"ALLOW","Tags":[{"Key":"MSAM-Diagram","Value":"h265-test"},{"Key":"MSAM-Tile","Value":"h265-test"},{"Key":"MediaLive-Workflow","Value":"h265-test"}]},"DependsOn":"MediaPackageChannel"},"MediaPackageCloudFrontDistribution":{"Type":"AWS::CloudFront::Distribution","Properties":{"DistributionConfig":{"Enabled":true,"Comment":"Created by MediaLive workflow h265-test","CustomErrorResponses":[{"ErrorCode":400,"ErrorCachingMinTTL":1},{"ErrorCode":403,"ErrorCachingMinTTL":1},{"ErrorCode":404,"ErrorCachingMinTTL":1},{"ErrorCode":405,"ErrorCachingMinTTL":1},{"ErrorCode":414,"ErrorCachingMinTTL":1},{"ErrorCode":416,"ErrorCachingMinTTL":1},{"ErrorCode":500,"ErrorCachingMinTTL":1},{"ErrorCode":501,"ErrorCachingMinTTL":1},{"ErrorCode":502,"ErrorCachingMinTTL":1},{"ErrorCode":503,"ErrorCachingMinTTL":1},{"ErrorCode":504,"ErrorCachingMinTTL":1}],"DefaultCacheBehavior":{"TargetOriginId":"EMP-h265-test","AllowedMethods":["GET","HEAD"],"CachedMethods":["GET","HEAD"],"Compress":false,"ForwardedValues":{"QueryString":true,"QueryStringCacheKeys":["m","start","end"]},"SmoothStreaming":false,"ViewerProtocolPolicy":"redirect-to-https","MinTTL":0,"DefaultTTL":86400,"MaxTTL":31536000},"Origins":[{"Id":"EMP-h265-test","DomainName":{"Fn::Select":[0,{"Fn::Split":["/",{"Fn::Select":[1,{"Fn::Split":["https://",{"Fn::GetAtt":["MediaPackageHLSEndpoint","Url"]}]}]}]}]},"OriginPath":"","CustomOriginConfig":{"HTTPPort":80,"HTTPSPort":443,"OriginProtocolPolicy":"match-viewer","OriginSSLProtocols":["TLSv1","TLSv1.1","TLSv1.2"],"OriginReadTimeout":30,"OriginKeepaliveTimeout":5}}],"PriceClass":"PriceClass_All"},"Tags":[{"Key":"mediapackage:cloudfront_assoc","Value":{"Fn::GetAtt":["MediaPackageChannel","Arn"]}},{"Key":"MSAM-Diagram","Value":"h265-test"},{"Key":"MSAM-Tile","Value":"h265-test"},{"Key":"MediaLive-Workflow","Value":"h265-test"}]},"DependsOn":["MediaPackageHLSEndpoint","MediaPackageCMAFEndpoint","MediaPackageDASHEndpoint"]},"MediaLiveChannel":{"Type":"AWS::MediaLive::Channel","Properties":{"Name":"h265-test","ChannelClass":"SINGLE_PIPELINE","LogLevel":"DISABLED","RoleArn":"arn:aws:iam::043309350552:role/MediaLiveAccessRole","InputAttachments":[{"InputAttachmentName":"h265-test","InputId":{"Ref":"MediaLiveInput"},"InputSettings":{"AudioSelectors":[],"CaptionSelectors":[],"DeblockFilter":"DISABLED","DenoiseFilter":"DISABLED","FilterStrength":1,"InputFilter":"AUTO","Smpte2038DataPreference":"IGNORE","SourceEndBehavior":"CONTINUE"}}],"InputSpecification":{"Codec":"HEVC","MaximumBitrate":"MAX_20_MBPS","Resolution":"HD"},"Destinations":[{"Id":"mediapackage-destination","MediaPackageSettings":[{"ChannelId":"h265-test"}]}],"EncoderSettings":{"AudioDescriptions":[{"Name":"audio_mediapackage_0","AudioSelectorName":"Default","AudioTypeControl":"FOLLOW_INPUT","LanguageCodeControl":"FOLLOW_INPUT","CodecSettings":{"AacSettings":{"InputType":"NORMAL","Bitrate":128000,"CodingMode":"CODING_MODE_2_0","RawFormat":"NONE","Spec":"MPEG4","Profile":"LC","RateControlMode":"CBR","SampleRate":48000}}},{"Name":"audio_mediapackage_1","AudioSelectorName":"Default","AudioTypeControl":"FOLLOW_INPUT","LanguageCodeControl":"FOLLOW_INPUT","CodecSettings":{"AacSettings":{"InputType":"NORMAL","Bitrate":128000,"CodingMode":"CODING_MODE_2_0","RawFormat":"NONE","Spec":"MPEG4","Profile":"LC","RateControlMode":"CBR","SampleRate":48000}}},{"Name":"audio_mediapackage_2","AudioSelectorName":"Default","AudioTypeControl":"FOLLOW_INPUT","LanguageCodeControl":"FOLLOW_INPUT","CodecSettings":{"AacSettings":{"InputType":"NORMAL","Bitrate":128000,"CodingMode":"CODING_MODE_2_0","RawFormat":"NONE","Spec":"MPEG4","Profile":"LC","RateControlMode":"CBR","SampleRate":48000}}},{"Name":"audio_mediapackage_3","AudioSelectorName":"Default","AudioTypeControl":"FOLLOW_INPUT","LanguageCodeControl":"FOLLOW_INPUT","CodecSettings":{"AacSettings":{"InputType":"NORMAL","Bitrate":128000,"CodingMode":"CODING_MODE_2_0","RawFormat":"NONE","Spec":"MPEG4","Profile":"LC","RateControlMode":"CBR","SampleRate":48000}}}],"CaptionDescriptions":[],"OutputGroups":[{"Name":"mediapackage","OutputGroupSettings":{"MediaPackageGroupSettings":{"Destination":{"DestinationRefId":"mediapackage-destination"}}},"Outputs":[{"OutputName":"emp_1080p60","VideoDescriptionName":"emp_1080p60","AudioDescriptionNames":["audio_mediapackage_0"],"CaptionDescriptionNames":[],"OutputSettings":{"MediaPackageOutputSettings":{}}},{"OutputName":"emp_720p30","VideoDescriptionName":"emp_720p30","AudioDescriptionNames":["audio_mediapackage_1"],"CaptionDescriptionNames":[],"OutputSettings":{"MediaPackageOutputSettings":{}}},{"OutputName":"emp_480p30","VideoDescriptionName":"emp_480p30","AudioDescriptionNames":["audio_mediapackage_2"],"CaptionDescriptionNames":[],"OutputSettings":{"MediaPackageOutputSettings":{}}},{"OutputName":"emp_240p30","VideoDescriptionName":"emp_240p30","AudioDescriptionNames":["audio_mediapackage_3"],"CaptionDescriptionNames":[],"OutputSettings":{"MediaPackageOutputSettings":{}}}]}],"TimecodeConfig":{"Source":"EMBEDDED"},"VideoDescriptions":[{"CodecSettings":{"H264Settings":{"AfdSignaling":"NONE","ColorMetadata":"INSERT","AdaptiveQuantization":"HIGH","EntropyEncoding":"CABAC","FlickerAq":"DISABLED","ForceFieldPictures":"DISABLED","FramerateControl":"SPECIFIED","FramerateNumerator":60000,"FramerateDenominator":1001,"GopBReference":"DISABLED","GopClosedCadence":1,"GopNumBFrames":3,"GopSize":120,"GopSizeUnits":"FRAMES","SubgopLength":"DYNAMIC","ScanType":"PROGRESSIVE","Level":"H264_LEVEL_AUTO","LookAheadRateControl":"HIGH","MaxBitrate":6000000,"NumRefFrames":3,"ParControl":"SPECIFIED","ParNumerator":1,"ParDenominator":1,"Profile":"HIGH","QvbrQualityLevel":9,"RateControlMode":"QVBR","Syntax":"DEFAULT","SceneChangeDetect":"ENABLED","Slices":1,"SpatialAq":"ENABLED","TemporalAq":"ENABLED","TimecodeInsertion":"DISABLED"}},"Height":1080,"Name":"emp_1080p60","RespondToAfd":"NONE","Sharpness":50,"ScalingBehavior":"DEFAULT","Width":1920},{"CodecSettings":{"H264Settings":{"AfdSignaling":"NONE","ColorMetadata":"INSERT","AdaptiveQuantization":"HIGH","EntropyEncoding":"CABAC","FlickerAq":"DISABLED","ForceFieldPictures":"DISABLED","FramerateControl":"SPECIFIED","FramerateNumerator":30000,"FramerateDenominator":1001,"GopBReference":"DISABLED","GopClosedCadence":1,"GopNumBFrames":3,"GopSize":60,"GopSizeUnits":"FRAMES","SubgopLength":"DYNAMIC","ScanType":"PROGRESSIVE","Level":"H264_LEVEL_AUTO","LookAheadRateControl":"HIGH","MaxBitrate":3000000,"NumRefFrames":3,"ParControl":"SPECIFIED","ParNumerator":1,"ParDenominator":1,"Profile":"HIGH","QvbrQualityLevel":8,"RateControlMode":"QVBR","Syntax":"DEFAULT","SceneChangeDetect":"ENABLED","Slices":1,"SpatialAq":"ENABLED","TemporalAq":"ENABLED","TimecodeInsertion":"DISABLED"}},"Height":720,"Name":"emp_720p30","RespondToAfd":"NONE","Sharpness":75,"ScalingBehavior":"DEFAULT","Width":1280},{"CodecSettings":{"H264Settings":{"AfdSignaling":"NONE","ColorMetadata":"INSERT","AdaptiveQuantization":"HIGH","EntropyEncoding":"CABAC","FlickerAq":"DISABLED","ForceFieldPictures":"DISABLED","FramerateControl":"SPECIFIED","FramerateNumerator":30000,"FramerateDenominator":1001,"GopBReference":"ENABLED","GopClosedCadence":1,"GopNumBFrames":3,"GopSize":60,"GopSizeUnits":"FRAMES","SubgopLength":"DYNAMIC","ScanType":"PROGRESSIVE","Level":"H264_LEVEL_AUTO","LookAheadRateControl":"HIGH","MaxBitrate":1500000,"NumRefFrames":3,"ParControl":"SPECIFIED","ParNumerator":1,"ParDenominator":1,"Profile":"MAIN","QvbrQualityLevel":8,"RateControlMode":"QVBR","Syntax":"DEFAULT","SceneChangeDetect":"ENABLED","Slices":1,"SpatialAq":"ENABLED","TemporalAq":"ENABLED","TimecodeInsertion":"DISABLED"}},"Height":480,"Name":"emp_480p30","RespondToAfd":"NONE","Sharpness":100,"ScalingBehavior":"STRETCH_TO_OUTPUT","Width":854},{"CodecSettings":{"H264Settings":{"AfdSignaling":"NONE","ColorMetadata":"INSERT","AdaptiveQuantization":"HIGH","EntropyEncoding":"CABAC","FlickerAq":"DISABLED","ForceFieldPictures":"DISABLED","FramerateControl":"SPECIFIED","FramerateNumerator":30000,"FramerateDenominator":1001,"GopBReference":"ENABLED","GopClosedCadence":1,"GopNumBFrames":3,"GopSize":60,"GopSizeUnits":"FRAMES","SubgopLength":"DYNAMIC","ScanType":"PROGRESSIVE","Level":"H264_LEVEL_AUTO","LookAheadRateControl":"HIGH","MaxBitrate":750000,"NumRefFrames":3,"ParControl":"SPECIFIED","ParNumerator":1,"ParDenominator":1,"Profile":"MAIN","QvbrQualityLevel":8,"RateControlMode":"QVBR","Syntax":"DEFAULT","SceneChangeDetect":"ENABLED","Slices":1,"SpatialAq":"ENABLED","TemporalAq":"ENABLED","TimecodeInsertion":"DISABLED"}},"Height":240,"Name":"emp_240p30","RespondToAfd":"NONE","Sharpness":100,"ScalingBehavior":"STRETCH_TO_OUTPUT","Width":426}]},"Tags":{"MSAM-Diagram":"h265-test","MSAM-Tile":"h265-test","MediaLive-Workflow":"h265-test"}},"DependsOn":["MediaLiveInput","MediaPackageChannel","MediaPackageHLSEndpoint","MediaPackageCMAFEndpoint","MediaPackageDASHEndpoint"]}}}
asked 7 months ago135 views
3 Answers
2

RTMP does not support HEVC as a codec, only H.264 (AVC). MediaLive may force this compliance when selection and RTMP Output Group. There is an new spec call Enhanced RTMP (E-RTMP) which does allow for transporting HEVC streams. MediaLive does not currently offer E-RTMP outputs.

Perhaps consider using SRT, instead of RTMP, as an output protocol, which would support either AVC and HEVC video coding.

AWS
answered 7 months ago
0

Based on the information you've provided, it appears that there is indeed a discrepancy between the intended HEVC (H.265) encoding and the actual H.264 encoding being deployed in your AWS Elemental MediaLive workflow. This is an unexpected behavior, as MediaLive does support HEVC encoding.

Here are some key points to consider:

  1. The CloudFormation template correctly specifies HEVC as the input codec in the InputSpecification section. This suggests that the input is expected to be in HEVC format.

  2. However, in the VideoDescriptions section, all the outputs are using H264Settings instead of H265Settings. This explains why you're seeing AVC (H.264) channels being deployed instead of HEVC.

  3. AWS Elemental MediaLive does support HEVC encoding, so this is not a limitation of the service itself.

To resolve this issue and ensure HEVC encoding is used, you should modify the CloudFormation template to use H265Settings instead of H264Settings in the VideoDescriptions section. You'll need to adjust the specific encoding parameters within H265Settings to match your requirements for HEVC encoding.

It's possible that this discrepancy is due to a template generation issue or a misconfiguration in the workflow setup. You may want to double-check your MediaLive console settings to ensure HEVC is selected for both input and output.

If the issue persists after making these changes, it would be advisable to contact AWS support for further assistance, as this behavior is not expected when HEVC is explicitly specified in the input and desired for the output.
Sources
Live Video Encoding – AWS Elemental MediaLive Features – AWS
AWS Elemental Medialive Support Playbook | AWS re:Post

answered 7 months ago
  • This is reporting a bug related to the workflow wizard. Not a issue with my configuration. The Stack above was generated by the workflow wizard.

0

Here is supported codec list in conjunction with containers/input protocols for MediaLive: https://docs.aws.amazon.com/medialive/latest/ug/inputs-supported-codecs-by-input-type.html

RTMP input container could have AVC codec only.

If your question is related to output. MediaLive Wizard does not have capability to create any outputs rather than pre defined and they are AVC based only.

If you need to have another codec you can change it later after creation via aws console or by editing cloudformation template.

AWS
answered 7 months 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.