subtext icon indicating copy to clipboard operation
subtext copied to clipboard

Subtitle text not applied for some files

Open quietvoid opened this issue 3 years ago • 4 comments

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.

quietvoid avatar Jan 23 '22 15:01 quietvoid

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?

quietvoid avatar Jan 23 '22 15:01 quietvoid

What's invalid fps to you? Any nonzero number is fine

myrsloik avatar Jan 23 '22 15:01 myrsloik

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.

quietvoid avatar Jan 23 '22 16:01 quietvoid

I'll just close this as there's a workaround.

quietvoid avatar Feb 27 '22 18:02 quietvoid

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.

myrsloik avatar Oct 03 '23 19:10 myrsloik