fix utf8 filenames, better -map
This commit is contained in:
parent
db4b9b39e9
commit
4392df0678
2 changed files with 5 additions and 6 deletions
|
@ -232,9 +232,9 @@ class Client(object):
|
||||||
path = [filename]
|
path = [filename]
|
||||||
for p in path:
|
for p in path:
|
||||||
if os.path.exists(p):
|
if os.path.exists(p):
|
||||||
cmd = encode_cmd(p, self.media_cache(), self.profile, None)
|
cmd = encode_cmd(p.decode('utf-8'), self.media_cache(), self.profile, None)
|
||||||
cmd = [' ' in c and '"%s"' % c or c for c in cmd]
|
cmd = [' ' in c and u'"%s"' % c or c for c in cmd]
|
||||||
print ' '.join(cmd)
|
print (u' '.join(cmd)).encode('utf-8')
|
||||||
|
|
||||||
def save_config(self):
|
def save_config(self):
|
||||||
if not self._configfile:
|
if not self._configfile:
|
||||||
|
|
|
@ -169,14 +169,13 @@ def video_cmd(video, target, profile, info):
|
||||||
'-lag-in-frames', '16',
|
'-lag-in-frames', '16',
|
||||||
'-auto-alt-ref', '1',
|
'-auto-alt-ref', '1',
|
||||||
]
|
]
|
||||||
|
video_settings += ['-map', '0:%s,0'%info['video'][0]['id']]
|
||||||
else:
|
else:
|
||||||
video_settings = ['-vn']
|
video_settings = ['-vn']
|
||||||
|
|
||||||
if info['audio']:
|
if info['audio']:
|
||||||
|
video_settings += ['-map', '0:%s,1'%info['audio'][0]['id']]
|
||||||
audio_settings = ['-ar', str(audiorate), '-aq', str(audioquality)]
|
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 = info['audio'][0].get('channels', audiochannels)
|
||||||
ac = min(ac, audiochannels)
|
ac = min(ac, audiochannels)
|
||||||
audio_settings += ['-ac', str(ac)]
|
audio_settings += ['-ac', str(ac)]
|
||||||
|
|
Loading…
Reference in a new issue