diff --git a/render_mlt.py b/render_mlt.py index d182675..ee05b39 100755 --- a/render_mlt.py +++ b/render_mlt.py @@ -185,6 +185,8 @@ for name, plist in ( else: add_audio_clip(plist, clip['path'], frames) +duration = sum(clip['duration'] for clip in data['clips']) + save_xml(vocals, target_vocals) video.set("hide", 1) save_xml(video, target_source) @@ -234,7 +236,6 @@ subprocess.call([ 'qmelt', target_audio, '-consumer', 'avformat:' + target_audio_wav, ]) audiomix = mlt.Playlist() -duration = sum(clip['duration'] for clip in data['clips']) add_audio_clip(audiomix, target_audio_wav, int(duration * fps)) # mix video + audio