Log in

View Full Version : Usage of Subtitle


vcmohan
12th September 2015, 11:48
I tried to use Subtitle. My script is for a video ret:
frmt = vs.YUV444P8
subs= core.assvapour.Subtitle(ret, "Accord")
subs[0] = core.resize.Bicubic(subs[0], frmt)
acrd = core.std.MaskedMerge(ret,subs[0], subs[1])
acrd.set_output()
The system goes into tizzy and crashes.
I am on windows 8.1
32 bit version of vapoursynth r26
Am I doing something wrong?

Are_
12th September 2015, 12:18
Yes.

frmt = vs.YUV444P8
subs= core.assvapour.Subtitle(ret, "Accord")
subs[0] = core.resize.Bicubic(subs[0], format=frmt)
subs[1] = core.resize.Bicubic(subs[1], format=frmt)
acrd = core.std.MaskedMerge(ret, subs[0], subs[1])
acrd.set_output()

jackoneill
12th September 2015, 12:53
I tried to use Subtitle. My script is for a video ret:
frmt = vs.YUV444P8
subs= core.assvapour.Subtitle(ret, "Accord")
subs[0] = core.resize.Bicubic(subs[0], frmt)
acrd = core.std.MaskedMerge(ret,subs[0], subs[1])
acrd.set_output()
The system goes into tizzy and crashes.
I am on windows 8.1
32 bit version of vapoursynth r26
Am I doing something wrong?

I don't think you're doing anything wrong. I assume ret is also YUV444P8?

Can you explain what "tizzy" means exactly?

The r27 installer contains a newer assvapour with some bug fixes, though I don't recall any crash bugs.

Finally, if you don't care about Unicode or fancy formatting, text.Text (http://www.vapoursynth.com/doc/functions/text.html) is a more reliable alternative to assvapour.Subtitle.

Are_: subs[1] is GRAY8, which is perfectly fine as a mask for MaskedMerge.


Actually, scratch everything above.

The problem is here:

subs[0] = core.resize.Bicubic(subs[0], frmt)

You're passing vs.YUV444P8 to the "width" parameter. vs.YUV444P8 is an integer constant with the value 3000012. You might have run out of memory (or address space) trying to resize the clip to that width.

This should work:

subs[0] = core.resize.Bicubic(subs[0], format=frmt)

vcmohan
13th September 2015, 07:46
Even the first line it self causes problem
subs= core.assvapour.Subtitle(ret, "Accord").
Tizzy meaning probably endless loop or something which requires me to close program by system.
text.Text looks will work and I will use it. Thanks.

jackoneill
13th September 2015, 17:48
It's possible you just need to wait for fontconfig to build its font cache. Who knows.