subtext
subtext copied to clipboard
Subtitle text not applied for some files
I have some encoded single frame HEVC files I use for testing, and for some reason the text is not being applied to clips from these files.
An example probe: hevc (Rext), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], 60 tbr, 1200k tbn, 60 tbc
Sample file: https://0x0.st/oosf.hevc Reproduceable script:
from vapoursynth import core
clip = core.ffms2.Source("oosf.hevc")
clip = core.resize.Spline36(clip, width=1280, height=720)
clip = core.sub.Subtitle(clip, "my text")
clip.set_output()
The clip has these properties:
VideoNode
Format: YUV420P10
Width: 3840
Height: 2160
Num Frames: 1
FPS: 1200000
I'm on Arch Linux with libass 0.15.2-1
installed.
I tried adjusting the FPS with core.std.AssumeFPS(clip, fpsnum=1, fpsden=1)
and it works like that.
Maybe it should error with invalid FPS source values?
What's invalid fps to you? Any nonzero number is fine
Well it's silently failing with the rate in this example, 1200000. If there's no way to tell an invalid rate, then maybe there's a bug with the default start/end.
I'll just close this as there's a workaround.
Stepped through it and since ass only has a 1/100th second base precision it really does round it to ending when it starts => no display. It truly is an edge case to behold, simple yet broken.