From eb1ea250eb7492e0f14764507d345e9bdf9656a3 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 19 Apr 2024 09:28:38 +0200 Subject: [PATCH] audio rendering fixes --- ffmpeg.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ffmpeg.py b/ffmpeg.py index 3d09f94..4946fb3 100755 --- a/ffmpeg.py +++ b/ffmpeg.py @@ -75,7 +75,7 @@ for clip in edit: if 'display_aspect_ratio' in src_info['video'][0]: ratio = [int(p) for p in src_info['video'][0]['display_aspect_ratio'].split(':')] clip_aspect = ratio[0] / ratio[1] - print(ratio, clip_aspect) + #print(clip['path'], ratio, clip_aspect) if clip_aspect < aspect: x = width y = int(x / clip_aspect) @@ -115,11 +115,11 @@ for clip in edit: else: aid = src_info['audio'][0]['id'] audio = [] - audio_map = ['-map', '0:%s,0:0' % aid, '-map', '0:%s,0:1' % vid] if clip.get('volume', 1) != 1: - audio_map += [ + audio += [ '-filter:a', 'volume=%s' % clip['volume'] ] + audio_map = ['-map', '0:%s,0:0' % aid, '-map', '0:%s,0:1' % vid] cmd = [ 'ffmpeg', '-hide_banner',