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])