diff options
-rwxr-xr-x | capture-pipeline | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/capture-pipeline b/capture-pipeline index b241499..175ae5d 100755 --- a/capture-pipeline +++ b/capture-pipeline @@ -136,8 +136,14 @@ def audio_output_name(sequence, shot, take, part = None): return name -def audio_output_step(sequence, shot, take, part = None): +def audio_output_prepare(sequence, shot, take, part = None): name = audio_output_name(sequence, shot, take, part) + base = os.path.join(settings["audio-output"], sequence["label"]) + + try: + os.stat(base) + except: + os.makedirs(base, exist_ok = True) if name: if name in sequence["audio-registry"]: @@ -158,14 +164,6 @@ def audio_output_path(sequence, shot, take, part = None): return None -def audio_output_prepare(sequence): - base = os.path.join(settings["audio-output"], sequence["label"]) - - try: - os.stat(base) - except: - os.makedirs(base, exist_ok = True) - def audio_ffmpeg_command(sequence, shot, take, part): source_path = audio_source_path(sequence, shot, take) output_path = audio_output_path(sequence, shot, take, part) @@ -234,8 +232,7 @@ def audio_process(sequence, shot, take, part): command = audio_ffmpeg_command(sequence, shot, take, part) - audio_output_prepare(sequence) - audio_output_step(sequence, shot, take, part) + audio_output_prepare(sequence, shot, take, part) if selection_skip(take) or selection_skip(part): return @@ -316,8 +313,14 @@ def video_output_name(sequence, shot, take, part = None): return name -def video_output_step(sequence, shot, take, part = None): +def video_output_prepare(sequence, shot, take, part = None): name = video_output_name(sequence, shot, take, part) + base = os.path.join(settings["video-output"], sequence["label"]) + + try: + os.stat(base) + except: + os.makedirs(base, exist_ok = True) if name: if name in sequence["video-registry"]: @@ -338,14 +341,6 @@ def video_output_path(sequence, shot, take, part = None): return None -def video_output_prepare(sequence): - base = os.path.join(settings["video-output"], sequence["label"]) - - try: - os.stat(base) - except: - os.makedirs(base, exist_ok = True) - def video_ffmpeg_command(sequence, shot, take, part): source_path = video_source_path(sequence, shot, take) output_path = video_output_path(sequence, shot, take, part) @@ -432,8 +427,7 @@ def video_process(sequence, shot, take, part): command = video_ffmpeg_command(sequence, shot, take, part) - video_output_prepare(sequence) - video_output_step(sequence, shot, take, part) + video_output_prepare(sequence, shot, take, part) if selection_skip(take) or selection_skip(part): return |