diff --git a/config.jsonc b/config.jsonc index 23e4036..4345d24 100644 --- a/config.jsonc +++ b/config.jsonc @@ -547,16 +547,6 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution. "filter": true, "sort": true }, - { - "id": "editingtags", - "title": "Editing Tags", - "type": ["string"], - "autocomplete": true, - "columnRequired": true, - "columnWidth": 180, - "filter": true, - "sort": true - }, { "id": "tags", "title": "Tags", diff --git a/management/commands/generate_clips.py b/management/commands/generate_clips.py index b9e46f3..477b1f0 100644 --- a/management/commands/generate_clips.py +++ b/management/commands/generate_clips.py @@ -38,7 +38,6 @@ class Command(BaseCommand): durations.append(e.files.all()[0].duration) clip["duration"] = min(durations) clip['tags'] = i.data.get('tags', []) - clip['editingtags'] = i.data.get('editingtags', []) if "original" in clip and "foreground" in clip and "background" in clip: clips.append(clip) else: diff --git a/render.py b/render.py index 2a9d9a8..0fd5add 100644 --- a/render.py +++ b/render.py @@ -90,10 +90,6 @@ def compose(clips, target=150, base=1024, voice_over=None): length += clip['duration'] fg = clip['foreground'] - if 'foley' in clip: - foley = clip['foley'] - else: - foley = fg if 'foreground2' in clip: if chance(seq, 0.5): fg = clip['foreground2'] @@ -144,10 +140,9 @@ def compose(clips, target=150, base=1024, voice_over=None): 'duration': clip['duration'], 'src': clip['original'], }) - # TBD: Foley scene['audio']['A2'].append({ 'duration': clip['duration'], - 'src': foley, + 'src': fg, }) return scene @@ -291,43 +286,33 @@ def render_all(options): fragment_prefix = Path(fragment_prefix) cmds = [] for src, out1, out2 in ( - ("audio-A1.wav", "fl.wav", "fr.wav"), - ("audio-A2.wav", "fc.wav", "lfe.wav"), - ("audio-A3.wav", "bl.wav", "br.wav"), + ('audio-A1.wav', 'fl.wav', 'fr.wav'), + ('audio-A2.wav', 'fc.wav', 'lfe.wav'), + ('audio-A3.wav', 'bl.wav', 'br.wav'), ): cmds.append([ - "ffmpeg", "-y", - "-nostats", "-loglevel", "error", - "-i", fragment_prefix / src, - "-filter_complex", + 'ffmpeg', '-y', + '-nostats', '-loglevel', 'error', + '-i', fragment_prefix / src, + '-filter_complex', "[0:0]pan=1|c0=c0[left]; [0:0]pan=1|c0=c1[right]", "-map", "[left]", fragment_prefix / out1, "-map", "[right]", fragment_prefix / out2, ]) - cmds.append([ - "ffmpeg", "-y", - "-nostats", "-loglevel", "error", - "-i", fragment_prefix / "fl.wav", - "-i", fragment_prefix / "fr.wav", - "-i", fragment_prefix / "fc.wav", - "-i", fragment_prefix / "lfe.wav", - "-i", fragment_prefix / "bl.wav", - "-i", fragment_prefix / "br.wav", - "-filter_complex", "[0:a][1:a][2:a][3:a][4:a][5:a]amerge=inputs=6[a]", - "-map", "[a]", "-c:a", "aac", fragment_prefix / "audio-5.1.mp4" - ]) + cmds.append([ + 'ffmpeg', '-y', + '-nostats', '-loglevel', 'error', + '-i', fragment_prefix / "fl.wav", + '-i', fragment_prefix / "fr.wav", + '-i', fragment_prefix / "fc.wav", + '-i', fragment_prefix / "lfe.wav", + '-i', fragment_prefix / "bl.wav", + '-i', fragment_prefix / "br.wav", + '-filter_complex', "[0:a][1:a][2:a][3:a][4:a][5:a]amerge=inputs=6[a]", + "-map", "[a]", "-c:a", "aac", fragment_prefix / "audio-5.1.mp4" + ]) for cmd in cmds: - #print(" ".join([str(x) for x in cmd])) subprocess.call(cmd) - ''' - for fn in ( - "audio-A1.wav", "audio-A2.wav", "audio-A3.wav", - "fl.wav", "fr.wav", "fc.wav", "lfe.wav", "bl.wav", "br.wav", - ): - fn = fragment_prefix / fn - if os.path.exists(fn): - os.unlink(fn) - ''' print("Duration - Target: %s Actual: %s" % (target_position, position)) with open(_cache, "w") as fd: json.dump(_CACHE, fd) diff --git a/render_kdenlive.py b/render_kdenlive.py index 726550c..53c6b07 100644 --- a/render_kdenlive.py +++ b/render_kdenlive.py @@ -12,12 +12,6 @@ def get_propery(element, name): return element.xpath('property[@name="%s"]' % name)[0].text -def melt_xml(file): - if file in _CACHE: - out = _CACHE[file] - else: - out = _CACHE[file] = subprocess.check_output(['melt', file, '-consumer', 'xml']).decode() - return out class KDEnliveProject: @@ -429,7 +423,10 @@ class KDEnliveProject: return prefix + self.get_counter(prefix) def get_chain(self, file, kdenlive_id=None): - out = melt_xml(file) + if file in _CACHE: + out = _CACHE[file] + else: + out = _CACHE[file] = subprocess.check_output(['melt', file, '-consumer', 'xml']).decode() chain = lxml.etree.fromstring(out).xpath('producer')[0] chain.tag = 'chain' chain.attrib['id'] = self.get_id('chain') @@ -617,7 +614,7 @@ class KDEnliveProject: self.get_element("entry", attrib={ "producer": chain.attrib["id"], "in": chain.attrib["in"], - "out": str(frames - 1) + "out": str(frames), }, children=[ ["kdenlive:id", id], ] + filters_), diff --git a/static/js/infoView.t_for_time.js b/static/js/infoView.t_for_time.js index 1d1d684..7a87c3d 100644 --- a/static/js/infoView.t_for_time.js +++ b/static/js/infoView.t_for_time.js @@ -567,7 +567,7 @@ pandora.ui.infoView = function(data, isMixed) { ], operator: '&' }, - keys: ['title', 'type', 'id', 'batch'], + keys: ['title', 'type', 'id'], range: [0, 10] }; $element.appendTo($text); @@ -575,9 +575,6 @@ pandora.ui.infoView = function(data, isMixed) { response.data.items.forEach(item => { if (item.id != data.id) { var type = item.type ? item.type[0] : 'Unknown' - if (type == 'Voice Over' && item.batch) { - type = item.batch - } $element.append( ` ${type}` )