render audio
This commit is contained in:
parent
f433db0e7b
commit
06678ffb90
2 changed files with 6 additions and 1 deletions
|
@ -5,6 +5,9 @@ import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
for xml in glob('output/*/*.xml'):
|
for xml in glob('output/*/*.xml'):
|
||||||
|
if xml.endswith('.audio.xml'):
|
||||||
|
continue
|
||||||
|
audio_xml = xml.replace('.xml', '.audio.xml')
|
||||||
mp4 = xml.replace('.xml', '.mp4')
|
mp4 = xml.replace('.xml', '.mp4')
|
||||||
pre = mp4 + '.pre.mp4'
|
pre = mp4 + '.pre.mp4'
|
||||||
video = mp4 + '.v.mp4'
|
video = mp4 + '.v.mp4'
|
||||||
|
@ -14,7 +17,7 @@ for xml in glob('output/*/*.xml'):
|
||||||
'qmelt', xml, '-consumer', 'avformat:' + video, 'vcodec=libx264', 'strict=-2'
|
'qmelt', xml, '-consumer', 'avformat:' + video, 'vcodec=libx264', 'strict=-2'
|
||||||
])
|
])
|
||||||
subprocess.call([
|
subprocess.call([
|
||||||
'qmelt', xml, '-consumer', 'avformat:' + audio,
|
'qmelt', audio_xml, '-consumer', 'avformat:' + audio,
|
||||||
])
|
])
|
||||||
subprocess.call([
|
subprocess.call([
|
||||||
'ffmpeg', '-y',
|
'ffmpeg', '-y',
|
||||||
|
|
|
@ -282,6 +282,7 @@ def sequence(seq, letter):
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
for n in range(10):
|
for n in range(10):
|
||||||
seq = random(n * 1000)
|
seq = random(n * 1000)
|
||||||
|
@ -304,3 +305,4 @@ if __name__ == '__main__':
|
||||||
with open(tjson, 'w') as fd:
|
with open(tjson, 'w') as fd:
|
||||||
fd.write(current)
|
fd.write(current)
|
||||||
subprocess.call(['./render_mlt.py', tjson])
|
subprocess.call(['./render_mlt.py', tjson])
|
||||||
|
subprocess.call(['./render_audio.py', tjson])
|
||||||
|
|
Loading…
Add table
Reference in a new issue