audio channel should never be 0
This commit is contained in:
parent
626b860a34
commit
273fcb6458
1 changed files with 4 additions and 1 deletions
|
@ -178,7 +178,10 @@ def video_cmd(video, target, profile, info):
|
||||||
video_settings += ['-map', '0:%s,0:%s' % (info['audio'][0]['id'], n)]
|
video_settings += ['-map', '0:%s,0:%s' % (info['audio'][0]['id'], n)]
|
||||||
audio_settings = ['-ar', str(audiorate), '-aq', str(audioquality)]
|
audio_settings = ['-ar', str(audiorate), '-aq', str(audioquality)]
|
||||||
ac = info['audio'][0].get('channels', audiochannels)
|
ac = info['audio'][0].get('channels', audiochannels)
|
||||||
ac = min(ac, audiochannels)
|
if ac:
|
||||||
|
ac = min(ac, audiochannels)
|
||||||
|
else:
|
||||||
|
ac = audiochannels
|
||||||
audio_settings += ['-ac', str(ac)]
|
audio_settings += ['-ac', str(ac)]
|
||||||
if audiobitrate:
|
if audiobitrate:
|
||||||
audio_settings += ['-ab', audiobitrate]
|
audio_settings += ['-ab', audiobitrate]
|
||||||
|
|
Loading…
Reference in a new issue