From 10e9c5fae1efd41de949f71c4c1888a86e5b1fdd Mon Sep 17 00:00:00 2001 From: hbrain Date: Mon, 25 May 2026 00:56:49 +0000 Subject: [PATCH] Use current directory for default output --- README.md | 4 ++-- movmaker.py | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 14fbaa9..61fb2c2 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,7 @@ With options: ```bash python3 movmaker.py input \ - --out-dir out \ + --out-dir . \ --image-duration 6 \ --fade 3 \ --audio-fade 10 \ @@ -159,7 +159,7 @@ python3 movmaker.py input --preview - adds persistent bottom-left title/date/place and bottom-right `@bubulescu` stamps - writes safe ASCII text in rendered overlays and metadata, so special letters become readable equivalents like `Č` -> `C`, `å` -> `a`, `ø` -> `o` - embeds MP4 metadata: title, date, location, artist, comment, and creation_time -- writes an MP4 file named like `YYYYMMDD_title.mp4` by default +- writes an MP4 file named like `YYYYMMDD_title.mp4` in the current directory by default - takes `YYYYMMDD` from the first picture/video metadata, falling back to file modification date - uses local `ffmpeg/ffmpeg` and `ffmpeg/ffprobe` when present, otherwise system tools diff --git a/movmaker.py b/movmaker.py index 15e7297..14c016d 100755 --- a/movmaker.py +++ b/movmaker.py @@ -398,7 +398,7 @@ def build_video( nonlocal text_file_count path = text_dir / f"drawtext_{text_file_count:04d}.txt" text_file_count += 1 - path.write_text(ascii_safe(text), encoding="utf-8") + path.write_text(text, encoding="utf-8") return f"textfile='{path}':expansion=none" cmd = [tool_path(FFMPEG, "ffmpeg"), "-y"] @@ -541,9 +541,9 @@ def build_video( cmd += ["-filter_complex", ";".join(filters), "-map", f"[{final_label}]"] metadata = { - "title": ascii_safe(data.title), - "date": ascii_safe(data.date), - "location": ascii_safe(data.place), + "title": data.title, + "date": data.date, + "location": data.place, "artist": "@bubulescu", "comment": "Created with movmaker", "creation_time": creation_date.isoformat(), @@ -567,8 +567,8 @@ 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 out/YYYYMMDD_title.mp4") - parser.add_argument("--out-dir", type=Path, default=Path("out"), help="directory for auto-named output videos") + 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") parser.add_argument("--audio-fade", type=float, default=10.0, help="music fade-out duration in seconds")