not using seqid
This commit is contained in:
parent
94632c550d
commit
eaf95133d6
1 changed files with 0 additions and 24 deletions
24
render.py
24
render.py
|
|
@ -118,14 +118,6 @@ def compose(clips, fragment, target=150, base=1024, voice_over=None, options=Non
|
||||||
clips = selected_clips
|
clips = selected_clips
|
||||||
clip = None
|
clip = None
|
||||||
while target - length > 0 and clips:
|
while target - length > 0 and clips:
|
||||||
'''
|
|
||||||
if clip:
|
|
||||||
if chance(seq, 0.5):
|
|
||||||
next_seqid = clip['seqid'] + 1
|
|
||||||
clip = get_clip_by_seqid(clips, next_seqid)
|
|
||||||
else:
|
|
||||||
clip = None
|
|
||||||
'''
|
|
||||||
clip = None
|
clip = None
|
||||||
if not clip:
|
if not clip:
|
||||||
# FIXME: while not all clips have AI versions make sure we have one 50% of the time
|
# FIXME: while not all clips have AI versions make sure we have one 50% of the time
|
||||||
|
|
@ -1033,22 +1025,6 @@ def generate_clips(options):
|
||||||
if adjust_volume:
|
if adjust_volume:
|
||||||
clip['volume'] = float(adjust_volume)
|
clip['volume'] = float(adjust_volume)
|
||||||
clip['id'] = i.public_id
|
clip['id'] = i.public_id
|
||||||
name = os.path.basename(source_target)
|
|
||||||
seqid = re.sub(r"Hotel Aporia_(\d+)", "S\\1_", name)
|
|
||||||
seqid = re.sub(r"Night March_(\d+)", "S\\1_", seqid)
|
|
||||||
seqid = re.sub(r"_(\d+)H_(\d+)", "_S\\1\\2_", seqid)
|
|
||||||
seqid = seqid.split('_')[:2]
|
|
||||||
seqid = [b[1:] if b[:1] in ('B', 'S') else '0' for b in seqid]
|
|
||||||
seqid[1] = resolve_roman(seqid[1])
|
|
||||||
seqid[1] = ''.join([b for b in seqid[1] if b.isdigit()])
|
|
||||||
if not seqid[1]:
|
|
||||||
seqid[1] = '0'
|
|
||||||
try:
|
|
||||||
clip['seqid'] = int(''.join(['%06d' % int(b) for b in seqid]))
|
|
||||||
except:
|
|
||||||
print(name, seqid, 'failed')
|
|
||||||
raise
|
|
||||||
|
|
||||||
clips.append(clip)
|
clips.append(clip)
|
||||||
|
|
||||||
with open(os.path.join(prefix, 'clips.json'), 'w') as fd:
|
with open(os.path.join(prefix, 'clips.json'), 'w') as fd:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue