devine-dl / devine

Modular Movie, TV, and Music Archival Software
GNU General Public License v3.0
385 stars 85 forks source link

Add support to convert subtitles to SSA/ASS format #36

Open rlaphoenix opened 1 year ago

rlaphoenix commented 1 year ago

Is your feature request related to a problem? Please describe. The code currently forces non-SSA subtitles to be converted to SRT. However, WebVTT and TTML would really benefit to be converted to SSA to keep style and positioning.

Describe the solution you'd like In the conversion step of the download code, we could replace the usage of pycaption with https://github.com/Paco8/ttml2ssa This allows us to convert all the same formats (except fragmented and maybe segmented subtitles) to SSA.

Describe alternatives you've considered The only alternative solution would be to disable the conversion to SRT and let users do the conversion to SSA themselves post-download.

Additional context The preference for SRT in the code has been long engrained over community support and device compatibility. No one would complain about SRT, but some would complain about SSA.

rlaphoenix commented 1 year ago

Something to note is it could automatically decide to do SRT if there's no style or positioning information, otherwise do SSA, if enabled in the config.