File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 44 hooks :
55 - id : ruff
66 args : [--fix]
7- - id : ruff-format - repo: https://github.com/commitizen-tools/commitizen
7+ - id : ruff-format
8+ - repo : https://github.com/commitizen-tools/commitizen
89 rev : v4.1.0
910 hooks :
1011 - id : commitizen
Original file line number Diff line number Diff line change @@ -645,8 +645,15 @@ def _second_pass(self) -> Iterator[float]:
645645 ebu_pass_2_stats = list (
646646 AudioStream .prune_and_parse_loudnorm_output (output ).values ()
647647 )
648- for idx , audio_stream in enumerate (self .streams ["audio" ].values ()):
649- audio_stream .set_second_pass_stats (ebu_pass_2_stats [idx ])
648+ # Only set second pass stats if they exist (they might not if all streams were skipped with --lower-only)
649+ if len (ebu_pass_2_stats ) == len (self .streams ["audio" ]):
650+ for idx , audio_stream in enumerate (self .streams ["audio" ].values ()):
651+ audio_stream .set_second_pass_stats (ebu_pass_2_stats [idx ])
652+ else :
653+ _logger .debug (
654+ f"Expected { len (self .streams ['audio' ])} EBU pass 2 statistics but got { len (ebu_pass_2_stats )} . "
655+ "This can happen when normalization is skipped (e.g., with --lower-only)."
656+ )
650657
651658 # warn if self.media_file.ffmpeg_normalize.dynamic == False and any of the second pass stats contain "normalization_type" == "dynamic"
652659 if self .ffmpeg_normalize .dynamic is False :
You can’t perform that action at this time.
0 commit comments