Spaces:
Runtime error
Runtime error
Commit
·
39d50e3
1
Parent(s):
3e3b2c0
trial fixes
Browse files- video_tool.py +9 -10
video_tool.py
CHANGED
@@ -2,16 +2,15 @@ import ffmpeg
|
|
2 |
|
3 |
|
4 |
def convert_video_to_audio(input_file, output_file, start_time, end_time):
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
)
|
12 |
-
|
13 |
-
|
14 |
-
raise
|
15 |
|
16 |
|
17 |
def add_subtitle_to_video(input_file, subtitle_file, output_file, start_time, end_time):
|
|
|
2 |
|
3 |
|
4 |
def convert_video_to_audio(input_file, output_file, start_time, end_time):
|
5 |
+
print(input_file)
|
6 |
+
print(output_file)
|
7 |
+
_, err = (
|
8 |
+
ffmpeg
|
9 |
+
.input(input_file, ss=start_time, to=end_time)
|
10 |
+
.output(output_file, format="wav", acodec='pcm_s16le')
|
11 |
+
.run(overwrite_output=True, capture_stderr=True)
|
12 |
+
)
|
13 |
+
print(err)
|
|
|
14 |
|
15 |
|
16 |
def add_subtitle_to_video(input_file, subtitle_file, output_file, start_time, end_time):
|