Compare commits
No commits in common. "a5957fc3b2c65cd3380b541c519ad11964c0a365" and "5075394318181bf42df099da67ffd2715b1a5b86" have entirely different histories.
a5957fc3b2
...
5075394318
3 changed files with 6 additions and 31 deletions
|
@ -30,21 +30,10 @@ class Command(BaseCommand):
|
||||||
json.dump(scene, fd, indent=2, ensure_ascii=False)
|
json.dump(scene, fd, indent=2, ensure_ascii=False)
|
||||||
if not options['no_video']:
|
if not options['no_video']:
|
||||||
for timeline in timelines:
|
for timeline in timelines:
|
||||||
ext = '.mp4'
|
|
||||||
if '-audio.kdenlive' in timeline:
|
|
||||||
ext = '.wav'
|
|
||||||
cmd = [
|
cmd = [
|
||||||
'xvfb-run', '-a',
|
'xvfb-run', '-a',
|
||||||
'melt', timeline,
|
'melt', timeline,
|
||||||
'-consumer', 'avformat:%s' % timeline.replace('.kdenlive', ext)
|
'-consumer', 'avformat:%s' % timeline.replace('.kdenlive', '.mp4')
|
||||||
]
|
]
|
||||||
subprocess.call(cmd)
|
subprocess.call(cmd)
|
||||||
if ext == '.wav':
|
|
||||||
cmd = [
|
|
||||||
'ffmpeg', '-i',
|
|
||||||
timeline.replace('.kdenlive', ext),
|
|
||||||
timeline.replace('.kdenlive', '.mp4')
|
|
||||||
]
|
|
||||||
subprocess.call(cmd)
|
|
||||||
os.unlink(timeline.replace('.kdenlive', ext))
|
|
||||||
|
|
||||||
|
|
|
@ -62,14 +62,9 @@ def compose(clips, target=150, base=1024):
|
||||||
break
|
break
|
||||||
length += clip['duration']
|
length += clip['duration']
|
||||||
|
|
||||||
fg = clip['foreground']
|
|
||||||
if 'foreground2' in clip:
|
|
||||||
if chance(seq, 0.5):
|
|
||||||
fg = clip['foreground2']
|
|
||||||
|
|
||||||
scene['front']['V1'].append({
|
scene['front']['V1'].append({
|
||||||
'duration': clip['duration'],
|
'duration': clip['duration'],
|
||||||
'src': fg,
|
'src': clip['foreground'],
|
||||||
"filter": {
|
"filter": {
|
||||||
'transparency': seq() / 10,
|
'transparency': seq() / 10,
|
||||||
}
|
}
|
||||||
|
@ -115,7 +110,7 @@ def compose(clips, target=150, base=1024):
|
||||||
})
|
})
|
||||||
scene['audio']['A2'].append({
|
scene['audio']['A2'].append({
|
||||||
'duration': clip['duration'],
|
'duration': clip['duration'],
|
||||||
'src': fg,
|
'src': clip['foreground'],
|
||||||
})
|
})
|
||||||
return scene
|
return scene
|
||||||
|
|
||||||
|
|
|
@ -19,16 +19,8 @@ class KDEnliveProject:
|
||||||
def to_xml(self):
|
def to_xml(self):
|
||||||
track = self._main_tractor.xpath(".//track")[0]
|
track = self._main_tractor.xpath(".//track")[0]
|
||||||
duration = max(self._duration.values())
|
duration = max(self._duration.values())
|
||||||
values = {
|
track.attrib["in"] = self._sequence.attrib["in"] = self._main_tractor.attrib["in"] = "0"
|
||||||
"in": "0",
|
track.attrib["out"] = self._sequence.attrib["out"] = self._main_tractor.attrib["out"] = str(duration - 1)
|
||||||
"out": str(duration - 1)
|
|
||||||
}
|
|
||||||
for key, value in values.items():
|
|
||||||
track.attrib[key] = value
|
|
||||||
self._sequence.attrib[key] = value
|
|
||||||
self._main_tractor.attrib[key] = value
|
|
||||||
self._audio_tractor.attrib[key] = value
|
|
||||||
|
|
||||||
self._tree.remove(self._sequence)
|
self._tree.remove(self._sequence)
|
||||||
self._tree.append(self._sequence)
|
self._tree.append(self._sequence)
|
||||||
self._tree.remove(self._main_bin)
|
self._tree.remove(self._main_bin)
|
||||||
|
@ -313,7 +305,6 @@ class KDEnliveProject:
|
||||||
self._sequence = sequence
|
self._sequence = sequence
|
||||||
self._main_bin = main_bin
|
self._main_bin = main_bin
|
||||||
self._main_tractor = t4
|
self._main_tractor = t4
|
||||||
self._audio_tractor = t1
|
|
||||||
self._v1 = v1
|
self._v1 = v1
|
||||||
self._v2 = v2
|
self._v2 = v2
|
||||||
self._a1 = a1
|
self._a1 = a1
|
||||||
|
@ -343,7 +334,7 @@ class KDEnliveProject:
|
||||||
("kdenlive:clip_type", "0"),
|
("kdenlive:clip_type", "0"),
|
||||||
("kdenlive:folderid", "-1"),
|
("kdenlive:folderid", "-1"),
|
||||||
("kdenlive:id", kdenlive_id),
|
("kdenlive:id", kdenlive_id),
|
||||||
("set.test_audio", "0"),
|
("set.test_audio", "1"),
|
||||||
("set.test_image", "0"),
|
("set.test_image", "0"),
|
||||||
("xml", "was here"),
|
("xml", "was here"),
|
||||||
]:
|
]:
|
||||||
|
|
Loading…
Add table
Reference in a new issue