Skip to content

Commit

Permalink
Fixed error with not actually using the highest audio channel in the …
Browse files Browse the repository at this point in the history
…final creation of the channel map.
  • Loading branch information
Cryator committed Nov 24, 2024
1 parent 63e6d0a commit e3dde07
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/ffmpeg_automator.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ def get_audio_maps(streams): # noqa: WPS231
audio_map.append('0:a:{0}'.format(str(index)))
lang_found.append(language)

# If using highest channels, build the audio map from the highest channel dictionary
if use_highest_channels:
for lang, stream_info in highest_channels_per_lang.items():
audio_map.append(f'0:a:{stream_info["index"]}')

if not audio_map:
sys.stdout.write('No audio tracks found for given languages: {0}\n'.format(str(audio_languages)))
sys.stdout.write('Ignoring audio track languages\n')
Expand Down

0 comments on commit e3dde07

Please sign in to comment.