Silence SubtitleEdit when stripping SDH

This commit is contained in:
rlaphoenix 2023-03-16 20:49:23 +00:00
parent c778a890cf
commit 6e888a095e
1 changed files with 10 additions and 6 deletions

View File

@ -356,12 +356,16 @@ class Subtitle(Track):
executable = get_binary_path("SubtitleEdit")
if executable:
subprocess.run([
executable,
"/Convert", self.path, "srt",
"/overwrite",
"/RemoveTextForHI"
], check=True)
subprocess.run(
[
executable,
"/Convert", self.path, "srt",
"/overwrite",
"/RemoveTextForHI"
],
check=True,
stdout=subprocess.DEVNULL
)
# Remove UTF-8 Byte Order Marks
self.path.write_text(
self.path.read_text(encoding="utf-8-sig"),