Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XYsubfilter uses the default (Arial) style instead of the file #16

Open
MatiasMovie opened this issue Mar 3, 2021 · 17 comments
Open

XYsubfilter uses the default (Arial) style instead of the file #16

MatiasMovie opened this issue Mar 3, 2021 · 17 comments

Comments

@MatiasMovie
Copy link

MatiasMovie commented Mar 3, 2021

XYsubfilter uses the default (Arial) style instead of the file
Tested with MPC-HC and MPC-BE, subs work fine in MPV player (libass)
I think it's problem with "space" on the end in style name

///EDIT///
I changed the video to a random light sampel and added problematic subtitles (Now there is only 27.9 MB)
https://gofile.io/d/RqiFs6

@pinterf
Copy link
Owner

pinterf commented Mar 5, 2021

1.2G? Don't you have only the extracted sub file?
Or you can test with the current build I've just published (mainly because I made changed to the Avisynth filter), if the problem still occurs.

@realfinder
Copy link

realfinder commented Mar 5, 2021

@MatiasMovie
Copy link
Author

MatiasMovie commented Mar 6, 2021

Unfortunately, the error occurs only if the subtitles are in the MKV file, external works well
I am using version 3.2.0.805

v3.2.0.804 (20210306) still have problem

@MatiasMovie
Copy link
Author

MatiasMovie commented Mar 6, 2021

XySubFilter and external subtitles:
XySubFilter and external

XySubFilter and mkv:
XySubFilter and mkv

mpv and mkv:
mpv

@pinterf
Copy link
Owner

pinterf commented Mar 6, 2021

Thanks for the report, fixed in f71eb96
Can you build it yourself or I should prepare a test build for you?

@realfinder
Copy link

realfinder commented Mar 6, 2021

I did test the new sample in mpc with it's internal sub render (I have no xy-VSFilter nor VSFilter in that system) and it's same problem, maybe it's mpc bug after all

@MatiasMovie
Copy link
Author

Thanks for the report, fixed in f71eb96
Can you build it yourself or I should prepare a test build for you?

I do not know how to build it, but I can wait for a new version.

@pinterf
Copy link
Owner

pinterf commented Mar 6, 2021

@MatiasMovie
Copy link
Author

MatiasMovie commented Mar 6, 2021

Now the subtitles do not display
Tested in MPC-HC and MPC-BE

@pinterf
Copy link
Owner

pinterf commented Mar 7, 2021

Sorry, then this one should work, I hope.
https://drive.google.com/uc?export=download&id=1ZvYtb3l7UeJ0Xz3BgTj9X2x6q_W_O5eR

@MatiasMovie
Copy link
Author

MatiasMovie commented Mar 7, 2021

now works good with internal subs, the information is probably displays a bad version number
image

@MatiasMovie
Copy link
Author

MatiasMovie commented Mar 7, 2021

I found a problem, now external subtitles have a problem with this style in MPC-HC/BE
image

FPS_test_1080p23.976_L4.1.zip

@pinterf
Copy link
Owner

pinterf commented Mar 7, 2021

Great, thanks for checking that

@astiob
Copy link
Contributor

astiob commented Mar 7, 2021

Please revert f71eb96. No other ASS renderer does this, and it actually breaks this file as you can see in the latest comment by OP.

But also, please report and fix bugs upstream in https://github.com/Cyberbeing/xy-VSFilter. We have too many forks as it is.

The problem is in CSubtitleInputPin:

Explode(str, sl, ',', fields);
if(sl.GetCount() == fields)
{
stse.readorder = wcstol(sl.RemoveHead(), NULL, 10);
stse.layer = wcstol(sl.RemoveHead(), NULL, 10);
stse.style = sl.RemoveHead();

https://github.com/Cyberbeing/xy-VSFilter/blob/fc01a8da5ea6af9091aaab839bc62dc94a90094e/src/subtitles/SubtitleInputPin.cpp#L260-L265

which uses Explode, which trims every field:

sl.AddTail(str.Mid(i).Trim());
break;
} else {
sl.AddTail(str.Mid(i, j - i).Trim());

For what it’s worth, this also affects MPC-HC’s internal subtitle renderer.

@pinterf
Copy link
Owner

pinterf commented Mar 7, 2021

Thanks astiob, then it wasn't the way to go.
As for putting all my changes upstream: if a change is worth to be put there they're gonna cherry pick as it happened in the past. Once I'd do a PR all my changes would appear there in a long row. Unless I change my habit of working into a single branch and make a different branch for each feature/fix. But this project was/is so dead that I really didn't think they would spend any time on with my modifications. Or it breaks the project rules so much that they get incompatible with the original Cyberbeing branch. (E.g. if I make it to require c++17 which is a highly logical thing in 2021)

@pinterf
Copy link
Owner

pinterf commented Mar 7, 2021

@MatiasMovie
Copy link
Author

Now works well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants