do not set -ac if audiochannels is None
This commit is contained in:
parent
bc6579b2ab
commit
bb8f91bbd8
1 changed files with 6 additions and 7 deletions
|
@ -246,7 +246,7 @@ def video_cmd(video, target, profile, info):
|
|||
n = 0
|
||||
else:
|
||||
n = 1
|
||||
#mix 2 mono channels into stereo(common for fcp dv mov files)
|
||||
# mix 2 mono channels into stereo(common for fcp dv mov files)
|
||||
if len(info['audio']) == 2 \
|
||||
and len(filter(None, [a['channels'] == 1 or None for a in info['audio']])) == 2:
|
||||
video_settings += [
|
||||
|
@ -261,13 +261,12 @@ def video_cmd(video, target, profile, info):
|
|||
if mono_mix:
|
||||
ac = 2
|
||||
else:
|
||||
ac = info['audio'][0].get('channels', audiochannels)
|
||||
if audiochannels:
|
||||
if ac:
|
||||
ac = min(ac, audiochannels)
|
||||
else:
|
||||
ac = info['audio'][0].get('channels')
|
||||
if not ac:
|
||||
ac = audiochannels
|
||||
audio_settings += ['-ac', str(ac)]
|
||||
if audiochannels:
|
||||
ac = min(ac, audiochannels)
|
||||
audio_settings += ['-ac', str(ac)]
|
||||
if audiobitrate:
|
||||
audio_settings += ['-ab', audiobitrate]
|
||||
if format == 'mp4':
|
||||
|
|
Loading…
Reference in a new issue