Use current directory for default output

This commit is contained in:
hbrain 2026-05-25 00:56:49 +00:00
parent 352ba163ca
commit 10e9c5fae1
2 changed files with 8 additions and 8 deletions

View file

@ -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")