render audio only
This commit is contained in:
parent
e10dfe039f
commit
d625ad8f4c
1 changed files with 12 additions and 1 deletions
|
@ -30,10 +30,21 @@ class Command(BaseCommand):
|
|||
json.dump(scene, fd, indent=2, ensure_ascii=False)
|
||||
if not options['no_video']:
|
||||
for timeline in timelines:
|
||||
ext = '.mp4'
|
||||
if '-audio.kdenlive' in timeline:
|
||||
ext = '.wav'
|
||||
cmd = [
|
||||
'xvfb-run', '-a',
|
||||
'melt', timeline,
|
||||
'-consumer', 'avformat:%s' % timeline.replace('.kdenlive', '.mp4')
|
||||
'-consumer', 'avformat:%s' % timeline.replace('.kdenlive', ext)
|
||||
]
|
||||
subprocess.call(cmd)
|
||||
if ext == '.wav':
|
||||
cmd = [
|
||||
'ffmpeg', '-i',
|
||||
timeline.replace('.kdenlive', ext),
|
||||
timeline.replace('.kdenlive', '.mp4')
|
||||
]
|
||||
subprocess.call(cmd)
|
||||
os.unlink(timeline.replace('.kdenlive', ext))
|
||||
|
||||
|
|
Loading…
Reference in a new issue