fix: use -t instead of -shortest to prevent video truncation
Narration audio can be shorter than video. -shortest would cut the final video at audio end. Use -t with exact video duration instead. Also regenerated demo with subtitles (ffmpeg now has libass).
This commit is contained in:
1 parent
5a2ec52327
commit
0c201af940
2 files changed
+2
-2
No files matched your search
@@ -156,7 +156,7 @@ def run(
|
||||
"-map", v_map, "-map", audio_mix,
|
||||
"-c:v", "libx264", "-preset", "fast",
|
||||
"-c:a", "aac", "-b:a", "192k",
|
||||
"-shortest",
|
||||
"-t", str(video_duration),
|
||||
output_path,
|
||||
]
|
||||
else:
|
||||
@@ -170,7 +170,7 @@ def run(
|
||||
"-map", "0:v", "-map", "1:a",
|
||||
"-c:v", "libx264", "-preset", "fast",
|
||||
"-c:a", "aac", "-b:a", "192k",
|
||||
"-shortest",
|
||||
"-t", str(video_duration),
|
||||
output_path,
|
||||
])
|
||||
|
||||
|
||||
Binary file not shown.
Reference in new issue
Block a user