Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add AC4 signaling for IMS stereo and CBI(channel based immersive) in HLS #901

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Source/Python/utils/mp4utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,13 +449,15 @@ def __init__(self, parent, info):
# Set the default values for Dolby audio codec flags
self.dolby_ddp_atmos = 'No'
self.dolby_ac4_ims = 'No'
self.dolby_ac4_cbi = 'No'
if self.codec_family == 'ec-3' and 'dolby_digital_plus_info' in sample_desc:
self.channels = GetDolbyDigitalPlusChannels(self)[0]
self.dolby_ddp_atmos = sample_desc['dolby_digital_plus_info']['Dolby_Atmos']
if (self.dolby_ddp_atmos == 'Yes'):
self.complexity_index = sample_desc['dolby_digital_plus_info']['complexity_index']
self.channels = str(self.info['sample_descriptions'][0]['dolby_digital_plus_info']['complexity_index']) + '/JOC'
elif self.codec_family == 'ac-4' and 'dolby_ac4_info' in sample_desc:
self.channels = str(self.channels)
if sample_desc['dolby_ac4_info']['dsi version'] == 0:
raise Exception("AC4 dsi version 0 is deprecated.")
elif sample_desc['dolby_ac4_info']['dsi version'] == 1:
Expand All @@ -465,7 +467,10 @@ def __init__(self, parent, info):
stream_type = sample_desc['dolby_ac4_info']['presentations'][0]['Stream Type']
if stream_type == 'Immersive stereo':
self.dolby_ac4_ims = 'Yes'
self.channels = str(self.channels)
self.channels = '2/IMSA'
elif stream_type == 'Channel based immsersive':
self.dolby_ac4_cbi = 'Yes'
self.channels = self.channels + '/IMSA'
elif 'mpeg_4_audio_decoder_config' in sample_desc:
self.channels = sample_desc['mpeg_4_audio_decoder_config']['channels']

Expand Down
Loading