also downmix mono mix if channels are set in profile

This commit is contained in:
j 2014-04-02 16:44:42 +02:00
parent 29afa0bc5d
commit a85f640705
1 changed files with 8 additions and 6 deletions

View File

@ -257,13 +257,15 @@ def video_cmd(video, target, profile, info):
video_settings += ['-map', '0:%s,0:%s' % (info['audio'][0]['id'], n)]
mono_mix = False
audio_settings = ['-ar', str(audiorate), '-aq', str(audioquality)]
if not mono_mix:
if mono_mix:
ac = 2
else:
ac = info['audio'][0].get('channels', audiochannels)
if ac:
ac = min(ac, audiochannels)
else:
ac = audiochannels
audio_settings += ['-ac', str(ac)]
if ac:
ac = min(ac, audiochannels)
else:
ac = audiochannels
audio_settings += ['-ac', str(ac)]
if audiobitrate:
audio_settings += ['-ab', audiobitrate]
if format == 'mp4':