Spaces:
Running
Running
Update src/video/processor.py
Browse files- src/video/processor.py +4 -12
src/video/processor.py
CHANGED
@@ -67,6 +67,9 @@ def combine_video_audio_subtitles(video_path, audio_path, srt_path, output_path=
|
|
67 |
except Exception as e:
|
68 |
logger.error(f"Combining failed: {str(e)}")
|
69 |
raise Exception(f"Failed to combine video/audio/subtitles: {str(e)}")
|
|
|
|
|
|
|
70 |
def combine_method_subtitles_filter(video_path, audio_path, srt_path, output_path):
|
71 |
"""
|
72 |
Combine video, audio, and subtitles using ffmpeg with subtitle filter.
|
@@ -82,18 +85,7 @@ def combine_method_subtitles_filter(video_path, audio_path, srt_path, output_pat
|
|
82 |
"""
|
83 |
logger.info(f"Using subtitles filter method")
|
84 |
|
85 |
-
|
86 |
-
# 'ffmpeg',
|
87 |
-
# '-i', str(video_path),
|
88 |
-
# '-i', str(audio_path),
|
89 |
-
# '-c:v', 'libx264',
|
90 |
-
# '-c:a', 'aac', # Force AAC audio
|
91 |
-
# '-strict', 'experimental',
|
92 |
-
# '-b:a', '192k',
|
93 |
-
# str(output_path)
|
94 |
-
# ]
|
95 |
-
# Use ffmpeg to combine video, audio, and subtitles
|
96 |
-
|
97 |
cmd = [
|
98 |
'ffmpeg',
|
99 |
'-i', str(video_path), # Video input
|
|
|
67 |
except Exception as e:
|
68 |
logger.error(f"Combining failed: {str(e)}")
|
69 |
raise Exception(f"Failed to combine video/audio/subtitles: {str(e)}")
|
70 |
+
|
71 |
+
|
72 |
+
|
73 |
def combine_method_subtitles_filter(video_path, audio_path, srt_path, output_path):
|
74 |
"""
|
75 |
Combine video, audio, and subtitles using ffmpeg with subtitle filter.
|
|
|
85 |
"""
|
86 |
logger.info(f"Using subtitles filter method")
|
87 |
|
88 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
cmd = [
|
90 |
'ffmpeg',
|
91 |
'-i', str(video_path), # Video input
|