CrendKing / avisynth_filter

DirectShow filters that put AviSynth and VapourSynth into video playing
MIT License
107 stars 8 forks source link

Hang with Avisynth 3.7.1+ #70

Closed chainikdn closed 2 years ago

chainikdn commented 2 years ago

The video hangs right after SVP kicks in or changes script at runtime. AVS 3.7.0 - doesn't hang at all, everything works, 3.7.1 - hangs with a green screen, 3.7.2 - hangs with a regular image (not a green screen). It is not a complete "hang" cause it works again after manual seeking with a time bar, but if I close the player window while it hangs then the process doesn't exit.

Tested with MPC-HC and PotPlayer. Any video / format / renderer / etc - doesn't matter at all.

CrendKing commented 2 years ago

You are probably referring to https://github.com/CrendKing/avisynth_filter/issues/66. To use the new ConvertBits in AVSF, you have to try with fulls. Unfortunately that only applies to ConvertBits. If you use something like ConvertToYUV420 it's hardcoded to get frame 0.

But why is that related to SVP? Last time I check SVP still ships with AVS 3.5.1, and I thought SVP is stuck at AVS 3.5.1. Whenever I use AVS 3.7 (by placing the dll to the same directory as the player), SVP never kicks in, and the event log says

21:24:38.410 [I]: Main: starting up SVP 4 Pro [4.5.0.213]...

21:24:38.426 [I]: Main: module 'plugins/svpflow1.dll': 4.5.0.200
21:24:38.426 [I]: Main: module 'plugins/svpflow2.dll': 4.5.0.211
21:24:38.426 [I]: Main: module 'plugins64/svpflow1.dll': 4.5.0.200
21:24:38.426 [I]: Main: module 'plugins64/svpflow2.dll': 4.5.0.212
21:24:38.426 [I]: Main: module 'plugins64/svpflow1_vs.dll': 4.5.0.200
21:24:38.426 [I]: Main: module 'plugins64/svpflow2_vs.dll': 4.5.0.211

15:49:02.843 [I]: AVSF: found new player instance
15:49:02.876 [I]: Avisynth: <redacted>\MPC-BE\avisynth.dll
15:49:02.877 [E]: AVSF: please use Avisynth+ 3.5.0 or later
15:49:33.911 [I]: AVSF: player closed
CrendKing commented 2 years ago

I added a workaround for this: https://github.com/CrendKing/avisynth_filter/actions/runs/2193050031, by feeding upstream a dummy frame. Should be sufficient to handle AVS's current situation. However, it is not future proof. If they switch to actually rely on the frame 0, there will be no way to fix, due to how DirectShow works.

chainikdn commented 2 years ago

You are probably referring to https://github.com/CrendKing/avisynth_filter/issues/66

yeah, I see... was thinking that issue is only applicable for 10-16 bit sources the problem is indeed in ConvertXXX calls, even for good-old-8-bits

I added a workaround for this

nothing changed, still hangs

Whenever I use AVS 3.7 (by placing the dll to the same directory as the player), SVP never kicks in, and the event log says

you probably use some custom AVS build w/o proper VersionInfo

CrendKing commented 2 years ago

nothing changed, still hangs

I see. SVP itself works (with my .avs script), but the injection part hangs it. I think I know why it hangs on injection, but I need to think a good way to solve it.

you probably use some custom AVS build w/o proper VersionInfo

You are correct. I used my debug build of AVS+. After switching to the official version it works. Is there a way to disable the version check so that I can use my debug build?

chainikdn commented 2 years ago

Is there a way to disable the version check so that I can use my debug build?

Nope. VersionInfo must contain "avisynth+" substring.

CrendKing commented 2 years ago

Try https://github.com/CrendKing/avisynth_filter/actions/runs/2199610106

chainikdn commented 2 years ago

this one crashes the player instantly, even w/o any script and/or SVP avsf-1.0.log

CrendKing commented 2 years ago

Well, I can't repro. So you need to give me the exact steps.

chainikdn commented 2 years ago

there're no steps, just an instant crash crash

CrendKing commented 2 years ago

Any of the later builds work? https://github.com/CrendKing/avisynth_filter/actions

chainikdn commented 2 years ago

nope crash2

CrendKing commented 2 years ago

Just to be clear. It crashed at ChangeOutputFormat. If you didn't have any script or SVP, I don't think that function would be called. Can you capture a clean (no script, no SVP) crash dump and upload?

Also, my AVS+ is 3.7.2 r3661 x86_64.

chainikdn commented 2 years ago

https://drive.google.com/file/d/1N_3j1ONFSCHtEVrzrvAVjsg9ytxcSxGF/view?usp=sharing

CrendKing commented 2 years ago

Thanks. https://github.com/CrendKing/avisynth_filter/actions/runs/2205140539 should fix it.

chainikdn commented 2 years ago

yes, this one finally works

CrendKing commented 2 years ago

Good to know. That version still has a bug about VPSF. https://github.com/CrendKing/avisynth_filter/actions/runs/2207139952 fixes it. Sorry for the regressions because there's lots of architectural changes lately.

If you guys have time, please test. If everything works, close the ticket. I'll release a new version later.

Nuihc88 commented 2 years ago

Good to know. That version still has a bug about VPSF. https://github.com/CrendKing/avisynth_filter/actions/runs/2207139952 fixes it. Sorry for the regressions because there's lots of architectural changes lately.

If you guys have time, please test. If everything works, close the ticket. I'll release a new version later.

Before releasing a new version, here is something to look into...

Any builds newer than this one won't load at all for me. Also, there is no log generated (until i revert back to an older version again).

I have briefly tested following configuration options:
OS: Win7; PotPlayer Portable (210707) & MPC-HC Portable & MPC-BE Portable; Internal Filters & LAV Filters (0.76.1); MadVR & EVR Custom Present; While added as 'registered filter' & 'external filter';

I don't have much time to investigate right now, but would guess that code refactoring on April 18th starting with this commit broke Win7 support.

CrendKing commented 2 years ago

@Nuihc88, please create separate ticket.

Nuihc88 commented 2 years ago

@Nuihc88, please create separate ticket.

That's the plan; my intention was to give you a heads up about this before you release a new version, not to hijack the issue.

CrendKing commented 2 years ago

Feel free to re-open this if anyone found related problem.