use adjustvolume in edit
This commit is contained in:
parent
75d83c5c69
commit
8cba167c22
1 changed files with 6 additions and 0 deletions
|
|
@ -168,6 +168,9 @@ def compose(clips, target=150, base=1024, voice_over=None, options=None):
|
||||||
|
|
||||||
volume_front = '-2.5'
|
volume_front = '-2.5'
|
||||||
volume_rear = '-8.5'
|
volume_rear = '-8.5'
|
||||||
|
if clip.get('volume') is not None:
|
||||||
|
volume_front = '%0.2f' % (float(volume_front) + clip['volume'])
|
||||||
|
volume_rear = '%0.2f' % (float(volume_rear) + clip['volume'])
|
||||||
scene['audio-front']['A2'].append({
|
scene['audio-front']['A2'].append({
|
||||||
'duration': clip['duration'],
|
'duration': clip['duration'],
|
||||||
'src': audio,
|
'src': audio,
|
||||||
|
|
@ -814,6 +817,9 @@ def generate_clips(options):
|
||||||
cd = format_duration(clip["duration"], 24)
|
cd = format_duration(clip["duration"], 24)
|
||||||
clip["duration"] = cd
|
clip["duration"] = cd
|
||||||
clip['tags'] = i.data.get('tags', [])
|
clip['tags'] = i.data.get('tags', [])
|
||||||
|
adjust_volume = i.data.get('adjustvolume', '')
|
||||||
|
if adjust_volume:
|
||||||
|
clip['volume'] = float(adjust_volume)
|
||||||
clip['id'] = i.public_id
|
clip['id'] = i.public_id
|
||||||
name = os.path.basename(source_target)
|
name = os.path.basename(source_target)
|
||||||
seqid = re.sub(r"Hotel Aporia_(\d+)", "S\\1_", name)
|
seqid = re.sub(r"Hotel Aporia_(\d+)", "S\\1_", name)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue