Log in

View Full Version : AssFilterMod - DirectShow subtitle renderer (v0.4)


Pages : 1 2 [3] 4 5

huhn
21st November 2016, 00:10
well how about xy subfilter?

Blitzker
21st November 2016, 00:49
well how about xy subfilter?

It would be a lot of work to take what i need from xy-subfilter. If i ever do that, it sure won't be soon.

Blitzker
23rd November 2016, 03:26
Hello,

Fixed a few bugs:


More robust SRT parser. Still not perfect but shouldn't freeze anymore.
Now load fonts imbeded in ASS subtitle files.
Ordered chapters are now displayed correctly.
AssFilterMod and AssFilterModAutoLoad are no longer both present at the same time in the filter list.


The test version is in mediafire as usual (assfiltermod_harfbuzz_x4_x32 or assfiltermod_harfbuzz_x4_x64).

Unless a major bug is found, this is the last test version until i release version 0.3.

Thanks!

Volfield
23rd November 2016, 07:05
Hello,

Fixed a few bugs:


More robust SRT parser. Still not perfect but shouldn't freeze anymore.
Now load fonts imbeded in ASS subtitle files.
Ordered chapters are now displayed correctly.
AssFilterMod and AssFilterModAutoLoad are no longer both present at the same time in the filter list.


The test version is in mediafire as usual (assfiltermod_harfbuzz_x4_x32 or assfiltermod_harfbuzz_x4_x64).

Unless a major bug is found, this is the last test version until i release version 0.3.

Thanks!

Polish native letters in srt don't display properly when i use assfiltermod (possible bad code page). Ordered chapters works fine now thanks.

amayra
23rd November 2016, 07:09
Hello,

Fixed a few bugs:


More robust SRT parser. Still not perfect but shouldn't freeze anymore.
Now load fonts imbeded in ASS subtitle files.
Ordered chapters are now displayed correctly.
AssFilterMod and AssFilterModAutoLoad are no longer both present at the same time in the filter list.


The test version is in mediafire as usual (assfiltermod_harfbuzz_x4_x32 or assfiltermod_harfbuzz_x4_x64).

Unless a major bug is found, this is the last test version until i release version 0.3.

Thanks!

work like charm thanks for your hard work and time :goodpost:

rock
23rd November 2016, 08:37
Issues reported looks ok now, thanks. Looks like something flicker when access properties from filter list in windowed mode.

Blitzker
24th November 2016, 03:08
Polish native letters in srt don't display properly when i use assfiltermod (possible bad code page). Ordered chapters works fine now thanks.

Ah, i guess i can't expect that all subtitles are ANSI or UTF-8...lol Can you share the subtitle file plz? I'll see what i can do.

work like charm thanks for your hard work and time :goodpost:

:)

Issues reported looks ok now, thanks. Looks like something flicker when access properties from filter list in windowed mode.

Are you perhaps on Win7 with aero disabled? That is what happened when i tested it myself.

rock
24th November 2016, 05:46
Are you perhaps on Win7 with aero disabled? That is what happened when i tested it myself.
I'm using Windows 8.1 with AeroGlass installed.

Volfield
24th November 2016, 17:46
Ah, i guess i can't expect that all subtitles are ANSI or UTF-8...lol Can you share the subtitle file plz? I'll see what i can do.

https://www.sendspace.com/file/3d68gv

Blitzker
25th November 2016, 06:53
I'm using Windows 8.1 with AeroGlass installed.

I can't replicate this on my Windows 8.1 partition.

Polish native letters in srt don't display properly when i use assfiltermod (possible bad code page).

Ok, i came up with something. This is gonna need a bit of testing though and it only works with external subs.

Here is what happen now with external SRT subtitles:


If the subtitle file is named ex: "subfile.pl.srt", the Polish windows codepage is used to convert the subtitle file to UTF-8 (No conversion if the file is detected as UTF-8). Most of ISO-639 2 letters language codes are supported.

If the subtitle file is named ex: "subfile.srt", the locale system windows codepage is used to convert the subtitle file to UTF-8 (No conversion if the file is detected as UTF-8)


I tested a couple of different language subtitles and they seem to work.

assfiltermod test version:

http://www.mediafire.com/file/0oa1m49iyu5a6bg/assfiltermod_cp_test_x32.zip
http://www.mediafire.com/file/u3zwatvp62nevum/assfiltermod_cp_test_x64.zip

Thanks for testing!

Volfield
25th November 2016, 19:07
Ok, i came up with something. This is gonna need a bit of testing though and it only works with external subs.

Here is what happen now with external SRT subtitles:


If the subtitle file is named ex: "subfile.pl.srt", the Polish windows codepage is used to convert the subtitle file to UTF-8 (No conversion if the file is detected as UTF-8). Most of ISO-639 2 letters language codes are supported.

If the subtitle file is named ex: "subfile.srt", the locale system windows codepage is used to convert the subtitle file to UTF-8 (No conversion if the file is detected as UTF-8)



I tested a couple of different language subtitles and they seem to work.

assfiltermod test version:

http://www.mediafire.com/file/0oa1m49iyu5a6bg/assfiltermod_cp_test_x32.zip
http://www.mediafire.com/file/u3zwatvp62nevum/assfiltermod_cp_test_x64.zip

Thanks for testing!

Test some files and it work so far :D. Another problem. I have mkv file with eng subs and external srt file with polish subs. Assfilter mod load only eng file (can't choose polish subs from sobtitle menu).

EDIT. There is problem with font size in srt subs. In MPCHC internal i select size 22. In assfiltermod i heva set size over 48 to have the same visual size.

Blitzker
25th November 2016, 20:27
Test some files and it work so far :D. Another problem. I have mkv file with eng subs and external srt file with polish subs. Assfilter mod load only eng file (can't choose polish subs from sobtitle menu).

EDIT. There is problem with font size in srt subs. In MPCHC internal i select size 22. In assfiltermod i heva set size over 48 to have the same visual size.

Glad that the codepage conversion works (for now)!

At the moment, assfiltermod don't support loading external subs when there is embeded subs in mkv. This is something i plan to support in a future version.

As for the font size, yeah, i thought it would eventually be brought up. I'll try to scale the values down to match thoses of vsfilter.

amayra
25th November 2016, 21:13
At the moment, assfiltermod don't support loading external subs when there is embeded subs in mkv. This is something i plan to support in a future version.

i well like this option i usually use different sub or do some typesetting
and this make problem for lazy people like me + "i hate new mkvtoolnix gui"

lion09503
26th November 2016, 12:29
I found a bug. mpc-hc crashes at opening the file whenever it tries to load an external ass sub file. It only happens when assfiltermod is set as the renderer. It works fine with xysubfilter.

Plastic
1st December 2016, 06:59
I get this error when opening files with vobsubs wth MadVR. Zugriffsverletzung bei Adresse $7ffb14a370c6 in Modul 'assfiltermod.dll'. Lesen von Adresse $70

Also having issues with timing on this. https://subscene.com/subtitles/macross-plus-movie-edition/english/1421112

sneaker_ger
1st December 2016, 09:56
I get this error when opening files with vobsubs wth MadVR. Zugriffsverletzung bei Adresse $7ffb14a370c6 in Modul 'assfiltermod.dll'. Lesen von Adresse $70
AssFilterMod does not support vobsubs. Try a different subtitle filter like XySubFilter.

Also having issues with timing on this. https://subscene.com/subtitles/macross-plus-movie-edition/english/1421112
There are three subtitle files in there, 2 hours each. Do you expect people to watch 6 hours of subtitles till they see your problem? Be more specific! There isn't even any audio or video to compare timings to...
But again: try XySubFilter.

Basically always also try XySubFilter instead of AssFilterMod and EVR-CP instead of madvr to find the filter responsible.

rock
18th December 2016, 16:05
font size tag doesn't work. I use assfiltermod_harfbuzz_x4_x64. sub (https://subscene.com/subtitles/detective-conan-the-darkest-nightmare-720p-korean-ver-japanese-dub/indonesian/1435120), between 00:15:00 to 00:16:00, some can be found there.

Blitzker
22nd December 2016, 02:55
I found a bug. mpc-hc crashes at opening the file whenever it tries to load an external ass sub file. It only happens when assfiltermod is set as the renderer. It works fine with xysubfilter.

Can you plz give more details? External ass sub files works for me.

I get this error when opening files with vobsubs wth MadVR. Zugriffsverletzung bei Adresse $7ffb14a370c6 in Modul 'assfiltermod.dll'. Lesen von Adresse $70

Also having issues with timing on this. https://subscene.com/subtitles/macross-plus-movie-edition/english/1421112

Of course vobsubs are not displayed but it shouldn't crash. I will gather more samples to test this.

font size tag doesn't work. I use assfiltermod_harfbuzz_x4_x64. sub (https://subscene.com/subtitles/detective-conan-the-darkest-nightmare-720p-korean-ver-japanese-dub/indonesian/1435120), between 00:15:00 to 00:16:00, some can be found there.

Font size is not yet supported. I'll eventually implement it when i update the parser code.

Sorry about the late answers, i've been very busy and will probably be for at least the next month too. I'll try to find time to fix some bugs in the meantime.

Thanks

Liandri
17th January 2017, 23:17
I'd really like to make it work with PotPlayer. It shows up in the filters list and even shows that subtitle is loaded on Status tab, yet I don't see any subtitles on video. I'm using LAV Video/Splitter. Any help?

Blitzker
24th January 2017, 21:42
I'd really like to make it work with PotPlayer. It shows up in the filters list and even shows that subtitle is loaded on Status tab, yet I don't see any subtitles on video. I'm using LAV Video/Splitter. Any help?

I never tried PotPlayer but it should work if you use madvr as the video renderer. If you use any other video renderer, they need to support the SubRenderIntf interfaces (To my knowledge, only MPC-HC support them in their video renderers).

CCat
30th January 2017, 20:55
Hi, I found a bit of an odd bug or compatibility problem (using assfiltermod_harfbuzz_x4_x64).

When you have two texts with the same start time VSFilter seems to always render them in the order they appear in the ASS script, so if the latter one is positioned (via \pos) over the other, it will show on top. This behavior is sometimes used for signs, even when it would be more "safe" to use layers instead.

AssFilterMod doesn't seem to render in this order when loading from a MKV container. However, when the ASS file is auto-loaded or when you drag and drop the ASS file onto MPC, it will render correctly.
So maybe this is more of a loading than a rendering issue?

I can confirm that libass in Aegisub and ffmpeg renders correctly, so it seems to be an AssFilterMod issue.

Here's a test sub file https://www.sendspace.com/file/ss1bac. It should render "ABCD" in order on top another, but actually renders "BCDA". It seems it's always only to be first subtitle (the "A") which isn't in order (gets rendered last).

Thanks and keep up the great work!

god_md5
6th February 2017, 16:25
is need !

Visual C++ Redistributable for Visual Studio 2015
https://www.microsoft.com/en-us/download/details.aspx?id=48145

CCat
8th February 2017, 01:01
is need !

Visual C++ Redistributable for Visual Studio 2015
https://www.microsoft.com/en-us/download/details.aspx?id=48145

If that was directed at me, I already have installed the newest version (which is update 3, x86 14.0.24212 and x64 14.0.24215). I tried completely reinstalling my codec pack (K-Lite) and re-regging assfiltermod.dll - No change.

It's just odd that it works correctly one way (through auto-loading or drag&drop) but not the other way (when muxed).

So I'm guessing this has something to do with the auto-loading filter vs the normal filter. One thing I noticed in my filter list is that AssFilterMod(AutoLoad) shows up before madVR but AssFilterMod shows up after madVR. In theory this shouldn't make a difference because madVR doesn't handle subs, so the filter graph should be the same.

But since it's a possible lead I tried uninstalling everything again and setting up everything manually: Installing MPC-HC, LAV Filters, AssFilterMod and madVR, disabling all internal filters, setting the audio/video renderer to "Null" and setting up the external filters in the correct order, and... still no change, auto-loading subs work, muxed subs don't render correctly.

Alright, I just tested several other versions. All versions up to assfiltermod_harfbuzz_x3_x64 render muxed subs correctly, it first breaks in harfbuzz_x4. The interesting thing is that harfbuzz_x3 already has auto-loading, so something must have went wrong down the line. Maybe it's related one of those two bugfixes in harfbuzz_x4:

"AssFilterMod and AssFilterModAutoLoad are no longer both present at the same time in the filter list."
"Ordered chapters are now displayed correctly." <-- "display" as in rendering? As in rendering order? Sounds like a candidate!

This is all the detective work I can do, good look, Blitzker! I'll be using version harfbuzz_x3 in the meantime.

Blitzker
9th February 2017, 23:04
It's just odd that it works correctly one way (through auto-loading or drag&drop) but not the other way (when muxed).

So I'm guessing this has something to do with the auto-loading filter vs the normal filter. One thing I noticed in my filter list is that AssFilterMod(AutoLoad) shows up before madVR but AssFilterMod shows up after madVR. In theory this shouldn't make a difference because madVR doesn't handle subs, so the filter graph should be the same.

But since it's a possible lead I tried uninstalling everything again and setting up everything manually: Installing MPC-HC, LAV Filters, AssFilterMod and madVR, disabling all internal filters, setting the audio/video renderer to "Null" and setting up the external filters in the correct order, and... still no change, auto-loading subs work, muxed subs don't render correctly.

Alright, I just tested several other versions. All versions up to assfiltermod_harfbuzz_x3_x64 render muxed subs correctly, it first breaks in harfbuzz_x4. The interesting thing is that harfbuzz_x3 already has auto-loading, so something must have went wrong down the line. Maybe it's related one of those two bugfixes in harfbuzz_x4:

"AssFilterMod and AssFilterModAutoLoad are no longer both present at the same time in the filter list."
"Ordered chapters are now displayed correctly." <-- "display" as in rendering? As in rendering order? Sounds like a candidate!

This is all the detective work I can do, good look, Blitzker! I'll be using version harfbuzz_x3 in the meantime.

Yes, indeed it was a bug introduced when i tried to make subtitles work correctly with ordered chapters. I already fixed it on my side and should release an update in the next few days.
Thanks for the extensive testing!

Blitzker
13th February 2017, 22:42
AssFilterMod version 0.3 is out: https://github.com/Blitzker/assfiltermod/releases


- add: Reset Settings button
- add: Auto-load of external subtitles
- add: Better SRT subtitles parser
- fix: Blur setting not working
- Values in the settings are now more in line with thoses of VSFilter


I highly recommend to delete the registry key HKEY_CURRENT_USER\Software\AssFilter because many of the SRT settings have changed to make them similar to VSFilter.

Also, there is 3 hidden settings in the registry that the user can manually change that affect the rendering of the SRT subtitles:

SrtResX: Change the rendering X resolution of the subtitles (Default: 1920)
SrtResY: Change the rendering Y resolution of the subtitles (Default: 1080)
ScaledBorderAndShadow: Change how the outline and shadow is rendered. 0=No, 1=Yes (Default: 1)

Another thing to note is that this release don't yet include Harfbuzz but should be soon since i found projects (ShiftMediaProject) that already support VS2015.

clsid
14th February 2017, 16:24
Now you just need to copy the VobSub/PGS code from MPC-HC to make it feature complete ;)

Blitzker
17th February 2017, 03:51
Now you just need to copy the VobSub/PGS code from MPC-HC to make it feature complete ;)

lol, yeah. I guess its one of the next steps. Would be nice if there was a library like libass that support Vobsub and PGS so i wouldn't have to mess around with the VSFilter code. :devil:

clsid
17th February 2017, 16:00
Luckily it is not a huge amount of code.

You can also use FFmpeg code as a second opinion.
http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/pgssubdec.c

CCat
18th February 2017, 16:04
I'll join the "we need VobSubs/PGS" train, currently the filter breaks when video files load them by default (at least when it's PGS, switching to ASS afterwards doesn't work).
LAV Splitter has the default option "Enable Automatic Forced Subtitle Stream" which breaks the filter even when there are no subs marked as default or forced (as long as there is at least one PGS).
It's not a huge deal, but a bit inconvenient.

Question about 0.3:
add: Auto-load of external subtitles
This still only loads external subs when there are no internal ones, right? That's still one of the bigger inconveniences.

I also have a question regarding harfbuzz.
By default it supports ligatures (https://en.wikipedia.org/wiki/Typographic_ligature) which basically are combination glyphs for multiple letters, here's an example of what I'm talking about:
https://upload.wikimedia.org/wikipedia/commons/f/f3/Ligature_drawing.svg
As long as the font defines ligature substitutions, harfbuzz will use them.
Personally I see them more like an anti-feature, because most substitutions look plain ugly ("fl" often looks like a bad "A", "fi" like a bad "h") and they can even break typesetting because they typically have a smaller size.
Needless to say VSFilter never supported them, so it could be seen as an incompatibility, at least for, say, English scripts.
I'm not sure how many scripts actually benefit from ligatures, well, with the one big exception for Arabic ones.

Afaik harfbuzz has an option to disable/enable them on the fly, it should work something like this:
hb_feature_t feat;
hb_feature_from_string("'liga' off", -1, &feat);
then use "feat" in your hb_shape() call.

So question is: Will you (sometime in the far far future) consider putting an option to disable them?
Maybe even have some kind of blacklist/whitelist working with language codes (if that's even possible)?

Cheers

amayra
18th February 2017, 19:48
As long as the font defines ligature substitutions, harfbuzz will use them.
Personally I see them more like an anti-feature, because most substitutions look plain ugly ("fl" often looks like a bad "A", "fi" like a bad "h") and they can even break typesetting because they typically have a smaller size.
Needless to say VSFilter never supported them, so it could be seen as an incompatibility, at least for, say, English scripts.
I'm not sure how many scripts actually benefit from ligatures, well, with the one big exception for Arabic ones.
we don't need ligature at all in arabic , and as one of fansubs team "typesetting" people well balme me for Eye Cancer if i use ligature

CCat
19th February 2017, 19:18
we don't need ligature at all in arabic , and as one of fansubs team "typesetting" people well balme me for Eye Cancer if i use ligature
I got the impression they are important in Arabic because when I read about font shaping, they always use Arabic as the flagship example of ligatures, but that's probably because it has ligatures for more than just two characters, not necessarily because they are used much in that language, I take?

I'm sure people wouldn't find them ugly if they would actually be used in everyday text. Personally I've never seen them used before (maybe except "æ"), I didn't even know they existed (especially those "fi" and "fl" ones) and initially even thought that it was some kind of bug. Even after trying to get used to them I still want my i-dot back.

For a subtitle renderer it's probably best to disable ligature substitutions by default because a script can always decide to use them manually if they just use the according codepoint. Automatic substitutions might do more harm than good.
Probably.

amayra
19th February 2017, 23:28
For a subtitle renderer it's probably best to disable ligature substitutions by default because a script can always decide to use them manually if they just use the according codepoint. Automatic substitutions might do more harm than good.
Probably.
i agree with you, what is look more like utf8/Unicode issues better to disable it for good

Dulus_No
20th February 2017, 10:03
In version 0.3 I can't see ligatures. In harfbuzz_x4 it works.
Would be there an option to enable kerning for SRT?
I agree about disabling by default ligatures for ASS.
But for SRT with kerning option it would look better.

amayra
20th February 2017, 10:51
In version 0.3 I can't see ligatures. In harfbuzz_x4 it works.
Would be there an option to enable kerning for SRT?
I agree about disabling by default ligatures for ASS.
But for SRT with kerning option it would look better.

AssFilterMod 0.3 does not include Harfbuzz

Blitzker
27th February 2017, 02:50
I'll join the "we need VobSubs/PGS" train, currently the filter breaks when video files load them by default (at least when it's PGS, switching to ASS afterwards doesn't work).
LAV Splitter has the default option "Enable Automatic Forced Subtitle Stream" which breaks the filter even when there are no subs marked as default or forced (as long as there is at least one PGS).
It's not a huge deal, but a bit inconvenient.

I'll look into this. Only did a few tests with PGS/Vobsub subs and i haven't covered all cases for sure.


This still only loads external subs when there are no internal ones, right? That's still one of the bigger inconveniences.

Yes, but its pretty much on top of my to-do list.


I also have a question regarding harfbuzz.
By default it supports ligatures (https://en.wikipedia.org/wiki/Typographic_ligature) which basically are combination glyphs for multiple letters, here's an example of what I'm talking about:
https://upload.wikimedia.org/wikipedia/commons/f/f3/Ligature_drawing.svg
As long as the font defines ligature substitutions, harfbuzz will use them.
Personally I see them more like an anti-feature, because most substitutions look plain ugly ("fl" often looks like a bad "A", "fi" like a bad "h") and they can even break typesetting because they typically have a smaller size.
Needless to say VSFilter never supported them, so it could be seen as an incompatibility, at least for, say, English scripts.
I'm not sure how many scripts actually benefit from ligatures, well, with the one big exception for Arabic ones.

Afaik harfbuzz has an option to disable/enable them on the fly, it should work something like this:
hb_feature_t feat;
hb_feature_from_string("'liga' off", -1, &feat);
then use "feat" in your hb_shape() call.

So question is: Will you (sometime in the far far future) consider putting an option to disable them?
Maybe even have some kind of blacklist/whitelist working with language codes (if that's even possible)?

True, builds that use harfbuzz have ligature enabled by default and i can see why not everyone would like this feature. That's pretty much why i hesitated to include it sooner and now that you bring this up, i will put this on my to-do list to see how i can implement an option to enable it. In the meantime, i will most likely offer 2 builds. One with harfbuzz and one without.

Jtacdf
3rd March 2017, 00:31
I have a problematic file where the karaoke fx does not fill properly and flickers with version 0.3.
https://mega.nz/#!0lZyybgK!QT1KPaWx2sj5WUmJ_YRLOaEIKJ6LpE9Vb7L39JiSN2g

CCat
6th March 2017, 16:48
I have a problematic file where the karaoke fx does not fill properly and flickers with version 0.3.
https://mega.nz/#!0lZyybgK!QT1KPaWx2sj5WUmJ_YRLOaEIKJ6LpE9Vb7L39JiSN2g

That flickers in xy-VSFilter and libass, but not in VSFilter. Most notably it flickers in Aegisub (newer versions at least), MPV and ffmpeg (using "ass" video filter). It can flicker in AviSynth and MPC depending on configuration.

I've isolated the problem. This code
{\t(260,620,\alpha&F00&)}me
"flickers", or rather it goes from fully transparent to opaque three times instead of from half-transparent (which it starts out due to the font style) to opaque once like you'd expect it to.

The problem is the invalid color code "&F00&", which should read "&H00&" ('H' stands for hexadecimal and there is no documented alternative for it, so 'F' makes no sense). If you substitute it, it works exactly like it should in all filters.

So yeah, since it's undocumented and not even xy-VSFilter gets it "right", it's probably a bad idea to "fix" libass (and AssFilterMod for that matter). The only true fix is to search & replace "&F00&" with "&H00&" in the subtitle files.

CCat
6th March 2017, 18:20
While comparing shots from the video above I also noticed another odd thing relating to the harfbuzz version. For some reason it likes to render dots which neither appear in version 0.3 nor in (xy-)VSFilter.

Comparison: VSFilter (https://i.imgur.com/CxF3TS8.png) vs AssFilterMod harfbuzz (https://i.imgur.com/wAGWwU8.png) edit: This might actually be xy-VSFilter, not VSFilter.

It might just be the font, maybe it has shapes with volume 0 which still get shaped by harfbuzz and are then given a red border, hence red dots. Haven't confirmed this, though.
...
Alright, I needed to know, here's the verdict (https://i.imgur.com/sDVrbGb.png).

So harfbuzz is as correct as you'd expect. Question is if it's "wrong" to apply a border to a point. It's at least less VSFilter compatible.

This is also pretty interesting: VSFilter (https://i.imgur.com/e5RSubW.png) vs xy-VSFilter (https://i.imgur.com/YQbmq9B.png) vs AssFilterMod harfbuzz (https://i.imgur.com/XVLikZZ.png)

VSFilter doesn't seem to care much for spacing in this case, but xy-VSFilter does. There really is no filter which isn't broken in at least one way.

amayra
6th March 2017, 22:15
VSFilter doesn't seem to care much for spacing in this case, but xy-VSFilter does. There really is no filter which isn't broken in at least one way.

VSFilter is more than dead there no need to test or comparing using it
and how about XySubFilter ?

Jtacdf
7th March 2017, 12:15
That flickers in xy-VSFilter and libass, but not in VSFilter. Most notably it flickers in Aegisub (newer versions at least), MPV and ffmpeg (using "ass" video filter). It can flicker in AviSynth and MPC depending on configuration.

I've isolated the problem. This code
{\t(260,620,\alpha&F00&)}me
"flickers", or rather it goes from fully transparent to opaque three times instead of from half-transparent (which it starts out due to the font style) to opaque once like you'd expect it to.

The problem is the invalid color code "&F00&", which should read "&H00&" ('H' stands for hexadecimal and there is no documented alternative for it, so 'F' makes no sense). If you substitute it, it works exactly like it should in all filters.

So yeah, since it's undocumented and not even xy-VSFilter gets it "right", it's probably a bad idea to "fix" libass (and AssFilterMod for that matter). The only true fix is to search & replace "&F00&" with "&H00&" in the subtitle files.

That is pretty interesting. I failed to mention that the video posted does not "flicker" with xy-subfilter x64 and mpc-hc/be internal sub renderer. It's why I posted it as a possible issue. Not a really big issue though since it's the only fx seen thus far that has problem with AssFilterMod.

CCat
7th March 2017, 12:59
VSFilter is more than dead there no need to test or comparing using it
and how about XySubFilter ?

Well, VSFilter is supposed to be the standard definition of what an ASS filter is and what ASS features should or shouldn't be supported, at least kind of. Back in the days Aegisub, MPC and libass developers got together to reach the "decision" (http://blog.aegisub.org/2010/02/old-and-present-vsfilter.html) to never extend ASS anymore.
In practice this doesn't quite hold, looking for example at the \blur2+, \fax, \fay tags, those are as common as always and then there are the obvious resolution hacks in XySubFilter and AssFilterMod, things which are just too good to not have.

Still, both xy-VSFilter and libass aim to be VSFilter compatible and xy-VSFilter is so close, you could consider it standard.

Can't say much about XySubFilter, I've tested it once and had problems with subs not being properly placed in some videos but not in others. It's weird, the filter seemed to believe the video is larger than it actually is and there were no shenanigans going on with aspect ratio or script resolution, just a 720p video with a 720p script that doesn't get placed right, except when you use \pos, that somehow fixes the issue. So yeah, I don't use XySubFilter for that reason, development also seems to have stopped.

Just for the sake of it and not being completely offtopic, I tested XySubFilter on the above video. It doesn't flicker and it looks identical to the fixed script in xy-VSFilter (well, except for the resolution).
edit: Oops, Jtacdf snuck in while I wrote my response, at least it's confirmed now.

huhn
7th March 2017, 13:51
you should compare it to build-in subtitle filter from MPC-BE and MPC-HC they are still development.

amayra
7th March 2017, 14:36
xy-VSFilter 3.0.0.306
@Cyberbeing Cyberbeing released this on Dec 6, 2014
XySubFilter 3.1.0.746 BETA3
@Cyberbeing Cyberbeing released this on Oct 16, 2015
that why i suggest you to try it and as huhn said test ISR in mpc hc/be
ps : i am a little curious about results

clsid
7th March 2017, 14:58
you should compare it to build-in subtitle filter from MPC-BE and MPC-HC they are still development.
VSFilter is part of those projects and shares all parsing and rendering code with ISR. Only the moment and method of merging subs with video is different between ISR and VSFilter.

huhn
7th March 2017, 15:06
i now it is vsfilter based but i know that kasper has increased the performance (and other things) of the ISR by quite a lot.

the performance of the ISR renderer got pretty close to xy subfilter.

amayra
7th March 2017, 16:42
VSFilter is part of those projects and shares all parsing and rendering code with ISR. Only the moment and method of merging subs with video is different between ISR and VSFilter.

i try to fix some memory issues in VSFilter but i end up with reading a masterpiece of spaghetti code and useless/old stuff in it
so i think ISR have decent code compare it to VSFilter

CCat
8th March 2017, 10:15
you should compare it to build-in subtitle filter from MPC-BE and MPC-HC they are still development.
that why i suggest you to try it and as huhn said test ISR in mpc hc/be
ps : i am a little curious about results
Is this still about the "flicker bug" (that's not actually a bug), or what do you mean by "compare", "test" and "results"? If you just want screenshot comparisons, you should look up the first few pages of this thread.
But just to let you know, the "VSFilter" screenshots are actually from ISR, directly out of MPC-HE and I did also test this 2008 version of VSFilter (https://www.videohelp.com/software/VSFilter-DirectVobSub) through AviSynth, same results, both don't flicker, but as clsid already said, this should not surprise, as ISR practically is VSFilter and that's also why I called it that.

Also, amayra, if you are so curious, why not open the player yourself, it's really not that hard.

P.S. Sorry for derailing the thread, this really isn't about AssFilterMod anymore.

huhn
8th March 2017, 10:35
what do you mean with MPC-HE? BE or HC

and more important is if the spacing is correct or not.
if this was the newest MPC-HC i will ask kasper about this if the bigger spacing is correct.

amayra
8th March 2017, 14:19
Also, amayra, if you are so curious, why not open the player yourself, it's really not that hard.

i've made more test than you can count but I can't reproduce the problem so if you went to be kind give ASS file not your suggestions
and there one more think i made improved fork of AssFilterMod and i would try to fix your problem before i send my Pull requests

Blitzker
8th March 2017, 19:33
That flickers in xy-VSFilter and libass, but not in VSFilter. Most notably it flickers in Aegisub (newer versions at least), MPV and ffmpeg (using "ass" video filter). It can flicker in AviSynth and MPC depending on configuration.

I've isolated the problem. This code
{\t(260,620,\alpha&F00&)}me
"flickers", or rather it goes from fully transparent to opaque three times instead of from half-transparent (which it starts out due to the font style) to opaque once like you'd expect it to.

The problem is the invalid color code "&F00&", which should read "&H00&" ('H' stands for hexadecimal and there is no documented alternative for it, so 'F' makes no sense). If you substitute it, it works exactly like it should in all filters.

So yeah, since it's undocumented and not even xy-VSFilter gets it "right", it's probably a bad idea to "fix" libass (and AssFilterMod for that matter). The only true fix is to search & replace "&F00&" with "&H00&" in the subtitle files.

Nice work looking into this issue. I checked every builds that were released and this problem was there so its good to know that its related to libass.

While comparing shots from the video above I also noticed another odd thing relating to the harfbuzz version. For some reason it likes to render dots which neither appear in version 0.3 nor in (xy-)VSFilter.

Comparison: VSFilter (https://i.imgur.com/CxF3TS8.png) vs AssFilterMod harfbuzz (https://i.imgur.com/wAGWwU8.png)

It might just be the font, maybe it has shapes with volume 0 which still get shaped by harfbuzz and are then given a red border, hence red dots. Haven't confirmed this, though.
...
Alright, I needed to know, here's the verdict (https://i.imgur.com/sDVrbGb.png).

So harfbuzz is as correct as you'd expect. Question is if it's "wrong" to apply a border to a point. It's at least less VSFilter compatible.

This is also pretty interesting: VSFilter (https://i.imgur.com/e5RSubW.png) vs xy-VSFilter (https://i.imgur.com/YQbmq9B.png) vs AssFilterMod harfbuzz (https://i.imgur.com/XVLikZZ.png)

VSFilter doesn't seem to care much for spacing in this case, but xy-VSFilter does. There really is no filter which isn't broken in at least one way.

Ok, the thing is that i used an experimental build of libass in thoses harfbuzz releases (harfbuzz_x?). This experimental build uses a new stroker that correct issues with some fonts but it seems to introduce unwanted artifacts. The problem is not there with normal builds, even thoses that use harfbuzz (not yet released).

Screenshots of the difference:

Without experimental: https://i.imgur.com/20wSgYv.jpg
With experimental: https://i.imgur.com/iQx9lvV.jpg

i've made more test than you can count lyrics but I can't reproduce the problem so if you went to be kind give ASS file not your suggestions
and there one more think i made improved fork of AssFilterMod and i would try to fix your problem before i send my Pull requests

Pull requests and help with the development are more than welcome!

On a good note, the new nightly version of MPC-HC has added my pull request to add AssFilterMod to the list of subtitles renderer. So i won't update my mpc-hc fork and make builds anymore.