only take audiochannels if set

This commit is contained in:
j 2016-08-04 21:32:35 +02:00
parent f3bcfebf25
commit bc6579b2ab

View file

@ -262,10 +262,11 @@ def video_cmd(video, target, profile, info):
ac = 2
else:
ac = info['audio'][0].get('channels', audiochannels)
if ac:
ac = min(ac, audiochannels)
else:
ac = audiochannels
if audiochannels:
if ac:
ac = min(ac, audiochannels)
else:
ac = audiochannels
audio_settings += ['-ac', str(ac)]
if audiobitrate:
audio_settings += ['-ab', audiobitrate]