This commit is contained in:
j 2013-05-10 14:17:15 +00:00
parent dacac4562e
commit b1d326c6dd
1 changed files with 6 additions and 3 deletions

View File

@ -217,7 +217,8 @@ def stream(video, target, profile, info):
if info['audio']: if info['audio']:
audio_settings = ['-ar', str(audiorate), '-aq', str(audioquality)] audio_settings = ['-ar', str(audiorate), '-aq', str(audioquality)]
if audiochannels and 'channels' in info['audio'][0] and info['audio'][0]['channels'] > audiochannels: if audiochannels and 'channels' in info['audio'][0] \
and info['audio'][0]['channels'] > audiochannels:
audio_settings += ['-ac', str(audiochannels)] audio_settings += ['-ac', str(audiochannels)]
if audiobitrate: if audiobitrate:
audio_settings += ['-ab', audiobitrate] audio_settings += ['-ab', audiobitrate]
@ -284,7 +285,8 @@ def frame(videoFile, frame, position, height=128, redo=False):
frameFolder = os.path.dirname(frame) frameFolder = os.path.dirname(frame)
if redo or not exists(frame): if redo or not exists(frame):
ox.makedirs(frameFolder) ox.makedirs(frameFolder)
cmd = ['oxframe', '-i', videoFile, '-o', frame, '-p', str(position), '-y', str(height)] cmd = ['oxframe', '-i', videoFile, '-o', frame,
'-p', str(position), '-y', str(height)]
run_command(cmd) run_command(cmd)
@ -331,7 +333,8 @@ def timeline(video, prefix, modes=None, size=None):
'-o', prefix, '-o', prefix,
'-c', os.path.join(prefix, 'cuts.json'), '-c', os.path.join(prefix, 'cuts.json'),
] + video ] + video
p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) p = subprocess.Popen(cmd, stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
#print cmd #print cmd
#p = subprocess.Popen(cmd) #p = subprocess.Popen(cmd)
p.wait() p.wait()