Merge d10e8b401f
into 1893beda4d
This commit is contained in:
commit
e3641a46f4
2 changed files with 9 additions and 4 deletions
2
make.py
2
make.py
|
@ -184,6 +184,8 @@ def worker():
|
||||||
|
|
||||||
# prepend workdir to input file
|
# prepend workdir to input file
|
||||||
task.infile = os.path.join(workdir, task.infile)
|
task.infile = os.path.join(workdir, task.infile)
|
||||||
|
if task.audiofile:
|
||||||
|
task.audiofile = os.path.join(workdir, task.audiofile)
|
||||||
task.outfile = os.path.join(outdir, task.outfile)
|
task.outfile = os.path.join(outdir, task.outfile)
|
||||||
task.workdir = workdir
|
task.workdir = workdir
|
||||||
|
|
||||||
|
|
|
@ -36,12 +36,15 @@ def easeDelay(easer, delay, t, b, c, d, *args):
|
||||||
|
|
||||||
|
|
||||||
class Rendertask:
|
class Rendertask:
|
||||||
def __init__(self, infile, parameters={}, outfile=None, workdir='.', sequence=None):
|
def __init__(self, infile, audiofile=None, parameters={}, outfile=None, workdir='.', sequence=None):
|
||||||
if isinstance(infile, list):
|
if isinstance(infile, list):
|
||||||
self.infile = infile[0]
|
self.infile = infile[0]
|
||||||
# self.audiofile = infile[1]
|
self.audiofile = infile[1]
|
||||||
else:
|
else:
|
||||||
self.infile = infile
|
self.infile = infile
|
||||||
|
if audiofile:
|
||||||
|
self.audiofile = audiofile
|
||||||
|
else:
|
||||||
self.audiofile = None
|
self.audiofile = None
|
||||||
self.parameters = parameters
|
self.parameters = parameters
|
||||||
self.outfile = outfile
|
self.outfile = outfile
|
||||||
|
@ -200,7 +203,7 @@ def rendertask_video(task):
|
||||||
if task.audiofile is None:
|
if task.audiofile is None:
|
||||||
cmd += '-map 1:0 -map 2:0 '
|
cmd += '-map 1:0 -map 2:0 '
|
||||||
else:
|
else:
|
||||||
cmd += '-map 1:0 -c:a copy -map 2:0 -c:a copy '
|
cmd += '-map 1:a -c:a copy -map 2:a -c:a copy '
|
||||||
cmd += '-shortest -f mpegts "{0}"'.format(task.outfile)
|
cmd += '-shortest -f mpegts "{0}"'.format(task.outfile)
|
||||||
elif task.outfile.endswith('.mov'):
|
elif task.outfile.endswith('.mov'):
|
||||||
cmd = 'cd {0} && '.format(task.workdir)
|
cmd = 'cd {0} && '.format(task.workdir)
|
||||||
|
|
Loading…
Add table
Reference in a new issue