I cant seem to find a solution to audio silences that appear periodically in my HLS to mp4 MediaConvert jobs only with 5.1 surround sound audio outputs. I DO NOT get audio issues with the HLS at all just the mp4's. I also seem to get an error/warning with the MediaConvert jobs:
240000 MediaConvert added at least 100 milliseconds of audio silence to keep audio and video in sync.
I have a MediaLive channel setup that outputs an HLS to S3. A MediaConvert job then kicks off to convert that HLS to mp4 using a MediaConvert output preset.
I have tried setting up my MediaLive channel settings to match identically with the MediaConvert output preset settings which didnt work. I also tried changing bitrates, sample rates and audio codec to fix the audio cutouts but that also didnt work, although i was able to reduce the frequency of them.
I have supplied my encoder settings for both the MediaLive channel and MediaConvert output preset incase anyone can see an issue with the settings I have. I appreciate any help anyone can provide!
Settings for MediaConvert output preset:
{
"Settings": {
"VideoDescription": {
"CodecSettings": {
"Codec": "H_264",
"H264Settings": {
"Bitrate": 15000000,
"RateControlMode": "CBR",
"QualityTuningLevel": "SINGLE_PASS_HQ"
}
}
},
"AudioDescriptions": [
{
"CodecSettings": {
"Codec": "AAC",
"AacSettings": {
"Bitrate": 768000,
"RateControlMode": "CBR",
"CodecProfile": "LC",
"CodingMode": "CODING_MODE_5_1",
"SampleRate": 48000,
"Specification": "MPEG4"
}
}
}
],
"ContainerSettings": {
"Container": "MP4",
"Mp4Settings": {}
}
}
}
Encoder settings for the MediaLive channel:
{
"encoderSettings": {
"audioDescriptions": [
{
"codecSettings": {
"aacSettings": {
"inputType": "NORMAL",
"bitrate": 256000,
"codingMode": "CODING_MODE_5_1",
"rawFormat": "NONE",
"spec": "MPEG4",
"profile": "LC",
"rateControlMode": "CBR",
"sampleRate": 48000
}
},
"audioTypeControl": "FOLLOW_INPUT",
"languageCodeControl": "FOLLOW_INPUT",
"name": "audio_9mq4xm"
}
],
"captionDescriptions": [],
"outputGroups": [
{
"outputGroupSettings": {
"hlsGroupSettings": {
"incompleteSegmentBehavior": "AUTO",
"discontinuityTags": "INSERT",
"adMarkers": [],
"captionLanguageSetting": "OMIT",
"captionLanguageMappings": [],
"inputLossAction": "EMIT_OUTPUT",
"manifestCompression": "NONE",
"destination": {
"destinationRefId": "1phb3q"
},
"ivInManifest": "INCLUDE",
"ivSource": "FOLLOWS_SEGMENT_NUMBER",
"clientCache": "ENABLED",
"tsFileMode": "SEGMENTED_FILES",
"manifestDurationFormat": "FLOATING_POINT",
"segmentationMode": "USE_SEGMENT_DURATION",
"redundantManifest": "DISABLED",
"outputSelection": "MANIFESTS_AND_SEGMENTS",
"streamInfResolution": "INCLUDE",
"iFrameOnlyPlaylists": "DISABLED",
"indexNSegments": 10,
"programDateTime": "EXCLUDE",
"programDateTimePeriod": 600,
"keepSegments": 21,
"segmentLength": 10,
"timedMetadataId3Frame": "PRIV",
"timedMetadataId3Period": 10,
"hlsId3SegmentTagging": "DISABLED",
"codecSpecification": "RFC_4281",
"directoryStructure": "SINGLE_DIRECTORY",
"segmentsPerSubdirectory": 10000,
"mode": "VOD",
"programDateTimeClock": "INITIALIZE_FROM_OUTPUT_TIMECODE"
}
},
"name": "Archive",
"outputs": [
{
"outputSettings": {
"hlsOutputSettings": {
"nameModifier": "_1",
"hlsSettings": {
"standardHlsSettings": {
"m3u8Settings": {
"audioFramesPerPes": 4,
"audioPids": "492-498",
"nielsenId3Behavior": "NO_PASSTHROUGH",
"pcrControl": "PCR_EVERY_PES_PACKET",
"pmtPid": "480",
"programNum": 1,
"scte35Pid": "500",
"scte35Behavior": "NO_PASSTHROUGH",
"timedMetadataPid": "502",
"timedMetadataBehavior": "NO_PASSTHROUGH",
"videoPid": "481"
},
"audioRenditionSets": "program_audio"
}
},
"h265PackagingType": "HEV1"
}
},
"outputName": "OffsetTest",
"videoDescriptionName": "video_ihzh4i",
"audioDescriptionNames": [
"audio_9mq4xm"
],
"captionDescriptionNames": []
}
]
}
],
"timecodeConfig": {
"source": "EMBEDDED"
},
"videoDescriptions": [
{
"codecSettings": {
"h264Settings": {
"afdSignaling": "NONE",
"colorMetadata": "INSERT",
"adaptiveQuantization": "MEDIUM",
"bitrate": 15000000,
"entropyEncoding": "CABAC",
"flickerAq": "ENABLED",
"forceFieldPictures": "DISABLED",
"framerateControl": "SPECIFIED",
"framerateNumerator": 30000,
"framerateDenominator": 1001,
"gopBReference": "DISABLED",
"gopClosedCadence": 1,
"gopSize": 90,
"gopSizeUnits": "FRAMES",
"subgopLength": "FIXED",
"scanType": "PROGRESSIVE",
"level": "H264_LEVEL_AUTO",
"lookAheadRateControl": "MEDIUM",
"numRefFrames": 1,
"parControl": "SPECIFIED",
"parNumerator": 1,
"parDenominator": 1,
"profile": "MAIN",
"rateControlMode": "CBR",
"syntax": "DEFAULT",
"sceneChangeDetect": "ENABLED",
"spatialAq": "ENABLED",
"temporalAq": "ENABLED",
"timecodeInsertion": "DISABLED"
}
},
"height": 1080,
"name": "video_ihzh4i",
"respondToAfd": "NONE",
"sharpness": 50,
"scalingBehavior": "DEFAULT",
"width": 1920
}
]
},
"inputSpecification": {
"codec": "AVC",
"resolution": "HD",
"maximumBitrate": "MAX_20_MBPS"
},
"logLevel": "DISABLED",
"channelClass": "SINGLE_PIPELINE",
}
Hi Mike,
There is only one input attached to the channel. It is a MediaConnect type and I am unsure if the site that tested this was providing 6 channel audio but I can confirm later if thats what you are asking about. I made a successful test locally using ffmpeg with all the same configuration settings converting the HLS to mp4. I did NOT run into any audio issues with that result. As for the medialive input I do notice that there are no audio captions setup for the input currently. I have added the input attachment json to the channel at the bottom of this comment.
I did try using bitrates like you said and the audio issues were actually more frequent when using the same bitrates on both the channel and MC job. It improved when I had the lowest possible audio bitrate on the channel and the highest audio bitrate on the MC job. I will attempt to try using 3 audio pairs.
"inputAttachments": [ { "inputId": "222222", "inputAttachmentName": "media-connect-input", "inputSettings": { "sourceEndBehavior": "CONTINUE", "inputFilter": "AUTO", "filterStrength": 1, "deblockFilter": "DISABLED", "denoiseFilter": "DISABLED", "smpte2038DataPreference": "IGNORE", "audioSelectors": [], "captionSelectors": [ { "selectorSettings": { "dvbSubSourceSettings": {} }, "name": "caption 1" } ] } } ],