feat(stream): burn bitmap (PGS/DVB) subtitles into the video via overlay
Bitmap subs can't be served as WebVTT, so the user picks one and the daemon
re-encodes with it overlaid. HLSSessionConfig.BurnSubtitleIndex (*int, nil=no
burn) flows into the cache key + a -filter_complex graph:
[0✌️0]<vchain>[base];[0:s:N][base]scale2ref[sub][base2];[base2][sub]overlay[vout]
Overlay after the tonemap (SDR subs keep brightness); scale2ref fits the PGS
canvas to the output. Invalid/text/out-of-range index -> clean-encode fallback.
IsTextSubtitle now includes "text" (parity with the web classifier).
This commit is contained in:
parent
8207d1d2a9
commit
665ec0a34f
9 changed files with 196 additions and 49 deletions
|
|
@ -61,7 +61,7 @@ type ProbeSubtitleTrack struct {
|
|||
// without re-rendering. Bitmap subs (PGS, DVB) need burn-in.
|
||||
func (s ProbeSubtitleTrack) IsTextSubtitle() bool {
|
||||
switch s.Codec {
|
||||
case "subrip", "srt", "ass", "ssa", "webvtt", "mov_text":
|
||||
case "subrip", "srt", "ass", "ssa", "webvtt", "mov_text", "text":
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue