do not set -ac if audiochannels is None

This commit is contained in:
j 2016-08-04 21:41:27 +02:00
parent ff8dd16456
commit 2aef460225

View file

@ -266,11 +266,11 @@ def stream(video, target, profile, info, audio_track=0, flags={}):
if mono_mix:
ac = 2
else:
ac = info['audio'][audio_track].get('channels', audiochannels)
if ac:
ac = min(ac, audiochannels)
else:
ac = info['audio'][0].get('channels')
if not ac:
ac = audiochannels
if audiochannels:
ac = min(ac, audiochannels)
audio_settings += ['-ac', str(ac)]
if audiobitrate:
audio_settings += ['-ab', audiobitrate]