audio rendering fixes

This commit is contained in:
j 2024-04-19 09:28:38 +02:00
parent 852a6d207b
commit eb1ea250eb

View file

@ -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',