Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def convert_sup_to_srt(sup_file, subtitle_edit_path):
- srt_file = os.path.splitext(sup_file)[0] + ".srt"
- cmd = [
- subtitle_edit_path,
- "/convert",
- sup_file,
- "subrip"
- ]
- print(f"Starting conversion of {sup_file} to {srt_file}...")
- subprocess.check_call(cmd)
- print(f"Conversion of {sup_file} to {srt_file} completed.")
- return srt_file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement