Spaces:
Runtime error
Runtime error
Commit ·
fe8b1e3
1
Parent(s): d1f9d6f
Update app.py
Browse files
app.py
CHANGED
|
@@ -145,13 +145,9 @@ def get_text_from_mp3_whisper(inputType:str, mp3_file: str, url_path: str, taskN
|
|
| 145 |
output_file = 'subtitled.mp4'
|
| 146 |
try:
|
| 147 |
print("attempt to output file")
|
| 148 |
-
(
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
.filter('subtitles', subtitles_file)
|
| 152 |
-
.output(output_file)
|
| 153 |
-
.run()
|
| 154 |
-
)
|
| 155 |
except Exception as e:
|
| 156 |
print("failed to output file")
|
| 157 |
print(e)
|
|
|
|
| 145 |
output_file = 'subtitled.mp4'
|
| 146 |
try:
|
| 147 |
print("attempt to output file")
|
| 148 |
+
video = ffmpeg.input(input_file)
|
| 149 |
+
audio = video.audio
|
| 150 |
+
ffmpeg.concat(video.filter("subtitles", subtitles_file), audio, v=1, a=1).output(output_file).run()
|
|
|
|
|
|
|
|
|
|
|
|
|
| 151 |
except Exception as e:
|
| 152 |
print("failed to output file")
|
| 153 |
print(e)
|