dont set audiochannel for mono_mix, use : to select track
This commit is contained in:
parent
6c80a37e46
commit
29afa0bc5d
1 changed files with 10 additions and 7 deletions
|
@ -250,17 +250,20 @@ def video_cmd(video, target, profile, info):
|
|||
and len(filter(None, [a['channels'] == 1 or None for a in info['audio']])) == 2:
|
||||
video_settings += [
|
||||
'-filter_complex',
|
||||
'[0.%s][0.%s] amerge' % (info['audio'][0]['id'], info['audio'][1]['id'])
|
||||
'[0:%s][0:%s] amerge' % (info['audio'][0]['id'], info['audio'][1]['id'])
|
||||
]
|
||||
mono_mix = True
|
||||
else:
|
||||
video_settings += ['-map', '0:%s,0:%s' % (info['audio'][0]['id'], n)]
|
||||
mono_mix = False
|
||||
audio_settings = ['-ar', str(audiorate), '-aq', str(audioquality)]
|
||||
ac = info['audio'][0].get('channels', audiochannels)
|
||||
if ac:
|
||||
ac = min(ac, audiochannels)
|
||||
else:
|
||||
ac = audiochannels
|
||||
audio_settings += ['-ac', str(ac)]
|
||||
if not mono_mix:
|
||||
ac = info['audio'][0].get('channels', audiochannels)
|
||||
if ac:
|
||||
ac = min(ac, audiochannels)
|
||||
else:
|
||||
ac = audiochannels
|
||||
audio_settings += ['-ac', str(ac)]
|
||||
if audiobitrate:
|
||||
audio_settings += ['-ab', audiobitrate]
|
||||
if format == 'mp4':
|
||||
|
|
Loading…
Reference in a new issue