Compare commits
No commits in common. "73a9481ef19bc6aa36a78ad91ddc5b952ba68e67" and "b1ca39ff2b2c37c47998ab855718a194df4531a0" have entirely different histories.
73a9481ef1
...
b1ca39ff2b
5 changed files with 26 additions and 58 deletions
10
config.jsonc
10
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",
|
||||
|
|
|
@ -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:
|
||||
|
|
49
render.py
49
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]",
|
||||
'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)
|
||||
|
|
|
@ -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_),
|
||||
|
|
|
@ -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(
|
||||
` <a href="/${item.id}/info">${type}</a>`
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue