diff options
author | Paul Kocialkowski | 2022-10-28 16:04:47 +0200 |
---|---|---|
committer | Paul Kocialkowski | 2022-10-28 17:58:43 +0200 |
commit | 969f6b74040bccaa45a0f378476f518abbbf05a8 (patch) | |
tree | 6ac09af0f174ed41b78c235ccc4ed4e9de295a4f /capture-pipeline | |
parent | 9d839c50cedd8c5d5e6f705591019ad9dfe7b158 (diff) |
capture-pipeline: Merge output_step into output_prepare
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'capture-pipeline')
-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 |