View Full Version : Is ImageFile broken?
asarian
28th December 2024, 17:44
I did the following
import vapoursynth as vs
core = vs.core
core.max_cache_size = 65535
vid = core.lsmas.LibavSMASHSource(r'e:\veai\cutie.mov')
vid = core.resize.Point(vid, format = vs.YUV420P10)
vid = core.std.CropRel (clip=vid, left=0, right=0, top=280, bottom=280)
vid = core.neo_f3kdb.Deband (vid, preset="veryhigh", dither_algo=2)
vid = core.std.AddBorders (clip=vid, left=0, right=0, top=280, bottom=280)
vid = core.sub.ImageFile (clip=vid, file=r'f:\jobs\cutie.sup', blend=True)
vid.set_output ()
After the 3rd subtitle, movie stays on the same subtitle, forever. It must be ImageFile, as I also used an old .sup file for this vid (from a previous render), where ImageFile didn't hang.
Selur
28th December 2024, 18:09
If ImageFile works with other .sup files and just not with your current one, wouldn't that hint that the issue might be with the subtitle file not with ImageFile?
asarian
28th December 2024, 19:31
If ImageFile works with other .sup files and just not with your current one, wouldn't that hint that the issue might be with the subtitle file not with ImageFile?
Not necessarily. :) The .sup is from the blu-ray directy, and I inspected it with Subtile Edit, and contains no anomalies. See:
Subtile Edit (https://1drv.ms/i/c/cc6afe600f85b114/EeYUBE_FKQNCp7j-kgt5Xu0BXqAPSej95nuHkMGDl-XZrQ?e=GHjWWV)
ImageFile starts out fine, but keeps showing sub 7 for ever (without progressing).
asarian
28th December 2024, 20:08
If ImageFile works with other .sup files and just not with your current one, wouldn't that hint that the issue might be with the subtitle file not with ImageFile?
vid = core.sub.TextFile (clip=vid, file=r'f:/jobs/cutie2.srt', blend=True)
And on any srt, I get:
Traceback (most recent call last):
File "src\\cython\\vapoursynth.pyx", line 3387, in vapoursynth._vpy_evaluate
File "src\\cython\\vapoursynth.pyx", line 3388, in vapoursynth._vpy_evaluate
File "", line 15, in
File "src\\cython\\vapoursynth.pyx", line 3123, in vapoursynth.Function.__call__
vapoursynth.Error: TextFile: unable to parse input file
Selur
28th December 2024, 20:56
Can't reproduce the problems, with any of the subtitles I have here.
You probably will have to share:
a. details about your setup
b. your whole script
c. the subtitle files
if you want others to reproduce the problem. (tried multiple srt and sup files)
Cu Selur
asarian
28th December 2024, 22:20
Can't reproduce the problems, with any of the subtitles I have here.
You probably will have to share:
a. details about your setup
b. your whole script
c. the subtitle files
if you want others to reproduce the problem. (tried multiple srt and sup files)
Cu Selur
Very, very strange. I do appreciate your willingness to help. though. Tried several different movies, all the same result: subtitle hangs at sub 7. Here is already the.sup in question:
https://1drv.ms/u/c/cc6afe600f85b114/EbKeSHX8edVNstmcLO1B2M8BtXDZ5aaUGJoRwbIwSg97pQ?e=z3VhSn
Processed with
vid = core.sub.ImageFile (vid, file=r'g:\jobs\cutie.sup', blend=True)
EDIT:
I use VS R70, with the following test script:
import vapoursynth as vs
core = vs.core
core.max_cache_size = 65535
vid = core.dgdecodenv.DGSource (r'c:\jobs\austin2.dgi')
vid = core.resize.Point(vid, format = vs.YUV420P10)
vid = core.neo_f3kdb.Deband (vid, preset="veryhigh", dither_algo=2)
vid = core.sub.ImageFile (vid, file=r'g:\jobs\cutie.sup', blend=True)
vid.set_output ()
It's for an unrelated Austin Powers movie, but that's the point: it happens with every movie.
N.B. The subtitle hangs at sub 7 (both in VSEdit, as well as when encoding in x265).
asarian
29th December 2024, 03:07
Last comment: sub 7 remains active for 32768 frames (yes, exactly 32k frames). Broken beyond my ability to repair, it seems.
EDIT: Even something as inocuous as this makes VS balk:
vid = core.sub.TextFile (clip=vid, file=r'c:/jobs/cutie.srt', blend=True)
File "src\\cython\\vapoursynth.pyx", line 3123, in vapoursynth.Function.__call__
vapoursynth.Error: TextFile: unable to parse input file
Something is really screwy in VS sub-land.
Z2697
29th December 2024, 06:16
Are you using the latest version of the subtext filter?
I imagine if you upgraded from a old version with built-in (bundled) subtext filter (they were, right? Or am I creating false memories) you are using an outdated version without knowing that it's now not bundled.
asarian
29th December 2024, 06:26
Are you using the latest version of the subtext filter?
I imagine if you upgraded from a old version with built-in (bundled) subtext filter (they were, right? Or am I creating false memories) you are using an outdated version without knowing that it's now not bundled.
That's a good question! :)
core.sub.ImageFile
They're in core.sub (like TextFile), so I assume they're from the base R70 VS install. I searched for ImageFile elsewhere, but found no such plugin or dll.
Are you saying there might be newer version of it?
Z2697
29th December 2024, 06:32
That's a goiod question! :)
core.sub.ImageFile
They're in core.sub (like TextFile), so I assume they're from the base R70 VS install. I searched for ImageFile elsewhere, but found no such plugin or dll.
Are you saying there might be newer version of it?
All bundled plugins are now separated into their own repo and not bundled with installer or portable pack.
https://github.com/vapoursynth/subtext
That being said, I tried both old version (extracted from old portable) and "R5" version, with the SUP file downloaded from your link, the results are both normal.
asarian
29th December 2024, 06:36
That being said, I tried both old version (extracted from old portable) and "R5" version, with the SUP file downloaded from your link, the results are both normal.
And THAT is extremely weird; what VS version are you using?
Thx for the testing, btw. It's very good for me to get this feedback.
Z2697
29th December 2024, 06:50
and that is extremely weird; what vs version are you using?
Thx for the testing, btw. It's very good for me to get this feedback.
r70. :)
(Why does uppercase R become lowercase after I post it)
R70.
R70. :)
asarian
29th December 2024, 07:17
r70. :)
(Why does uppercase R become lowercase after I post it)
R70.
R70. :)
I can only show you where it goes wrong:
where it goes wrong (https://1drv.ms/u/c/cc6afe600f85b114/Ec_C8V6BJepOvKhsXfYxcE8Bp_SiB7m594PmBLHxYtMT3w?e=hh1zrk)
After the last subtitle, it stays on that one for 32768 frames!
asarian
29th December 2024, 07:53
That being said, I tried both old version (extracted from old portable) and "R5" version, with the SUP file downloaded from your link, the results are both normal.
From what old portable pack did you take a dll (ImageFile?) to test with. I'd like to try that out too. Thanks.
Selur
29th December 2024, 09:55
Got no problem with the dlls from https://github.com/vapoursynth/subtext/releases (tried r3 and r5 using Vapoursynth R70)
poisondeathray
29th December 2024, 15:32
Make sure you also test the simplest script, such as blankclip , without other filters like deband, in case there are other contributing causes
asarian
29th December 2024, 16:19
Got no problem with the dlls from https://github.com/vapoursynth/subtext/releases (tried r3 and r5 using Vapoursynth R70)
Holy shit, man, that actually SOLVED it! I added subtext.dll to Plugins, then got a warning:
Warning: Plugin C:\Program Files\VapourSynth\plugins\SubText.dll already loaded (biz.srsfckn.subtext) from C:/Program Files/VapourSynth/plugins/libsubtext.dll
So I renamed libsubtext.dll to libsubtext.tmp, and now the subtitles get past sub 7 again!!
You're a brilliant man! :thanks:
EDIT: I've read somewhere (but forgot where), looking for a solution, that one's version of ffmpeg might be related. Not sure whether it's relevant, but mine is:
ffmpeg version 7.1-full_build-www.gyan.dev Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 14.2.0 (Rev1, Built by MSYS2 project)
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.