Derive first transition timing

This commit is contained in:
hbrain 2026-05-25 01:06:04 +00:00
parent 37aabd456e
commit 298394d69d
2 changed files with 2 additions and 4 deletions

View file

@ -132,7 +132,6 @@ python3 movmaker.py input \
--audio-fade 10 \
--audio-fade-in 2 \
--video-fade 1.5 \
--first-transition-at 12 \
--resolution 1920x1080 \
--fps 30
```
@ -148,7 +147,7 @@ python3 movmaker.py input --preview
- scans one flat input directory
- auto-detects media/audio/data files by extension
- shows each image fully visible for 6 seconds by default, not counting crossfades
- keeps the first image longer so the first transition starts at 12 seconds by default
- keeps the first image longer so the first transition starts after 2x image duration, 12 seconds by default
- includes video clips inline
- crossfades between media items over 3 seconds by default
- loops/trims music to match the video

View file

@ -573,7 +573,6 @@ def main(argv: list[str] | None = None) -> int:
parser.add_argument("--audio-fade", type=float, default=10.0, help="music fade-out duration in seconds")
parser.add_argument("--audio-fade-in", type=float, default=2.0, help="music fade-in duration in seconds")
parser.add_argument("--video-fade", type=float, default=1.5, help="video fade-in/fade-out duration in seconds")
parser.add_argument("--first-transition-at", type=float, default=12.0, help="seconds before first transition starts")
parser.add_argument("--resolution", type=parse_resolution, default=(1920, 1080), help="output resolution, e.g. 1920x1080")
parser.add_argument("--fps", type=int, default=30, help="output frames per second")
parser.add_argument("--preset", default="veryfast", help="x264 speed preset, e.g. ultrafast, superfast, veryfast")
@ -613,7 +612,7 @@ def main(argv: list[str] | None = None) -> int:
if item.kind != "image":
continue
if idx == 0:
item.duration = max(item.duration, args.first_transition_at + fade)
item.duration = max(item.duration, (args.image_duration * 2) + fade)
elif idx == len(media) - 1:
item.duration = item.duration + fade
else: