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)
|
||||
if render_xml:
|
||||
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])
|
||||
|
|
|
@ -1,14 +1,26 @@
|
|||
#!/usr/bin/python
|
||||
import os
|
||||
import time
|
||||
import sys
|
||||
from argparse import ArgumentParser
|
||||
import json
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
|
||||
import ox
|
||||
import mlt
|
||||
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
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
|
||||
|
@ -198,6 +210,7 @@ save_xml(drones, target_drones)
|
|||
|
||||
save_xml(music, target_music)
|
||||
|
||||
if version == 'performance':
|
||||
# render gongs
|
||||
subprocess.call([
|
||||
# offset in pi, duration, number of tracks, target
|
||||
|
@ -210,12 +223,11 @@ subprocess.call([
|
|||
# load gongs
|
||||
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
|
||||
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")
|
||||
# lower volume
|
||||
|
|
15
subtitles.py
15
subtitles.py
|
@ -1,13 +1,14 @@
|
|||
#!/usr/bin/python3
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
import re
|
||||
import subprocess
|
||||
from argparse import ArgumentParser
|
||||
from collections import defaultdict
|
||||
import string
|
||||
from glob import glob
|
||||
from copy import deepcopy
|
||||
from glob import glob
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import string
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
import ox
|
||||
import ox.web.auth
|
||||
|
|
Loading…
Reference in a new issue