update Database to use default in init

This commit is contained in:
2026-07-29 03:03:29 +00:00
parent 500fe87614
commit b6d9b56848
7 changed files with 107 additions and 84 deletions
+4 -2
View File
@@ -18,7 +18,7 @@ def extract_audio(video_path: str):
# -map_chapters -1 removes chapter layouts that break the parser.
# -sn strips text/subtitle streams that crash MoviePy.
# -c copy copies video and audio instantly without quality loss.
linux.run_command_ffmpeg(f"ffmpeg -y -i {video_path} -map_chapters -1 -sn -c copy {sanitized_video_path}")
linux.run_command(f"ffmpeg -y -i {video_path} -map_chapters -1 -sn -c copy {sanitized_video_path}")
print("Extracting uncompressed WAV audio...")
try:
@@ -32,6 +32,8 @@ def extract_audio(video_path: str):
)
except Exception as e:
print(f"❌ Error: {e}")
if os.path.exists(audio_temp_path):
os.remove(audio_temp_path)
finally:
# Always clean up the temporary sanitized video on Windows 11
if os.path.exists(sanitized_video_path):
@@ -57,4 +59,4 @@ def transcribe_to_srt(video_path: str):
if __name__ == "__main__":
transcribe_to_srt("download/clips/AbnegateAgitatedGrassPJSalt/AbnegateAgitatedGrassPJSalt.mp4")
transcribe_to_srt("download/videos/2813112936/2813112936.mp4")