Advertisement
Guest User

Untitled

a guest
Apr 29th, 2023
354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. def convert_sup_to_srt(sup_file, subtitle_edit_path):
  2. srt_file = os.path.splitext(sup_file)[0] + ".srt"
  3. cmd = [
  4. subtitle_edit_path,
  5. "/convert",
  6. sup_file,
  7. "subrip"
  8. ]
  9. print(f"Starting conversion of {sup_file} to {srt_file}...")
  10. subprocess.check_call(cmd)
  11. print(f"Conversion of {sup_file} to {srt_file} completed.")
  12. return srt_file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement