error
Browse files- video_editing_ffmpeg.py +2 -2
video_editing_ffmpeg.py
CHANGED
|
@@ -94,11 +94,11 @@ def concatenate_videos(files_timestamps):
|
|
| 94 |
file_name = f"{output_dir}/video_edited_{random_string}.mp4" # Use .mp4 for compatibility
|
| 95 |
|
| 96 |
# Perform the concatenation using ffmpeg
|
| 97 |
-
ffmpeg.output(joined[0], joined[1], file_name, **{'c:v': 'libx264',
|
| 98 |
print("Video concatenation successful")
|
| 99 |
return file_name
|
| 100 |
except ffmpeg.Error as e:
|
| 101 |
-
print(f"Error during concatenation: {e
|
| 102 |
return None
|
| 103 |
|
| 104 |
|
|
|
|
| 94 |
file_name = f"{output_dir}/video_edited_{random_string}.mp4" # Use .mp4 for compatibility
|
| 95 |
|
| 96 |
# Perform the concatenation using ffmpeg
|
| 97 |
+
ffmpeg.output(joined[0], joined[1], file_name, **{'c:v': 'libx264', 'c:a': 'aac'}, preset='fast').run(overwrite_output=True)
|
| 98 |
print("Video concatenation successful")
|
| 99 |
return file_name
|
| 100 |
except ffmpeg.Error as e:
|
| 101 |
+
print(f"Error during concatenation: {e}")
|
| 102 |
return None
|
| 103 |
|
| 104 |
|