Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
barbibulle committed May 29, 2023
1 parent cbea428 commit c1fb44c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 1 addition & 6 deletions Source/Python/utils/mp4-dash.py
Original file line number Diff line number Diff line change
Expand Up @@ -558,12 +558,7 @@ def OutputDash(options, set_attributes, audio_sets, video_sets, subtitles_sets,
else:
scheme_id_uri = DOLBY_AC4_AUDIO_CHANNEL_CONFIGURATION_SCHEME_ID_URI
else:
# detect the actual number of channels
sample_description = audio_track.info['sample_descriptions'][0]
if 'mpeg_4_audio_decoder_config' in sample_description:
audio_channel_config_value = str(sample_description['mpeg_4_audio_decoder_config']['channels'])
else:
audio_channel_config_value = str(audio_track.channels)
audio_channel_config_value = str(audio_track.channels)
scheme_id_uri = MPEG_DASH_AUDIO_CHANNEL_CONFIGURATION_SCHEME_ID_URI if options.use_legacy_audio_channel_config_uri else ISO_IEC_23001_8_AUDIO_CHANNEL_CONFIGURATION_SCHEME_ID_URI
xml.SubElement(representation,
'AudioChannelConfiguration',
Expand Down
2 changes: 2 additions & 0 deletions Source/Python/utils/mp4utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,8 @@ def __init__(self, parent, info):
if stream_type == 'Immersive stereo':
self.dolby_ac4_ims = 'Yes'
self.channels = str(self.channels)
elif 'mpeg_4_audio_decoder_config' in sample_desc:
self.channels = sample_desc['mpeg_4_audio_decoder_config']['channels']

self.language = info['language']
self.language_name = LanguageNames.get(LanguageCodeMap.get(self.language, 'und'), '')
Expand Down

0 comments on commit c1fb44c

Please sign in to comment.