mirror of
https://cdm-project.com/Download-Tools/devine.git
synced 2025-04-30 00:34:24 +02:00
fix(dl): Automatically convert TTML Subs to WebVTT for MKV support
This commit is contained in:
parent
f23100077e
commit
3bfd96d53c
@ -614,11 +614,14 @@ class dl:
|
|||||||
break
|
break
|
||||||
video_track_n += 1
|
video_track_n += 1
|
||||||
|
|
||||||
if sub_format:
|
with console.status("Converting Subtitles..."):
|
||||||
with console.status(f"Converting Subtitles to {sub_format.name}..."):
|
for subtitle in title.tracks.subtitles:
|
||||||
for subtitle in title.tracks.subtitles:
|
if sub_format:
|
||||||
if subtitle.codec != sub_format:
|
if subtitle.codec != sub_format:
|
||||||
subtitle.convert(sub_format)
|
subtitle.convert(sub_format)
|
||||||
|
elif subtitle.codec == Subtitle.Codec.TimedTextMarkupLang:
|
||||||
|
# MKV does not support TTML, VTT is the next best option
|
||||||
|
subtitle.convert(Subtitle.Codec.WebVTT)
|
||||||
|
|
||||||
with console.status("Checking Subtitles for Fonts..."):
|
with console.status("Checking Subtitles for Fonts..."):
|
||||||
font_names = []
|
font_names = []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user