Show title over black intro

This commit is contained in:
hbrain 2026-05-25 14:18:20 +00:00
parent 8a0901590b
commit dfa98d03a0
2 changed files with 19 additions and 8 deletions

View file

@ -188,7 +188,8 @@ python3 movmaker.py input --preview
- if no audio file exists in the input folder, searches Jamendo using `--music-genre` and downloads one random Creative Commons track that allows non-commercial reuse and derivative works; default query is `cinematic punk rock`
- reads the Jamendo client ID from `JAMENDO_CLIENT_ID` or `~/.config/movmaker/jamendo.env`
- fades music in over 2 seconds and out over 10 seconds by default
- fades video in/out over 1.5 seconds by default
- shows opening title/stamps immediately on a black background while audio fades in, then fades the first image/video in over 1.5 seconds by default
- fades video out over 1.5 seconds by default
- overlays the opening title for the first 6 seconds: large title, then date/location on one line
- displays optional per-file captions at bottom center with slightly off-white text and a soft shadow; use `|` to split caption lines
- adds persistent bottom-left title/date/place and bottom-right `Bubulescu.Org` stamps

View file

@ -766,12 +766,22 @@ def build_video(
current = next_label
total_duration += durations[i] - fade
intro_duration = audio_fade_in if audio_fade_in > 0 else 0.0
if intro_duration > 0:
intro_label = "intro_padded"
filters.append(
f"[{current}]tpad=start_duration={intro_duration:.3f}:start_mode=add:color=black[{intro_label}]"
)
current = intro_label
total_duration += intro_duration
fade_label = current
if video_fade > 0:
fade_in_start = intro_duration
fade_out_start = max(0.0, total_duration - video_fade)
fade_label = "video_faded"
filters.append(
f"[{current}]fade=t=in:st=0:d={video_fade:.3f},fade=t=out:st={fade_out_start:.3f}:d={video_fade:.3f}[{fade_label}]"
f"[{current}]fade=t=in:st={fade_in_start:.3f}:d={video_fade:.3f},fade=t=out:st={fade_out_start:.3f}:d={video_fade:.3f}[{fade_label}]"
)
current = fade_label
@ -824,17 +834,17 @@ def build_video(
if not caption:
continue
if n == 1:
start = 0.0
start = intro_duration
end = total_duration
elif idx == 0:
start = 0.0
end = transition_offsets[0]
start = intro_duration
end = intro_duration + transition_offsets[0]
elif idx == n - 1:
start = transition_offsets[idx - 1] + fade
start = intro_duration + transition_offsets[idx - 1] + fade
end = total_duration
else:
start = transition_offsets[idx - 1] + fade
end = transition_offsets[idx]
start = intro_duration + transition_offsets[idx - 1] + fade
end = intro_duration + transition_offsets[idx]
if end <= start:
continue
caption_fade = min(1.0, max(0.0, (end - start) / 2))