fix(subtitles): sort cues by start time when converting from SSA/ASS

Convert a time-sorted copy of the SSA/ASS source, so that SubtitleEdit and pysubs2 write SRT cues in order. SSA/ASS targets keep the file order.
This commit is contained in:
imSp4rky
2026-10-15 16:39:19 -06:00
parent dedbf00f75
commit 614a8c5ae4
3 changed files with 78 additions and 16 deletions
+5
View File
@@ -247,6 +247,11 @@ unshackle dl --sub-format original EXAMPLE 'https://www.example.com/...'
Conversion only runs when the source format differs from the target, so
`--sub-format srt` on a track that is already SRT is a no-op.
When unshackle converts SSA/ASS to a format that is not SSA/ASS, it writes the cues in
start-time order. SSA/ASS files often list layered sign events out of time order. The
SSA/ASS source file keeps its order, because the order of events on one layer sets the
order in which they are drawn.
!!! warning "Down-converting styled subtitles is lossy"
Converting styled SSA/ASS subtitles to SRT throws away positioning, colours, and
italics. unshackle never does this automatically. It only happens when you