From 06678ffb90dbafa34f365b7af64fab1b6bfa0742 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 17 Feb 2017 23:07:43 +0100 Subject: [PATCH] render audio --- encode.py | 5 ++++- render.py | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/encode.py b/encode.py index 1bc92bd..dbc9b30 100755 --- a/encode.py +++ b/encode.py @@ -5,6 +5,9 @@ import shutil import subprocess for xml in glob('output/*/*.xml'): + if xml.endswith('.audio.xml'): + continue + audio_xml = xml.replace('.xml', '.audio.xml') mp4 = xml.replace('.xml', '.mp4') pre = mp4 + '.pre.mp4' video = mp4 + '.v.mp4' @@ -14,7 +17,7 @@ for xml in glob('output/*/*.xml'): 'qmelt', xml, '-consumer', 'avformat:' + video, 'vcodec=libx264', 'strict=-2' ]) subprocess.call([ - 'qmelt', xml, '-consumer', 'avformat:' + audio, + 'qmelt', audio_xml, '-consumer', 'avformat:' + audio, ]) subprocess.call([ 'ffmpeg', '-y', diff --git a/render.py b/render.py index 4f1bb0c..bad53a1 100755 --- a/render.py +++ b/render.py @@ -282,6 +282,7 @@ def sequence(seq, letter): return result + if __name__ == '__main__': for n in range(10): seq = random(n * 1000) @@ -304,3 +305,4 @@ if __name__ == '__main__': with open(tjson, 'w') as fd: fd.write(current) subprocess.call(['./render_mlt.py', tjson]) + subprocess.call(['./render_audio.py', tjson])