fix import, pass prefix to render_mlt.py too
This commit is contained in:
parent
714a29015e
commit
3a91ed8660
3 changed files with 41 additions and 28 deletions
|
@ -458,5 +458,5 @@ if __name__ == '__main__':
|
||||||
fd.write(current)
|
fd.write(current)
|
||||||
if render_xml:
|
if render_xml:
|
||||||
if current != old or os.path.getmtime(tjson) < os.path.getmtime('render_mlt.py'):
|
if current != old or os.path.getmtime(tjson) < os.path.getmtime('render_mlt.py'):
|
||||||
subprocess.call(['./render_mlt.py', tjson])
|
subprocess.call(['./render_mlt.py', '--prefix', prefix, tjson])
|
||||||
#subprocess.call(['./render_audio.py', tjson])
|
#subprocess.call(['./render_audio.py', tjson])
|
||||||
|
|
|
@ -1,14 +1,26 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
import os
|
from argparse import ArgumentParser
|
||||||
import time
|
|
||||||
import sys
|
|
||||||
import json
|
import json
|
||||||
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import sys
|
||||||
|
import time
|
||||||
|
|
||||||
import ox
|
import ox
|
||||||
import mlt
|
import mlt
|
||||||
from PyQt5 import QtWidgets
|
from PyQt5 import QtWidgets
|
||||||
|
|
||||||
|
usage = "usage: %(prog)s [options] json"
|
||||||
|
parser = ArgumentParser(usage=usage)
|
||||||
|
parser.add_argument('-p', '--prefix', dest='prefix', help='version prefix', default='.')
|
||||||
|
parser.add_argument('files', metavar='path', type=str, nargs='*', help='json files')
|
||||||
|
opts = parser.parse_args()
|
||||||
|
|
||||||
|
if opts.prefix.endswith('performance'):
|
||||||
|
version = 'performance'
|
||||||
|
else:
|
||||||
|
version = 'main'
|
||||||
|
|
||||||
# Avoid segfault in webvfx
|
# Avoid segfault in webvfx
|
||||||
app = QtWidgets.QApplication(sys.argv)
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
|
|
||||||
|
@ -198,6 +210,7 @@ save_xml(drones, target_drones)
|
||||||
|
|
||||||
save_xml(music, target_music)
|
save_xml(music, target_music)
|
||||||
|
|
||||||
|
if version == 'performance':
|
||||||
# render gongs
|
# render gongs
|
||||||
subprocess.call([
|
subprocess.call([
|
||||||
# offset in pi, duration, number of tracks, target
|
# offset in pi, duration, number of tracks, target
|
||||||
|
@ -210,12 +223,11 @@ subprocess.call([
|
||||||
# load gongs
|
# load gongs
|
||||||
add_audio_clip(gongs, gongs_wav, int(duration * fps), int(5*fps))
|
add_audio_clip(gongs, gongs_wav, int(duration * fps), int(5*fps))
|
||||||
|
|
||||||
|
|
||||||
# mix drones + music
|
|
||||||
#mtractor = mix_audio_tracks(drones, music, 0.3)
|
|
||||||
|
|
||||||
# mix gongs + music
|
# mix gongs + music
|
||||||
mtractor = mix_audio_tracks(gongs, music, 0.3)
|
mtractor = mix_audio_tracks(gongs, music, 0.3)
|
||||||
|
else:
|
||||||
|
# mix drones + music
|
||||||
|
mtractor = mix_audio_tracks(drones, music, 0.3)
|
||||||
|
|
||||||
norm = mlt.Filter(profile, "volume")
|
norm = mlt.Filter(profile, "volume")
|
||||||
# lower volume
|
# lower volume
|
||||||
|
|
15
subtitles.py
15
subtitles.py
|
@ -1,13 +1,14 @@
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
import os
|
from argparse import ArgumentParser
|
||||||
import sys
|
|
||||||
import json
|
|
||||||
import re
|
|
||||||
import subprocess
|
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
import string
|
|
||||||
from glob import glob
|
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
|
from glob import glob
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
import string
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
import ox
|
import ox
|
||||||
import ox.web.auth
|
import ox.web.auth
|
||||||
|
|
Loading…
Reference in a new issue