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


Blitzker
8th June 2016, 21:45
Hello!

For a while, i searched for an alternative to XySubFilter and when i found AssFilter by alexmarsev, i decided it was what i wanted to use. I had no idea on how to work with Directshow and this was a good learning material. So here it is, my first shot at forking a project and modifying it.

AssFilter is an Open-source DirectShow subtitle renderer based on libass and the SubRenderIntf interfaces. Like the well known XySubFilter, AssFilter don't render the subtitles on the video. It instead communicate directly with the video renderer to send the subtitles. This process allow the video renderer to do what it wants with the subtitles.

Here is some screenshot comparisons between AssFilterMod and XySubFilter:

http://screenshotcomparison.com/comparison/175218
http://screenshotcomparison.com/comparison/175219
http://screenshotcomparison.com/comparison/175220

New features and bug fixes:


Added the Settings and Status tabs
Added support for SRT subtitles
Works with built-in video renderers in MPC-HC
Fix crash when the subtitle track is changed
Use latest versions of libraries
Auto-loading of external subtitles


General Settings:

https://i.imgur.com/VjPng7m.png

Note: Only subfolders of the currently playing media file folder can be used.

SRT Settings:

https://i.imgur.com/uL7vLCE.png

In the Custom Tags edit control, you can enter Ass Tags and customize your SRT subtitles the way you want.

Ex: If you want your subtitles to be BOLD, enter {\b1}.

External Subtitles Font Folder is only used for external subtitles. You can use those fonts for both ASS and SRT subtitles.
Note: The {FILE_DIR} tag can be used to specify the folder of the media file.

Important notes:


All tags that you use in the Customs Tags will overwrite the default settings.
Settings are saved in the registry: HKEY_CURRENT_USER\Software\AssFilter
Only subtitles (ASS and SRT) subtitles are supported.


Requirements:

Visual Studio 2015 Redistributables https://www.microsoft.com/en-us/download/details.aspx?id=53840
Visual Studio 2017 x32 Redistributables https://go.microsoft.com/fwlink/?LinkId=746571
Visual Studio 2017 x64 Redistributables https://go.microsoft.com/fwlink/?LinkId=746572
Windows Vista, 7, 8, 8.1 and 10 (32 and 64 bits)

Changelog


v0.4
- add: System tray icon
- add: Selection of external subtitles in context menu of tray icon
- add: Open settings by left click on the tray icon
- add: Use of fonts in External Subs Fonts folder for SRT subtitles
- add: Libass is built with harfbuzz support
- add: Support of font ligatures
- add: Option to disable auto-load of external subtitles
- fix: Auto-load of subtitles with unicode characters
- fix: Auto-load of SRT subtitles on a different codepage than en_us
- Settings page is now split in two: General Settings and SRT Settings
- Add support for Visual Studio 2017
- Use my fork of libass
- Update libass asm building tools : Now use nasm instead of yasm


Downloads

https://github.com/Blitzker/assfiltermod/releases

Nightlies

https://www.mediafire.com/folder/w1wujgz9cyors/AssFilterMod

nautilus7
8th June 2016, 23:24
Hi, thanks for the filter. Any plans to make an avisynth plugin, something similar to masksub() filter in vsfilter plugin.

amayra
9th June 2016, 14:21
thanks for your hard work and i was thinking about is just time to update this old renderer

Jamaika
9th June 2016, 16:20
Excuse me, I not quite understand. Is it a newer version V5.00 the subtitle ASS with new features?

Blitzker
9th June 2016, 17:36
Hi, thanks for the filter. Any plans to make an avisynth plugin, something similar to masksub() filter in vsfilter plugin.
No, sorry. I don't have any plans to work on a avisynth filter at the moment.

thanks for your hard work and i was thinking about is just time to update this old renderer
:)

Excuse me, I not quite understand. Is it a newer version V5.00 the subtitle ASS with new features?
No, its a DirectShow subtitle filter (like XySubFilter) that you can use with a media player (like MPC-HC, MPC-BE) to display .ASS and .SRT subtitles. But if such a new specification of the ASS format is made available in libass, AssFilterMod will support it.

ashlar42
10th June 2016, 13:56
Hi! Really nice to see some new development on this front (subs filters). A couple of questions:

1) Speedwise how does it compare to XySubFilter?

2) How does it work in relationship with madVR? Is it capable of moving subs in black bars of 2.35:1 content, for instance?

Thanks a lot. :)

lion09503
10th June 2016, 17:56
Hey @Blitkzer

Thanks for the hard work.

I was just wondering about this.

Only subtitles (ASS and SRT) muxed in MKV files are supported.

Does this mean that it does not auto-load subtitles that have the same name as the video file? xy-vsfilter and xysubfilter both support this feature.

I also want to know whether it works together with madvr as @ashlar42 has asked.


EDIT: I'd like to report a bug that I just found. Here's a screenshot of the issue.

http://prntscr.com/bexazz

Filters currently loaded:
- AssFilterMod
- Default DirectSound Device
- madVR
- Audio Switcher
- LAV Video Decoder
- LAV Audio Decoder
- LAV Splitter
- File Source (Async.)

Blitzker
11th June 2016, 02:37
Hi! Really nice to see some new development on this front (subs filters). A couple of questions:

1) Speedwise how does it compare to XySubFilter?

2) How does it work in relationship with madVR? Is it capable of moving subs in black bars of 2.35:1 content, for instance?

Thanks a lot. :)

Hello!

1) Can't really say, but since its based on libass and its still actively developed, there is good chances that its more optimized than XySubFilter. But to be honest, i've yet to find subs that make both of them lag. If you have heavy subs that are making XySubFilter or AssFilterMod lag, let me know!

2) I've implemented basic support for moving SRT subs on my dev pc. There is a build of this version if you want to test it: https://www.mediafire.com/folder/w1wujgz9cyors/AssFilterMod

Hey @Blitkzer

Thanks for the hard work.


:)



Does this mean that it does not auto-load subtitles that have the same name as the video file? xy-vsfilter and xysubfilter both support this feature.

I also want to know whether it works together with madvr as @ashlar42 has asked.



I don't support auto-load yet, but i plan to eventually work on this feature. No ETA though.



EDIT: I'd like to report a bug that I just found. Here's a screenshot of the issue.


Do you happen to have Internal Subtitle Renderer selected in Options -> Output? This is what i get too when its selected and AssFilterMod is used. I've submitted code to mpc-hc to add AssFilter to the renderers available in the combo box so this won't happen if AssFilter is selected. In the meantime, you can just select an (**unavailable**) subtitle renderer in the list and the subs won't double like that.

lion09503
11th June 2016, 02:59
Hello!

1) Can't really say, but since its based on libass and its still actively developed, there is good chances that its more optimized than XySubFilter. But to be honest, i've yet to find subs that make both of them lag. If you have heavy subs that are making XySubFilter or AssFilterMod lag, let me know!

2) I've implemented basic support for moving SRT subs on my dev pc. There is a build of this version if you want to test it: https://www.mediafire.com/folder/w1wujgz9cyors/AssFilterMod



:)



I don't support auto-load yet, but i plan to eventually work on this feature. No ETA though.


Do you happen to have Internal Subtitle Renderer selected in Options -> Output? This is what i get too when its selected and AssFilterMod is used. I've submitted code to mpc-hc to add AssFilter to the renderers available in the combo box so this won't happen if AssFilter is selected. In the meantime, you can just select an (**unavailable**) subtitle renderer in the list and the subs won't double like that.

I see. Thanks for the fast reply. I'll wait until mpc-hc includes it. Might I also suggest raising a ticket to mpc-be?

huhn
11th June 2016, 07:45
madVR is complaining that the subtitle renderer is outdated.
there are some issues with madVR and this subtitle renderer.
but i guess this error should be fixed first.

i guess the SubRenderIntf.h is not up to date.
the newest version is from 2015-10-10.
madshi.net/SubRenderIntf.h

1) Can't really say, but since its based on libass and its still actively developed, there is good chances that its more optimized than XySubFilter. But to be honest, i've yet to find subs that make both of them lag. If you have heavy subs that are making XySubFilter or AssFilterMod lag, let me know!

there should be more than enough that will make them lag.
do you have any way to test these renderer at UHD?

i will provide some samples "later" hopefully this weekend.

Blitzker
11th June 2016, 19:44
madVR is complaining that the subtitle renderer is outdated.
there are some issues with madVR and this subtitle renderer.
but i guess this error should be fixed first.

i guess the SubRenderIntf.h is not up to date.
the newest version is from 2015-10-10.
madshi.net/SubRenderIntf.h

Thanks, this is now fixed. What was weird is that i do use the latest SubRenderIntf.h and that message wasn't there with debug builds.


there should be more than enough that will make them lag.
do you have any way to test these renderer at UHD?

i will provide some samples "later" hopefully this weekend.

Sadly, i don't have access to an UHD screen. Samples would be nice to have so i can do some "stress testing".

Blitzker
11th June 2016, 19:50
I see. Thanks for the fast reply. I'll wait until mpc-hc includes it. Might I also suggest raising a ticket to mpc-be?

I will eventually open a ticket to mpc-be but i first need to fix an issue between its internal matroska splitter and AssFilterMod.

huhn
11th June 2016, 19:53
Sadly, i don't have access to an UHD screen. Samples would be nice to have so i can do some "stress testing".

the problem is more that this renderer is always rendering in the output resolution.

xy subfilter has an option to render at native video resolution.

Blitzker
11th June 2016, 20:20
the problem is more that this renderer is always rendering in the output resolution.

xy subfilter has an option to render at native video resolution.

Yes, i'm aware that there is still much to do. I just started working on this so options like theses will eventually be implemented.

I'm still working on a priority list for features and it would be nice if people state what they think is more important to add first.

huhn
13th June 2016, 03:56
i think most people would be happy with full madVR support for all the subtitle related feature it offers.
and of cause support for all major subtitle formats. DVD subtiles what ever the name is, pgs, ass and srt.

ashlar42
13th June 2016, 10:48
Rendering at output resolution is particularly relevant for me. Seeing 720p quality subs when watching on a 1080 screen is terrible. I can't imagine how bad they must look on a 4k screen.

Thanks for working on this. I wish you all the luck possible on this project.

Blitzker
13th June 2016, 20:05
i think most people would be happy with full madVR support for all the subtitle related feature it offers.
and of cause support for all major subtitle formats. DVD subtiles what ever the name is, pgs, ass and srt.

There is a basic support for movable subtitles (SRT) already implemented but full madVR support is of course the goal.

As for DVD and pgs subtitles, and not sure about that. AssFilterMod is based on libass for the rendering of subtitles and supporting those bitmap formats would
need major work. I won't say no for now but its surely not gonna be soon.

Rendering at output resolution is particularly relevant for me. Seeing 720p quality subs when watching on a 1080 screen is terrible. I can't imagine how bad they must look on a 4k screen.


Yes, the 720p or 1080p subs rendered at 4k can indeed look bad. The problem is that rendering them at 4k require much more processing and can make more complex subtitles lag. Implementing native video resolution would avoid that lag at the cost of reduced quality.


Thanks for working on this. I wish you all the luck possible on this project.

Thanks, its a fun project to work on! :)

Q-the-STORM
13th June 2016, 23:38
Yes, the 720p or 1080p subs rendered at 4k can indeed look bad. The problem is that rendering them at 4k require much more processing and can make more complex subtitles lag. Implementing native video resolution would avoid that lag at the cost of reduced quality.

Just let the user decide...
default on Output resolution with the option to switch to native resolution... though a lot better would be output resolution and custom resolution...

most people have a 1080p screen and probably have enough processing power to always render at 1080p, so most people will be fine with output resolution...

people that have a UHD screen and don't have enough processing power will then have the option to set custom resolution...
you could either let the user set each value themselves, or just make various options... 720p, 1080p, 1440p and 2160p should be the most popular options...

rock
14th June 2016, 12:50
hi, thanks for this project.
Could you add git number to about page for nightly build?
Also, I wish you could put latest dev build link to op so they can be found easily. thanks

Blitzker
15th June 2016, 03:07
hi, thanks for this project.
Could you add git number to about page for nightly build?
Also, I wish you could put latest dev build link to op so they can be found easily. thanks

Done on the latest nightly

ashlar42
15th June 2016, 12:04
you could either let the user set each value themselves, or just make various options... 720p, 1080p, 1440p and 2160p should be the most popular options...
Well, yes. Since we are "dream designing" this, I agree that having the opportunity of independently set a relationship between video resolution and subs resolution would be ideal.

It has the added value of becoming absolutely future-proof.

huhn
15th June 2016, 12:17
and you should know that rendering styled animated ASS subtitles can be so hard that no CPU on the market can handle them.

there are already subtitle that need a fast single thread performance CPU and buffering (EVR can't buffer yet) at 1080p.

amayra
15th June 2016, 21:59
can you update source in github of latest dev builds of AssFilterMod

Blitzker
16th June 2016, 19:18
can you update source in github of latest dev builds of AssFilterMod

The "develop" branch is always up-to-date with my dev local sources.

Blitzker
20th June 2016, 23:19
AssFilterMod version 0.2 is out: https://github.com/Blitzker/assfiltermod/releases

- add: Support(incomplete) for movable subtitles (SRT)
- add: Support for drawing subtitles at custom resolution
- fix: The Apply button now activate when a change is made in Custom Tags
- fix: Random crash when the media player open a file
- fix: "Please update your subtitle renderer" message on madVR
- fix: Badly displayed subtitles with mpc-be internal mkv splitter

rock
21st June 2016, 17:41
hi, I wonder why, changing blur value doesn't look like it give any effect to me. Is it similar with \blur?

Blitzker
22nd June 2016, 20:24
hi, I wonder why, changing blur value doesn't look like it give any effect to me. Is it similar with \blur?

Sorry, this is a bug. Its now fixed. I do use the \blur tag for this setting as this seems to give the best visual effect to me.

thuan
24th June 2016, 10:42
Hi dev, can you implement external subtitle loading? I think it's one of the main feature for a subtitle renderer. I can switch to this completely if we have this feature.

Blitzker
25th June 2016, 20:36
Hi dev, can you implement external subtitle loading? I think it's one of the main feature for a subtitle renderer. I can switch to this completely if we have this feature.

Its on my to-do list but i can't give you an ETA. Will probably work on this over the summer.

Magik Mark
25th June 2016, 23:31
Support for Colored subtitle as well pls

Magik Mark
7th July 2016, 00:50
How do I use this in mpc be?

huhn
7th July 2016, 11:47
options external filters -> add filter "AssFilterMod" -> prefer

Volfield
7th July 2016, 19:20
Possible bug. Can't register dll on my ATOM Z3735F Tablet. Windows 10 X86 10586

huhn
7th July 2016, 20:12
have you tried it as admin?

Volfield
8th July 2016, 04:35
Yes. I also try my old netbook with atom and didn't work either. On i5 laptop and pentium deskop works ok. All machine windows 10 assfilter x86.

amayra
9th July 2016, 09:54
can you add reset bat file or button ?

Blitzker
10th July 2016, 00:52
Yes. I also try my old netbook with atom and didn't work either. On i5 laptop and pentium deskop works ok. All machine windows 10 assfilter x86.

Did you try to open an admin command prompt and manually register the filter? As i don't have Win 10, i can't help you much with this issue. Sorry

can you add reset bat file or button ?

Yes, i will add a reset button.

Volfield
10th July 2016, 15:39
I use same method to XySubfilter and it works. Maybe your renderer use some cpu instructions where there is no in ATOM CPU?

EDIT
According to this : https://support.microsoft.com/en-us/kb/249873 i have this problem:
"The module ""%1"" failed to load.\n\n Make sure the binary is stored at the specified path or debug it to check for problems with the binary or dependent .DLL files.\n\n%2."

Maybe i don't have some dlls required to install?

Blitzker
10th July 2016, 17:43
I use same method to XySubfilter and it works. Maybe your renderer use some cpu instructions where there is no in ATOM CPU?

EDIT
According to this : https://support.microsoft.com/en-us/kb/249873 i have this problem:
"The module ""%1"" failed to load.\n\n Make sure the binary is stored at the specified path or debug it to check for problems with the binary or dependent .DLL files.\n\n%2."

Maybe i don't have some dlls required to install?

Just to be sure, do you have the Visual Studio 2015 redists installed? If not, you can get them here: https://www.microsoft.com/en-us/download/details.aspx?id=51682

Another thing to try is to open an admin command prompt where assfiltermod.dll is then type:


regsvr32.exe <path to assfiltermod.dll>\assfiltermod.dll


Replace <path to assfiltermod.dll> with the full path to assfiltermod (ex: c:\mpc-hc\filters)

I'm not sure if it will work but its worth a try.

Volfield
10th July 2016, 20:16
Visual Studio 2015 redists do the trick. Thanks for help. You should add this info to first post :)

Blitzker
10th July 2016, 23:14
Visual Studio 2015 redists do the trick. Thanks for help. You should add this info to first post :)

Good, i'm happy that was something easy to fix! The info was in the readme on github but i forgot to add it on the first page.

Magik Mark
13th July 2016, 06:55
I set the font to be franklin Gothic size 40. It still keep on displaying MS Sanserif. Is this possible to correct?

SecurityBunny
16th July 2016, 11:04
Interesting project! Hopefully it'll surpass XySubFilter in performance and features in due time and continue to have active development. :)

Just out of curiosity, why were you searching for an alternative to XySubFilter?

Blitzker
16th July 2016, 18:30
I set the font to be franklin Gothic size 40. It still keep on displaying MS Sanserif. Is this possible to correct?

I tested it on both Windows 7 and 8.1 and it works fine for me. Is it the only font you have problems with?

Interesting project! Hopefully it'll surpass XySubFilter in performance and features in due time and continue to have active development. :)

Just out of curiosity, why were you searching for an alternative to XySubFilter?

:)

I just wanted a directshow filter based on the library libass since its still actively developed and an easy project to work on. :sly:

cyberscott
17th July 2016, 23:30
I'm glad that you started this project! :thanks:

I stopped using XySubfilter a few years ago when I started upscaling my videos to 4K. It was buggy and very resource intensive at 2560x1440 and even worse at 4k rendering. (I upscale to 4k with madvr, mpc-hc and lav)

Even the built in subtitle renders in MPC-HC and BE could not do 4K subs with out errors, crashes, etc.

AssFilterMod is able to render 4k subs without crashing the video players that I use with my test videos. I do run into some slow downs if there is a lot of animated subs being displayed at the same time or larger, animated fonts being displayed. Not the render's fault, of course as a lot of resources are being used at 4k.

I like consistency in my playback so I usually use 2560x1440 for the subs on my 4K up-scales. There is not a huge difference in quality, IMHO, between 4k and 2560x1440 rendered subs and it plays some of the more aggressive subtitles without losing frames. Plus, compared to internal sub renders at the same 2560 resolution, AssFilterMod looks better and doesn't use much more rendering power. :D

At least now, I have the option to use 4k sub rendering if I so choose.

I look forward to your continued development of this project! :)

Magik Mark
17th July 2016, 23:46
Blitzker,

When setting font, does it have to be within the filter or player? I'm using mpc be and dsplayer. The font being used differ from time to time. I was thinking maybe there is something in the srt file it self. Im using windows 10 pro x64

amayra
20th July 2016, 11:23
Blitzker,

When setting font, does it have to be within the filter or player? I'm using mpc be and dsplayer. The font being used differ from time to time. I was thinking maybe there is something in the srt file it self. Im using windows 10 pro x64

usually you set font in filter But in your case this depends you renderer priority (merit)

Magik Mark
20th July 2016, 12:33
usually you set font in filter But in your case this depends you renderer priority (merit)



How do I change this in the renderer? I use lav filter and madvr


Sent from my iPhone using Tapatalk

amayra
20th July 2016, 19:28
How do I change this in the renderer? I use lav filter and madvr


Sent from my iPhone using Tapatalk

https://s32.postimg.org/6zyjaouit/2016_07_20_19_12_44.png
this for MPC-Like
1 - Go to "External Filters", press "Add Filters" and add all of: DirectVobSub, AssFilterMod and XySubFilter
2 - From the right side, change the preference of each of those filters to "Block" except AssFilterMod
3 - Set the preference of AssFilterMod to "Prefer"
i hope this will help you

Virtual_ManPL
17th August 2016, 13:35
Thank you very much for the AssFilterMod ! :thanks:



I did some quality comparison for subtitle renderers.
For this I used file "[FTV-subs] Touhou - Bad Apple!! PV [960x720] v2.mkv" with "simple karaoke" (first track) subtitles.

fullscreen mode in 1680x1050 resolution
- AssFilterMod 0.2.1 [harfbuzz]
http://i.imgur.com/j5GAnpl.png
- AssFilterMod 0.2.1 [885515f]
http://i.imgur.com/A4g0r3h.png
- XySubFilter 3.1.0.746 BETA3
http://i.imgur.com/EdidGLE.png
- MPC-HC 1.7.10.252
http://i.imgur.com/PeLFVAp.png
- xy-VSFilter 3.0.0.306
http://i.imgur.com/9PQYnJ8.png

windowed mode in enabled "Auto-zoom:" with set "Auto Fit" and "Auto fit factor:" set to "75%" in MPC-HC:
- AssFilterMod 0.2.1 [harfbuzz]
http://i.imgur.com/PXytcCs.png
- AssFilterMod 0.2.1 [885515f]
http://i.imgur.com/QEopXk9.png
- XySubFilter 3.1.0.746 BETA3
http://i.imgur.com/03RDKlg.png
- MPC-HC 1.7.10.252
http://i.imgur.com/ZqIAFiZ.png
- xy-VSFilter 3.0.0.306
http://i.imgur.com/Aqkl0mY.png

My opinions and observations:
- xy-VSFilter isn't usable in this days, because of awful and terrible subtitle rendering quality
- XySubFilter produces a little more sharper subtitles than MPC-HC
- AssFilterMod produces sharpest subtitles, compared to XySubFilter, MPC-HC and xy-VSFilter
- AssFilterMod [harfbuzz] produces a little more sharper subtitles than AssFilterMod

Vertical subtitles are smaller in AssFilterMod (at least with this file), compared to XySubFilter, MPC-HC and xy-VSFilter. Is it a bug?

ryrynz
17th August 2016, 23:35
My opinions and observations:
- AssFilterMod [harfbuzz] produces a little more sharper subtitles than AssFilterMod


This sharpness you're noticing looks to be the result of the text being slightly closer together in some areas, otherwise it's identical, is that change intended?

What changed exactly with those builds I see nothing mentioned in the GIT.

Siso
22nd August 2016, 19:40
I was trying to get assfiltermod to work, but no success at all, tried with mcp-be and potplayer, no luck. Any help will be appreciated.

ryrynz
23rd August 2016, 09:06
I was trying to get assfiltermod to work, but no success at all, tried with mcp-be and potplayer, no luck. Any help will be appreciated.

I couldn't get it working with BE, it's not supported anyway. I know it works in HC though.

Siso
23rd August 2016, 09:14
I couldn't get it working with BE, it's not supported anyway. I know it works in HC though.

Thank you, will try it.

amayra
23rd August 2016, 23:24
I couldn't get it working with BE, it's not supported anyway. I know it works in HC though.
is work fine in my MPC-BE
edit: sorry is moded Build

Siso
24th August 2016, 13:41
It looks like it work only with embedded subtitles, not with external srt files...

ryrynz
24th August 2016, 23:02
It looks like it work only with embedded subtitles, not with external srt files...

Yeah that's why MPC-BE hasn't added support for it yet. Most users are still better off with xy/vssubfilter for now.

Blitzker
2nd September 2016, 04:32
Thank you very much for the AssFilterMod ! :thanks:

I did some quality comparison for subtitle renderers.

My opinions and observations:
- xy-VSFilter isn't usable in this days, because of awful and terrible subtitle rendering quality
- XySubFilter produces a little more sharper subtitles than MPC-HC
- AssFilterMod produces sharpest subtitles, compared to XySubFilter, MPC-HC and xy-VSFilter
- AssFilterMod [harfbuzz] produces a little more sharper subtitles than AssFilterMod

Vertical subtitles are smaller in AssFilterMod (at least with this file), compared to XySubFilter, MPC-HC and xy-VSFilter. Is it a bug?

Thanks for testing! Indeed the vertical subtitles are smaller compared to XySubFilter. This is one of many differences between XySubFilter and libass (be it features or bugs :sly: )

This sharpness you're noticing looks to be the result of the text being slightly closer together in some areas, otherwise it's identical, is that change intended?

What changed exactly with those builds I see nothing mentioned in the GIT.

The harfbuzz builds are to test another way to compile libass with a new text shaper (harfbuzz instead of freetype). Since harfbuzz is still actively developed, i may switch to this if there is no glitches in the display of the subs.

It looks like it work only with embedded subtitles, not with external srt files...

Yes, it only work with embedded subtitles for now. I'll start to look into external subtitles when i get more time.

huhn
2nd September 2016, 17:27
i'm running the "harfbuzz" build for some time now and i haven't seen something that was definitely broken.

Blitzker
3rd September 2016, 01:06
i'm running the "harfbuzz" build for some time now and i haven't seen something that was definitely broken.

Same here, not a glitchy sub yet with the harfbuzz builds.

I've made a new build based on harfbuzz with a not yet released version of libass. This fixes a problem with the drawing of outlines with some fonts.

harfbuzz: http://imgur.com/20wSgYv
harfbuzz_x1: http://imgur.com/iQx9lvV

Works good for me but it needs more testing.

huhn
17th September 2016, 18:04
just a small update.

i haven't notice/seen any issues with the x1 build and i used it a lot.

amayra
30th September 2016, 09:46
i try to make AssFilterMod load the auto-load subs but i need some help any update about that ?

Blitzker
30th September 2016, 20:52
i try to make AssFilterMod load the auto-load subs but i need some help any update about that ?

If you're talking about auto-load of external subs, its not implemented yet.

lion09503
5th October 2016, 23:17
If you're talking about auto-load of external subs, its not implemented yet.

Any ETA on this feature?

Blitzker
6th October 2016, 23:53
Any ETA on this feature?

Sorry, no ETA.

amayra
7th October 2016, 11:16
Any ETA on this feature?
i'm trying add this feature but i need more time maybe more few week :confused:

amayra
7th October 2016, 11:17
If you're talking about auto-load of external subs, its not implemented yet.
i well try to help you with this one :goodpost:

Blitzker
8th October 2016, 00:26
i well try to help you with this one :goodpost:

Thanks, any help is welcome! :)

Blitzker
8th October 2016, 00:48
Hello!

I've done some optimizations in the rendering code and so far, it gives me good results. (assfiltermod_harfbuzz_x2)

On my couple years old CPU (i7 950 3.2G) and the following test subs (thanks huhn) at 1080p, the subtitles rendering queue in madvr stay mostly full with a little drop of 1-2 frames in the heaviest scenes.

If some of you want to do those tests, plz share your results and cpu model. And be sure to give a try to the most heavy subs you can get your hands on too! :devil:

Thanks!

http://www.mediafire.com/file/9o1cgh5xra1ybno/subtiles_test_files.7z

huhn
8th October 2016, 15:00
i3 4130 3.40 ghz, DDR3 1600 mhz ram
rendering resolution UHD.

ddy dimension w ed: fine the queue is nearly untouched

ddy dimension w op: fine the queue is nearly untouched

fff aldnoah zero ED 2: impossible to play smooth. XY vsfilter can't even play it at 1080p with my system.

GJM shirayuki OP 1: fine was a problem in the past.

Blitzker
10th October 2016, 18:05
i3 4130 3.40 ghz, DDR3 1600 mhz ram
rendering resolution UHD.

ddy dimension w ed: fine the queue is nearly untouched

ddy dimension w op: fine the queue is nearly untouched

fff aldnoah zero ED 2: impossible to play smooth. XY vsfilter can't even play it at 1080p with my system.

GJM shirayuki OP 1: fine was a problem in the past.

fff aldnoah zero ED 2 is heavy with all the moving subs so i can see that the rendering can't keep up.

Since the rendering is now multithreaded, it would be nice if the tests could be done with a cpu with more cores.

Thanks for testing!

huhn
10th October 2016, 19:55
with a CPU queue of 128 it is playable at UHD. but the CPU never uses more than 70 % so i'm not sure if more cores are really doing a lot more.

i have an i7 3770k and i will do the test there some time in the future.

doing test on 1080p with that CPU is a waste of time it will work for sure.

Siso
11th October 2016, 21:36
with a CPU queue of 128 it is playable at UHD. but the CPU never uses more than 70 % so i'm not sure if more cores are really doing a lot more.

i have an i7 3770k and i will do the test there some time in the future.

doing test on 1080p with that CPU is a waste of time it will work for sure.

Off topic, why do you use 128 CPU queue?

huhn
11th October 2016, 21:55
to test if it works. and yes it was helping a lot in this case so buffers help.

it's not even remotely close to working with 16.

Siso
12th October 2016, 08:24
to test if it works. and yes it was helping a lot in this case so buffers help.

it's not even remotely close to working with 16.

So increasing the CPU queue for 1080p 23p playback to 128 is good? I'm with Xeon X5650 6 cores @ 3,6 ghz.

ryrynz
12th October 2016, 08:30
So increasing the CPU queue for 1080p 23p playback to 128 is good? I'm with Xeon X5650 6 cores @ 3,6 ghz.

Only it certain situations like rendering complicated subtitles. Otherwise leave it at defaults.

Siso
12th October 2016, 08:43
Only it certain situations like rendering complicated subtitles. Otherwise leave it at defaults.

Thank you, will do.

Plastic
3rd November 2016, 23:19
Hello, I having issues with overlapping subtitles. How do I set it to not use the subs from assfitlermod instead of the built in MPC-HC one.

Blitzker
4th November 2016, 04:59
Hello, I having issues with overlapping subtitles. How do I set it to not use the subs from assfitlermod instead of the built in MPC-HC one.

For now, the only way to not have overlapping subtitles when you use the built-in subtitle renderer in MPC-HC is to un-register assfiltermod. I will update my pull request
for MPC-HC soon to fix this.

Blitzker
4th November 2016, 05:51
Hello!

I finally found the time to implement the auto-loading of external subtitles. The feature still need some work but i think its ready to be tested.

There is a couple of things to look for:


Embedded subtitles have priority over the external subtitles.

Only one external subtitle can be loaded for now.

The external subtitle name must match the name of the media file. But also, the subtitle name can contain an ISO 639-1 2 characters language code before its extension (ie: mymovie.en.srt).

A subtitle name with an ISO 639 language code will have priority over a name without one.

An external ASS subtitle will have priority over an SRT one.

There is a new option in the filter settings to set a path to load external fonts. Only used for external ASS subtitles. By default, it is set to "{FILE_DIR}" (without the quotes) which mean the folder where the media file is located. So you can do "{FILE_DIR}fonts" to use the fonts folder inside the media file folder (no need to put a \ after the {FILE_DIR} tag).


Thats it on the feature for now. What i have planned to do next is of course the possibility to be able to switch between multiple external subs.

The test version is in mediafire as usual (assfiltermod_harfbuzz_x3_x32 or assfiltermod_harfbuzz_x3_x64).

Thanks for testing!

BTW, there is currently no error checking done on the external subtitles. So if you try to load a corrupted or invalid file, the behavior is undefined.

NOTE: You need to re-register assfiltermod to enable the auto-loading of external subs.

Plastic
4th November 2016, 17:44
For now, the only way to not have overlapping subtitles when you use the built-in subtitle renderer in MPC-HC is to un-register assfiltermod. I will update my pull request
for MPC-HC soon to fix this.

Thank You!:D

Blitzker
10th November 2016, 00:57
Hello!

I've made a custom build of MPC-HC that support AssFilterMod. Its based on the lastest git (develop branch)

x86: mpc-hc_8f7f1dc (assfilter).zip (http://www.mediafire.com/file/3g9jptl0jnf7fnl/mpc-hc_8f7f1dc_%28assfilter%29.zip)
x64: mpc-hc64_8f7f1dc (assfilter).zip (http://www.mediafire.com/file/qn854m4r4dk68az/mpc-hc64_8f7f1dc_%28assfilter%29.zip)

The zip files only contain the main EXE.

Thanks

rock
10th November 2016, 11:46
I can't play rmvb video with external srt when I set AssFilter as Subtitle Renderer, XySubFilter is fine. What could be the reason? Anyway I also found that AssFilter and AssFilterAutoLoad on filter list when playing video with embedded subtitle.

Edit:
Developer has investigated it that it was caused by the sub file, not the video. thanks to him :)

Blitzker
10th November 2016, 17:54
I can't play rmvb video with external srt when I set AssFilter as Subtitle Renderer, XySubFilter is fine. What could be the reason? Anyway I also found that AssFilter and AssFilterAutoLoad on filter list when playing video with embedded subtitle.

Works fine here, but i have an idea why it doesn't for you. Can you share the srt file plz?

As for the AssFilterAutoLoad duplicate in the filter list, i'm aware of this problem. I'll fix this soon.

Thanks for testing!

Plastic
11th November 2016, 07:40
The new player works great for me. Though my Initial D rip doesn't show any subs. Nvm, I'm an idiot.
Also, I'm trying to load external ass files for the rip and it just freezes when loading the MKV

Blitzker
11th November 2016, 08:22
The new player works great for me. Though my Initial D rip doesn't show any subs. Nvm, I'm an idiot.
Also, I'm trying to load external ass files for the rip and it just freezes when loading the MKV

Can you share an ass file that freeze (Don't rename the file before sharing)? I tested a lot of them here (Some out of Aegisub and some extracted from mkv's) and they all worked.

rock
12th November 2016, 14:08
this (https://www.dropbox.com/s/h5x5s9f5rhbbxjm/%5BAnime%20Land%5D%20Detective%20Conan%20Movie%2020%20-%20The%20Darkest%20Nightmare%20%28BDRip%201080p%20Hi10P%20TrueHD%29%20RAW%20%5BF2938E75%5D.ass?dl=0) subtitle looks different with AssFilterMod compared to mpv, MPC-HC ISR, and XySubFilter

Plastic
13th November 2016, 09:28
Can you share an ass file that freeze (Don't rename the file before sharing)? I tested a lot of them here (Some out of Aegisub and some extracted from mkv's) and they all worked.

https://plastic.s-ul.eu/xPzjyD2p

here's a link to said subtitle. Right click since it's hosted on my buddies dedi.

Blitzker
14th November 2016, 05:18
this (https://www.dropbox.com/s/h5x5s9f5rhbbxjm/%5BAnime%20Land%5D%20Detective%20Conan%20Movie%2020%20-%20The%20Darkest%20Nightmare%20%28BDRip%201080p%20Hi10P%20TrueHD%29%20RAW%20%5BF2938E75%5D.ass?dl=0) subtitle looks different with AssFilterMod compared to mpv, MPC-HC ISR, and XySubFilter

Nice find, fixed. This subtitle file have an embedded font and by default, libass don't load them.

https://plastic.s-ul.eu/xPzjyD2p

here's a link to said subtitle. Right click since it's hosted on my buddies dedi.

Thanks, will have a look at it.

Volfield
14th November 2016, 22:22
Blitzker when i play files with ordered chapters openings and endings dont have subtitles e.g. Coalgirs Nisekoi or Clannad releases.

Blitzker
15th November 2016, 05:49
Blitzker when i play files with ordered chapters openings and endings dont have subtitles e.g. Coalgirs Nisekoi or Clannad releases.

Nice problem... Let me explain:

When an ass subtitle file is muxed in a MKV file, each event is assigned an unique number to identify it (0, 1, 2, 3, etc...). That way, its easy to avoid duplicate events (Cause each time you seek backwards in a file, the subtitle data is read again and processed).
Now the problem is that an ordered chapter is basically another MKV file that is dynamically inserted into the file currently playing. That means, since its another file, its events are also numbered as 0, 1, 2, 3, etc.. So the duplicate system is kicking in and discard the new events with the same id's.

Gonna have to come up with a solution to this problem. :devil:

Andy2222
17th November 2016, 13:00
Hello!

I've made a custom build of MPC-HC that support AssFilterMod. Its based on the lastest git (develop branch)

x86: mpc-hc_8f7f1dc (assfilter).zip (http://www.mediafire.com/file/3g9jptl0jnf7fnl/mpc-hc_8f7f1dc_%28assfilter%29.zip)
x64: mpc-hc64_8f7f1dc (assfilter).zip (http://www.mediafire.com/file/qn854m4r4dk68az/mpc-hc64_8f7f1dc_%28assfilter%29.zip)

The zip files only contain the main EXE.

Thanks

Is this the repo/tree for your compiled version and will you keep it updated/merged? https://github.com/Blitzker/mpc-hc/tree/assfilter

thx
Andy

Blitzker
17th November 2016, 20:17
Is this the repo/tree for your compiled version and will you keep it updated/merged? https://github.com/Blitzker/mpc-hc/tree/assfilter

thx
Andy

Yes, i will keep it updated and build it when there is a change since i personally use it.

Blitzker
17th November 2016, 20:35
https://plastic.s-ul.eu/xPzjyD2p

here's a link to said subtitle. Right click since it's hosted on my buddies dedi.

I tried your subtitle file as external and as embedded and couldn't get it to crash. What are your specs? Player you use?

cyan
19th November 2016, 22:10
no option to pick which subtitle to display (for multi embedded) or am I missing something ?
thank you

Blitzker
20th November 2016, 04:47
no option to pick which subtitle to display (for multi embedded) or am I missing something ?
thank you

You can already select the subtitle in your player (in MPC-HC, its in Play->Subtitle track or Right-Click->Subtitle track) or even by Right-Click on the LAV Splitter if you use it. With so many ways to change the active subtitle, i don't feel its really needed.

Plastic
20th November 2016, 05:16
I tried your subtitle file as external and as embedded and couldn't get it to crash. What are your specs? Player you use?

I'm using your build of mpc-hc 64bit.

I don't think I should have any issues playing anything lol. Here are my specs. http://valid.x86.fr/5acuby

Blitzker
20th November 2016, 06:53
I'm using your build of mpc-hc 64bit.

I don't think I should have any issues playing anything lol. Here are my specs. http://valid.x86.fr/5acuby

Indeed, nice rig!

Do you have another external ass subtitle that you can test with the same MKV that freeze? Just to be sure that its not the MKV that is the problem.

lion09503
20th November 2016, 12:24
Nice work so far but can you also add support for PGS files? It's the format for bluray subtitle files.

Blitzker
20th November 2016, 21:25
Nice work so far but can you also add support for PGS files? It's the format for bluray subtitle files.

Adding support for bitmap subtitles like PGS and Vobsub would require an external library (like libass for ASS subtitles). I haven't yet found such a lightweight library and i don't want to use ffmpeg (too big).

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.

CCat
8th March 2017, 21:49
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
Ah, so it's about the spacing. I meant to write MPC-HC (newest nightly), sorry.
I just tested XySubFilter as well and it also has the bigger spacing, so VSFilter/ISR seems to be the odd one out in that regard.

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
But it's right there, Jtacdf posted a link to a said problematic file (https://forum.doom9.org/showthread.php?p=1799274#post1799274) and that's what I've been using.
Or did you test that already when you say you cannot reproduce the problem?

The scene where the screenshots with spacing differences come from is at the 00:46.462 to 00:52.636 timemark, but you should see it everywhere.

Ok, the thing is that i used an experimental build of libass in thoses harfbuzz releases (...) [which] uses a new stroker that correct issues with some fonts but it seems to introduce unwanted artifacts.
Ah, that's good to hear, because that means it's not a direct issue with harfbuzz. Makes me wonder though if the problem is more of the side of the stroker or of the side of the fonts, maybe there's a reason that there are seemingly random points in those kanji glyphs, but to a layman's eye those look like errors.

Jtacdf
9th March 2017, 11:17
Here is another problematic file that does not play nice with AssFilterMod v0.1, 0.2, 0.3. Probably related to libass.
https://mega.nz/#!UsR1AIoC!jqweOJhzWdcfftb2uAxde-XI6og5V3zV3NjC7mv34Uc

With the default heavy Kfx ass file, the front/end of each karaoke sentence display as transparent and seems "chopped" off. There is also some misalignment of the white fill fx. Works fine with XySubFilter and MPC-HC/BE ISR.

CCat
9th March 2017, 18:30
Here is another problematic file that does not play nice with AssFilterMod v0.1, 0.2, 0.3. Probably related to libass.
That seems to be an issue with "@ fonts", the OP Romaji style uses "@A-OTF CapieN Std B" as a font.
From what I know, the "@" is supposed to flip (certain?) kanji on it's side, which has uses in vertical writing I believe, but in this case it seems to also shrink the size of the font, here's a comparison out of Aegisub (xy-VSFilter):
https://i.imgur.com/7niTEMQ.png
If you change the subtitle provider to libass, both fonts are of the larger size, which is the cause for what you're seeing.
The OP was designed with (xy-)VSFilter in mind, so the larger font gets cut off on the sides by \clips (which are used for colored stripes in the text) and because the white fx was generated to fit on the smaller font, it's misaligned.

clsid
18th April 2017, 22:00
A bug report:
https://trac.mpc-hc.org/ticket/6132

Blitzker
19th April 2017, 23:08
A bug report:
https://trac.mpc-hc.org/ticket/6132

Interesting bug. It seems that windows doesn't play nice with UTF-8 filenames. I've made a little hack in libass to support loading of UTF-16 filenames and it seems to work.

I'll release it when i've made more testing of different UTF-8 strings.

nevcairiel
20th April 2017, 00:18
Interesting bug. It seems that windows doesn't play nice with UTF-8 filenames. I've made a little hack in libass to support loading of UTF-16 filenames and it seems to work.


Thats how it is, Windows is internally all UTF-16 (ie. wchar_t), and file access should convert to that, the plain char APIs don't take UTF-8, only plain ASCII. MultiByteToWideChar is what you want to use to go from UTF-8 to UTF-16.

Blitzker
20th April 2017, 21:40
Thats how it is, Windows is internally all UTF-16 (ie. wchar_t), and file access should convert to that, the plain char APIs don't take UTF-8, only plain ASCII. MultiByteToWideChar is what you want to use to go from UTF-8 to UTF-16.

Yes, MultiByteToWideChar is what i use to convert UTF-8 to UTF-16. Still, i spent a bit of time wondering what was wrong till i decided to google for that info. At least its something i won't forget! :thanks:

Blitzker
20th April 2017, 21:54
Here is a new version of AssFilterMod that should fix the problem with unicode path names. The simple way to do it was to fix libass to support UTF-16 but i'm still not sure if i'll go with that or support it only in assfiltermod (more work).
Anyway, i decided to release a test build so users can test files with unicode paths.

x32: assfiltermod_utf-8_x32.zip (http://www.mediafire.com/file/13fy42qxh9trp6d/assfiltermod_utf-8_x32.zip)
x64: assfiltermod_utf-8_x64.zip (http://www.mediafire.com/file/w6axh9c6hc9joc9/assfiltermod_utf-8_x64.zip)

I also made a build with harfbuzz and a new version of the experimental stroker which fix the dots on some japanese fonts.

x32: assfiltermod_harfbuzz_x5_x32.zip (http://www.mediafire.com/file/d9mj52z3184nm1f/assfiltermod_harfbuzz_x5_x32.zip)
x64: assfiltermod_harfbuzz_x5_x64.zip (http://www.mediafire.com/file/uhx9j38tb7f53dc/assfiltermod_harfbuzz_x5_x64.zip)

JayeDog
9th May 2017, 08:19
I am trying to use assfiltermod with kodi dsplayer but it can only display embedded subs. It won't load external srt files. My files srt files are in the correct format ie same file name and 2 letter language code. It is working fine in mpc-hc. Any idea why the external srt files won't display in kodi displayer?

ashlar42
12th May 2017, 12:59
May I ask why the decision of starting almost from scratch instead of working on improving XySubFilter? Was it not open sourced?
Simple curiosity, not criticism of any kind, as devs are clearly free to do whatever the hell they want with their own time. :)

clsid
12th May 2017, 14:22
XySubFilter is based on VSFilter, while AssFilterMod uses libass, which is an entirely different rendering library.

amayra
14th May 2017, 16:16
May I ask why the decision of starting almost from scratch instead of working on improving XySubFilter? Was it not open sourced?
Simple curiosity, not criticism of any kind, as devs are clearly free to do whatever the hell they want with their own time. :)

1 XySubFilter is open source
2 AssFilterMod is a fork of AssFilter "ISubRenderProvider meets libass. Working prototype.
" by Alex Marsev
3 always check behind you before posing dude

blaster00
15th May 2017, 04:06
with some sub from http://www.zimuzu.tv/fsubtitle http://subhd.com/sub0
for ass
1. AssFilterMod crashes mpc-hc with madvr or evr-cp many times.
2. It takes a lot of times before play real start.
3. Border And Shadow behaves very differently with AssFilterMod other then mpc internal and xysubfilter.
for srt
both AssFilterMod and sub file is loaded, but nothing is showed. Not quite much, but happened.
Sorry for my English, and no snapshot.

Also don't know how to switch sub tracks.

ashlar42
27th May 2017, 16:47
1 XySubFilter is open source
2 AssFilterMod is a fork of AssFilter "ISubRenderProvider meets libass. Working prototype.
" by Alex Marsev
3 always check behind you before posing dudeIt's quite ironic that you spent the time to reply, suggesting me to "check behind" when you clearly did *not* answer my main question.

"May I ask why the decision of starting almost from scratch instead of working on improving XySubFilter?"

The fact that XySubFilter is open source only strenghtens my curiosity. Reading these nine pages it looks a lot like reinventing the wheel. *But* I'm not a developer, so I simply asked what was the reason for the decision taken by Blitzker. I *think* he might be the only one capable of providing an answer.

And I stress that it's his time, his project and he can do whatever the hell most pleases him. I'm just curious. Maybe I'll learn something in the process.

Cheers. :p

clsid
27th May 2017, 17:13
XySubFilter code is a giant complex mess which makes it unlikely to attract new developers.

AssFilterMod is open source as well. All the complex stuff is in an external library (libass) that he doesn't need to worry about. The AssFilterMod filter is just a wrapper for libass. So it is a relatively small amount of code to maintain.

Shinobu
10th June 2017, 23:10
Great job with this filter, got lots of ass fx witch just don't wokrs with vsfilter or xysubfilter.
Is there any way to autoswitch from your ass filter to vsfilter/xysubfilter for unsupported format (.sub,.pgs...)

Thanks a lot

lion09503
7th August 2017, 06:45
any news when this will be updated again?

amayra
27th August 2017, 15:01
any news when this will be updated again?

i did try to add support to pgs in my fork but no luck

huhn
30th August 2017, 16:14
did you try it with the vsfilter code or the ffmpeg code?

amayra
31st August 2017, 03:10
did you try it with the vsfilter code or the ffmpeg code?

i used MPC code and hoped to see some improvement with ISR code

cyberscott
21st September 2017, 01:10
I recently built a Windows 10 64 bit (all latest updates) PC with a Ryzen 1800x cpu and a Nvida 1080 GPU.

AssFilterMod with MPC CE 64 bit, LAV and Madvr, all latest builds. Render times jump all over the place, video stutters like crazy. Doesn't matter the resolution /upcale of the video or of the subtitles. I tried different native resolutions from 480p and 1080p and upscales to 4k, no difference.
Same thing happens with xysubfilters as well so maybe something common to the code? On my Intel based system, AssFilterMod plays perfectly fine and stable. Internal renderer on the new build is fine.

Can anyone with a Ryzen CPU try AssFilterMod to see if they have issues as well?

lion09503
21st September 2017, 03:31
I recently built a Windows 10 64 bit (all latest updates) PC with a Ryzen 1800x cpu and a Nvida 1080 GPU.

AssFilterMod with MPC CE 64 bit, LAV and Madvr, all latest builds. Render times jump all over the place, video stutters like crazy. Doesn't matter the resolution /upcale of the video or of the subtitles. I tried different native resolutions from 480p and 1080p and upscales to 4k, no difference.
Same thing happens with xysubfilters as well so maybe something common to the code? On my Intel based system, AssFilterMod plays perfectly fine and stable. Internal renderer on the new build is fine.

Can anyone with a Ryzen CPU try AssFilterMod to see if they have issues as well?

I'm using a 1700 together with a gtx1060 running on a 4k display. I'm using lav filters,madvr and potplayer together with assfiltermod and I'm having no problems during playback.

huhn
21st September 2017, 08:58
did you change the nvidia power setting to adaptive?

cyberscott
21st September 2017, 21:31
did you change the nvidia power setting to adaptive?

Most definitely. I always keep it on adaptive and insure it is on adaptive after each video card driver install. Also tried "prefer maximum performance" for the heck of it with no change.
I've tried adjusting the render queues in Madvr to their highest to lowest settings with a few random settings in between but no luck.
Went as far as disabling cores in the Ryzen processor but no change.
Both AssFilterMod and xysubfilter exhibit the exact same behavior.
The internal subtitle renderer works fine.

I hope others with a Ryzen processors can chime in to determine if it is actually the processor / platform causing the weirdness.

huhn
21st September 2017, 22:30
can you make a screen of the OSD in playback?

cyberscott
22nd September 2017, 00:27
can you make a screen of the OSD in playback?

Here you go, though I don't know if it will help much. The render times jump all over the place when the subtitles are playing. I've seen it go over 2000!
I played the video at its' native resolution of 1080p but crazy jumping rendering times happen no matter the resolution or scaling setting if subtitles are being rendered. If no subtitles are being displayed, the video plays fine.
Absolutely no playback issues if the internal subtitle renderer is use.
I have no issue using the internal subtitle renderer but I want to see if the Ryzen platform is the problem and let the commuity/devs take a crack at solving this.

https://photos.google.com/photo/AF1QipO5KNxA019o2F1d9MiasPFw1CPP-FhACW_jcjpC

amayra
22nd September 2017, 02:02
someone need to pick up this project

huhn
22nd September 2017, 12:21
your screen is 404.

cyberscott
22nd September 2017, 18:04
your screen is 404.

Try this one.
https://drive.google.com/file/d/1YNwOXrQpAru166BeHoNF4hryaCHlHaw8Vg/view?usp=drivesdk

cyberscott
22nd September 2017, 19:03
I'm using a 1700 together with a gtx1060 running on a 4k display. I'm using lav filters,madvr and potplayer together with assfiltermod and I'm having no problems during playback.

Thanks for that info. I haven't tried another player outside of MPC-BE yet. I'll probably give potplayer a try this weekend to see if anything changes. :thanks:

huhn
22nd September 2017, 20:14
the subtitle queue isn't full and the upload too check the PCIe speed.

cyberscott
22nd September 2017, 22:43
the subtitle queue isn't full and the upload too check the PCIe speed.

PCIe speeds are fine, Gen2, 16x.

The screen shot does't show the full story, only what was happening at the time of the photo.
All the queues go up and down during the presence of any subtitles withAssFilterMod, always in a state of flux.

I did confirm same behavior within potplayer. This one is weird. Must be something specific to my system hardware and software as lion09503 reported no issues with his Nvidia 1060 / Ryzen system and he has a less powerful video card than I do.

It not the end of the world if I can't use the filter, just a little annoying that I haven't been able to pin down the cause yet.

lion09503
22nd September 2017, 23:02
Thanks for that info. I haven't tried another player outside of MPC-CE yet. I'll probably give potplayer a try this weekend to see if anything changes. :thanks:

Great. I haven't heard of mpc-ce though. Is that a port of mpc-hc? Can you link it? I'm not finding anything on google.

cyberscott
22nd September 2017, 23:59
Great. I haven't heard of mpc-ce though. Is that a port of mpc-hc? Can you link it? I'm not finding anything on google.

You'll never find MPC-CE, it doesn't exist. :D A typo on my part, should be MPC-BE. I've edit my original post to correct. Sorry for the confusion.

cyberscott
22nd October 2017, 01:41
I'd though I'd post back that after I installed the Windows 10 Fall Creators update, my issues with both AssFilterMod and xysubfilter completely cleared up and both now work as they should. I though I'd never had to thank Micro$oft for anything, lol! :p

Blitzker
17th November 2017, 05:28
Hello!

Its been a while since the last release but i found time to release a new version.

AssFilterMod version 0.4 is out: https://github.com/Blitzker/assfiltermod/releases


v0.4
- add: System tray icon
- add: Selection of external subtitles in context menu of tray icon
- add: Open settings by left click on the tray icon
- add: Use of fonts in External Subs Fonts folder for SRT subtitles
- add: Libass is built with harfbuzz support
- add: Support of font ligatures
- add: Option to disable auto-load of external subtitles
- fix: Auto-load of subtitles with unicode characters
- fix: Auto-load of SRT subtitles on a different codepage than en_us
- Settings page is now split in two: General Settings and SRT Settings
- Add support for Visual Studio 2017
- Use my fork of libass
- Update libass asm building tools : Now use nasm instead of yasm


I highly recommend to delete the registry key HKEY_CURRENT_USER\Software\AssFilter or reset the settings in the configuration pages.

This release introduce a system tray icon with which you can access the configuration by a left-click. The support of external subtitles have been improved and now load all subtitles present in the media file folder (they must still match the media name) and the subfolders (all .ass and .srt are loaded) specified in the configuration dialog. You can switch between the external subtitles by using the context menu on the new tray icon (right-click).

The binaries are now built with Visual Studio 2017, so be sure to install the redistributables (urls on first post).

huhn
17th November 2017, 06:17
is it possible to make the custom resolution option to be AR aware?
and the tray icon doesn't work on my system.
i'm on an old windows 10 insaider build.

Blitzker
18th November 2017, 00:24
is it possible to make the custom resolution option to be AR aware?
and the tray icon doesn't work on my system.
i'm on an old windows 10 insaider build.

I'll see what i can do about the AR.

For the tray icon, its a stupid error on my part. Its disabled by default and i forgot to add a checkbox in the General Settings.
In the meantime, you can manually activate it by going in the registry "HKEY_CURRENT_USER\Software\AssFilter" and set "TrayIcon" to 1.

Dulus_No
18th November 2017, 05:09
Would be possible to add an option for enabling kerning for .srt? It's possible for .ass with the script property "Kerning: yes".
http://www.framecompare.com/screenshotcomparison/KZPNNN8X

Blitzker
18th November 2017, 23:04
Would be possible to add an option for enabling kerning for .srt? It's possible for .ass with the script property "Kerning: yes".
http://www.framecompare.com/screenshotcomparison/KZPNNN8X

Simple enough. I've added support for kerning in the next build.

Blitzker
18th November 2017, 23:14
New build of AssFilterMod available:

- Add the missing "Enable System Tray Icon" checkbox in General Settings
- Add "Enable Kerning" checkbox in SRT settings.

http://www.mediafire.com/file/1icansexy3ex6hv/assfiltermod_975459a_x32.zip
http://www.mediafire.com/file/kq25aij47a7a4zl/assfiltermod_975459a_x64.zip

Dulus_No
19th November 2017, 07:08
- Add "Enable Kerning" checkbox in SRT settings.


Thank you!

Siso
21st November 2017, 23:44
I tried the latest version and it seems it doesn't allow me to make the subtitle font to bold...It stays on normal.

Dulus_No
22nd November 2017, 13:15
I tried the latest version and it seems it doesn't allow me to make the subtitle font to bold...It stays on normal.

Workaround is to add in "Custom Tags" this: {\b1}

Siso
22nd November 2017, 13:22
Workaround is to add in "Custom Tags" this: {\b1}

Thank you.

huhn
26th November 2017, 15:29
i'm on fall creator update now and i can't install assfilter now.
and yes i'm installing it as an admin. madVR worked fine so i'm quite lost here...

lvqcl
26th November 2017, 15:47
Do you have Visual Studio 2015 redistributable or Visual Studio 2017 redistributable installed?

huhn
26th November 2017, 16:12
thanks.

clsid
26th November 2017, 17:17
A static build would be nice to have. It avoids this dependency problem and pretty much all other codecs do it for that reason.

Blitzker
26th November 2017, 22:26
Workaround is to add in "Custom Tags" this: {\b1}

Yes, this is the way to do it for now. Its on my to-do list to be able to select options on the font selection dialog box.

A static build would be nice to have. It avoids this dependency problem and pretty much all other codecs do it for that reason.

Indeed, like you said this would avoid problems. Will do that for the next build.

ilko
12th December 2017, 00:06
hmm, I was interested into testing its potential but aegisub doesn't detect its presence like vsfiltermod or xy-vsfilter.

It might be a good alternative for fansubbers (I do typesetting / edition).

sneaker_ger
12th December 2017, 00:10
Well, Aegisub already does offer libass rendering...

ilko
12th December 2017, 00:35
of course, and the latest libass that it's based on is the v0.13.1. Since then, there have been improvements and fixes.

Just for example, vsfiltermod crashes when vector shapes have coordinate values in floating point (after re-sampling the resolution).

Blitzker
13th December 2017, 04:18
hmm, I was interested into testing its potential but aegisub doesn't detect its presence like vsfiltermod or xy-vsfilter.

It might be a good alternative for fansubbers (I do typesetting / edition).

Well, Aegisub already does offer libass rendering...

of course, and the latest libass that it's based on is the v0.13.1. Since then, there have been improvements and fixes.

Just for example, vsfiltermod crashes when vector shapes have coordinate values in floating point (after re-sampling the resolution).

Libass support in aegisub is unfortunately built-in so to keep it up to date, you have to build the entire aegisub project. :(

But i took a look at the csri interface and it was simple enough so i included it in assfiltermod. Now you can just copy assfiltermod.dll in the csri folder of aegisub and you can select it just like vsfilter.

Here is a build that i tested on Aegisub 3.2.2 and all seems fine.
I added a new entry in the registry "CSRIFontsDir" that you can fill with a path(full folder path) to fonts files you want to auto-load.

x32: http://www.mediafire.com/file/73h86ifmhbw2p2d/assfiltermod_csri_v2_x32.zip
x64: http://www.mediafire.com/file/3pb5aeee8489srw/assfiltermod_csri_v2_x64.zip

It seems stable but will need some testing!

Have fun!

EDIT:
- Fixed a rendering glitch with csri (shadow box around subtitles on a dark background)
- Added support for font ligatures with the registry key "DisableFontLigatures" (0 = Enabled, 1 = Disabled)
- Added Avisynth support:
- Works only on RGB32
- Filter name is "AssRender(file, fonts, scale, lig, mask)
- file(string) = .ass file (Required)
- fonts(string) = fonts folder to auto-load (Default: "")
- scale(double) = subtitles scaling (Default: 1.0)
- lig(bool) = font ligatures (Default: false)
- mask(bool) = when true, render on a black background (Default: false)

vinnytx
9th January 2018, 12:53
AssFilterMod doesn't load external subtitles.
The only way to do so it's forcing AssFilterModAutoLoad. But this isn't an optimal solution because in this way AssFilterMod is loaded even when it isn't necessary

Khaled1323
13th January 2018, 15:00
it seems i cant change subtitle's font like xysubfiltter

Klaus1189
28th January 2018, 16:04
I am interested in WEBVTT support. WEBVTT is used by YouTube for all of its videos which contains one or more subtitle streams.
However if I have a file with a muxed WEBVTT subtitle stream, I would like to play it with my favourite Media Player, which his Directshow based.

Steps I did already:
https://github.com/mbunkus/mkvtoolnix/issues/1592
-> MKVToolNix can mux WEBVTT according to the specs they released for this.
-> asked nevcairiel, the author of LAV Filters to add support for WEBVTT

Now there is a subtitle renderer needed to support it.

I hope you are interested in it and add support of WEBVTT.

If you have any question, need a sample file or anything else, let me know :)

Robbl
30th March 2018, 09:06
Installing doesn't work for 0.4, I always get the error message that the assfiltermod.dll module could not be found.

EDIT: Nvm, resetting pc worked...

JayeDog
19th July 2018, 14:55
does assfiltermod load external subs when there are embedded subs in the mkv file? doesn't seem to do so for me

Magik Mark
20th November 2019, 15:02
Does anyone have a solution to make the subtitle dim when using it in HDR videos? Maybe luminance similar to HD


Sent from my iPhone using Tapatalk

amayra
20th November 2019, 23:26
Does anyone have a solution to make the subtitle dim when using it in HDR videos? Maybe luminance similar to HD


Sent from my iPhone using Tapatalk
AssFilterMod is DEAD like every like every DirectShow subtitle renderer in the wild about try MPV and test with least version

Sunspark
3rd April 2021, 21:35
Bug report: On the SRT settings tab, for font style, no matter what you select, it always reverts back to "Regular".

For those seeking a workaround if there is never another update to this module my suggestion is to use a font that is already weighted as medium. Swiss 721 Medium (Bitstream's Helvetica) is a decent choice. Filenames are tt0759m_.ttf and tt0760m_.ttf