Fix FFmpeg command: remove complex filtergraph
Browse files
src/music_video_generator.py
CHANGED
|
@@ -37,10 +37,9 @@ def create_music_video(audio_path, video_path, output_filename):
|
|
| 37 |
"-i", video_path, # Input 0: Video
|
| 38 |
"-i", audio_path, # Input 1: Audio
|
| 39 |
"-filter_complex",
|
| 40 |
-
"[0:v]scale=1080:1920:force_original_aspect_ratio=increase,crop=1080:1920[outv]
|
| 41 |
-
"[
|
| 42 |
-
"
|
| 43 |
-
"-map", "[outv]", "-map", "1:a", # Map video and SONG audio (ignore video audio)
|
| 44 |
"-c:v", "libx264", "-preset", "ultrafast", "-crf", "23",
|
| 45 |
"-c:a", "aac", "-b:a", "192k",
|
| 46 |
"-shortest", "-y", output_filename
|
|
|
|
| 37 |
"-i", video_path, # Input 0: Video
|
| 38 |
"-i", audio_path, # Input 1: Audio
|
| 39 |
"-filter_complex",
|
| 40 |
+
"[0:v]scale=1080:1920:force_original_aspect_ratio=increase,crop=1080:1920[outv]", # Portrait crop only
|
| 41 |
+
"-map", "[outv]", # Use processed video
|
| 42 |
+
"-map", "1:a", # Use Song Audio (Input 1) directly
|
|
|
|
| 43 |
"-c:v", "libx264", "-preset", "ultrafast", "-crf", "23",
|
| 44 |
"-c:a", "aac", "-b:a", "192k",
|
| 45 |
"-shortest", "-y", output_filename
|