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:
|
and len(filter(None, [a['channels'] == 1 or None for a in info['audio']])) == 2:
|
||||||
video_settings += [
|
video_settings += [
|
||||||
'-filter_complex',
|
'-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:
|
else:
|
||||||
video_settings += ['-map', '0:%s,0:%s' % (info['audio'][0]['id'], n)]
|
video_settings += ['-map', '0:%s,0:%s' % (info['audio'][0]['id'], n)]
|
||||||
|
mono_mix = False
|
||||||
audio_settings = ['-ar', str(audiorate), '-aq', str(audioquality)]
|
audio_settings = ['-ar', str(audiorate), '-aq', str(audioquality)]
|
||||||
ac = info['audio'][0].get('channels', audiochannels)
|
if not mono_mix:
|
||||||
if ac:
|
ac = info['audio'][0].get('channels', audiochannels)
|
||||||
ac = min(ac, audiochannels)
|
if ac:
|
||||||
else:
|
ac = min(ac, audiochannels)
|
||||||
ac = audiochannels
|
else:
|
||||||
audio_settings += ['-ac', str(ac)]
|
ac = audiochannels
|
||||||
|
audio_settings += ['-ac', str(ac)]
|
||||||
if audiobitrate:
|
if audiobitrate:
|
||||||
audio_settings += ['-ab', audiobitrate]
|
audio_settings += ['-ab', audiobitrate]
|
||||||
if format == 'mp4':
|
if format == 'mp4':
|
||||||
|
|
Loading…
Reference in a new issue