support volume adjustments
This commit is contained in:
parent
60786749ec
commit
e46ed106d5
2 changed files with 5 additions and 0 deletions
1
edit.py
1
edit.py
|
@ -245,6 +245,7 @@ if __name__ == '__main__':
|
|||
'resolution': info['resolution'],
|
||||
'in': stream_in,
|
||||
'out': stream_out,
|
||||
'volume': clip.get('volume', 1),
|
||||
})
|
||||
if 'path' in info:
|
||||
videos[-1]['path'] = os.path.join(prefix, info['path'])
|
||||
|
|
|
@ -115,6 +115,10 @@ for clip in edit:
|
|||
else:
|
||||
aid = src_info['audio'][0]['id']
|
||||
audio = []
|
||||
if clip.get('volume', 1) != 1:
|
||||
audio += [
|
||||
'-filter:a', 'volume=%s' % clip['volume']
|
||||
]
|
||||
audio_map = ['-map', '0:%s,0:0' % aid, '-map', '0:%s,0:1' % vid]
|
||||
cmd = [
|
||||
'ffmpeg',
|
||||
|
|
Loading…
Reference in a new issue