From a85f64070505cae59cb70341a35d6ac9b074935a Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 2 Apr 2014 16:44:42 +0200 Subject: [PATCH] also downmix mono mix if channels are set in profile --- pandora_client/extract.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pandora_client/extract.py b/pandora_client/extract.py index 0adf7b8..b3f4625 100644 --- a/pandora_client/extract.py +++ b/pandora_client/extract.py @@ -257,13 +257,15 @@ def video_cmd(video, target, profile, info): video_settings += ['-map', '0:%s,0:%s' % (info['audio'][0]['id'], n)] mono_mix = False audio_settings = ['-ar', str(audiorate), '-aq', str(audioquality)] - if not mono_mix: + if mono_mix: + ac = 2 + else: ac = info['audio'][0].get('channels', audiochannels) - if ac: - ac = min(ac, audiochannels) - else: - ac = audiochannels - audio_settings += ['-ac', str(ac)] + if ac: + ac = min(ac, audiochannels) + else: + ac = audiochannels + audio_settings += ['-ac', str(ac)] if audiobitrate: audio_settings += ['-ab', audiobitrate] if format == 'mp4':