fix utf8 filenames, better -map

This commit is contained in:
j 2012-06-05 15:55:56 +02:00
parent db4b9b39e9
commit 4392df0678
2 changed files with 5 additions and 6 deletions

View file

@ -232,9 +232,9 @@ class Client(object):
path = [filename]
for p in path:
if os.path.exists(p):
cmd = encode_cmd(p, self.media_cache(), self.profile, None)
cmd = [' ' in c and '"%s"' % c or c for c in cmd]
print ' '.join(cmd)
cmd = encode_cmd(p.decode('utf-8'), self.media_cache(), self.profile, None)
cmd = [' ' in c and u'"%s"' % c or c for c in cmd]
print (u' '.join(cmd)).encode('utf-8')
def save_config(self):
if not self._configfile:

View file

@ -169,14 +169,13 @@ def video_cmd(video, target, profile, info):
'-lag-in-frames', '16',
'-auto-alt-ref', '1',
]
video_settings += ['-map', '0:%s,0'%info['video'][0]['id']]
else:
video_settings = ['-vn']
if info['audio']:
video_settings += ['-map', '0:%s,1'%info['audio'][0]['id']]
audio_settings = ['-ar', str(audiorate), '-aq', str(audioquality)]
if len(info['audio'][0]) > 1 and info['video']:
audio_settings += ['-map', '0:0']
audio_settings += ['-map', '0:1']
ac = info['audio'][0].get('channels', audiochannels)
ac = min(ac, audiochannels)
audio_settings += ['-ac', str(ac)]