Simplify output directory option

This commit is contained in:
hbrain 2026-05-25 00:59:10 +00:00
parent 10e9c5fae1
commit 37aabd456e
2 changed files with 5 additions and 5 deletions

View file

@ -2,7 +2,7 @@
"""Simple flat-folder photo/video movie maker using ffmpeg.
Usage:
python movmaker.py input --output movie.mp4
python movmaker.py input --out-dir .
Put images, videos, audio files, and optionally data.txt in one directory.
"""
@ -567,7 +567,6 @@ def build_video(
def main(argv: list[str] | None = None) -> int:
parser = argparse.ArgumentParser(description="Make a video from a flat folder of images/videos/audio.")
parser.add_argument("input", type=Path, help="flat input directory")
parser.add_argument("--output", "-o", type=Path, help="output mp4 path; defaults to YYYYMMDD_title.mp4 in the current directory")
parser.add_argument("--out-dir", type=Path, default=Path("."), help="directory for auto-named output videos")
parser.add_argument("--image-duration", type=float, default=6.0, help="seconds each image is visible")
parser.add_argument("--fade", type=float, default=3.0, help="crossfade duration in seconds")
@ -605,7 +604,7 @@ def main(argv: list[str] | None = None) -> int:
audio_fade_in = max(0.0, args.audio_fade_in)
video_fade = max(0.0, args.video_fade)
output = args.output or default_output_path(media[0].path, data, args.out_dir)
output = default_output_path(media[0].path, data, args.out_dir)
# Image duration means fully visible time, not including crossfades.
# Middle images need both a fade-in and fade-out added to their clip length.