do not set -ac if audiochannels is None
This commit is contained in:
parent
ff8dd16456
commit
2aef460225
1 changed files with 5 additions and 5 deletions
|
@ -266,12 +266,12 @@ def stream(video, target, profile, info, audio_track=0, flags={}):
|
||||||
if mono_mix:
|
if mono_mix:
|
||||||
ac = 2
|
ac = 2
|
||||||
else:
|
else:
|
||||||
ac = info['audio'][audio_track].get('channels', audiochannels)
|
ac = info['audio'][0].get('channels')
|
||||||
if ac:
|
if not ac:
|
||||||
|
ac = audiochannels
|
||||||
|
if audiochannels:
|
||||||
ac = min(ac, audiochannels)
|
ac = min(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