VSFilterMod icon indicating copy to clipboard operation
VSFilterMod copied to clipboard

Support Multi-threads and more colors space for avs+

Open kedaitinh12 opened this issue 3 years ago • 10 comments

Can you add support to use multi-threads and more colors space for avisynth+??? Thanks

kedaitinh12 avatar Jun 06 '22 14:06 kedaitinh12

10-16bit support in Avisynth+ is very useful, don't know why VSFilterMod only supports 10-16bit in VS.

rapierx avatar Sep 15 '22 00:09 rapierx

@rapierx You can just use MaskSubMod function to get a masked subtitle clip, then Overlay it on a 10/16bit clip in Avisynth+. Sample script:

v = LSMASHVideoSource("video.mp4")
sub = MaskSubMod("subtitle.ass", length=v.FrameCount, width=v.Width, height=v.Height, fps=v.FrameRate)
\     .FlipVertical().ConvertBits(bits=v.BitsPerComponent)
Overlay(v, sub, mask=sub.showalpha)

I agree having native support is useful, but no one has time for it right now.

computerfan avatar Sep 15 '22 02:09 computerfan

@rapierx You can just use MaskSubMod function to get a masked subtitle clip, then Overlay it on a 10/16bit clip in Avisynth+. Sample script:

v = LSMASHVideoSource("video.mp4")
sub = MaskSubMod("subtitle.ass", length=v.FrameCount, width=v.Width, height=v.Height, fps=v.FrameRate)
\     .FlipVertical().ConvertBits(bits=v.BitsPerComponent)
Overlay(v, sub, mask=sub.showalpha)

I agree having native support is useful, but no one has time for it right now.

Doesn't work.

ConvertBits: invalid bit-depth for packed RGB formats, only 8 or 16 possible.

rapierx avatar Sep 15 '22 21:09 rapierx

Doesn't work.

ConvertBits: invalid bit-depth for packed RGB formats, only 8 or 16 possible.

@rapierx Just read video as 16bit clip. Change yuv format according to video. v = LSMASHVideoSource("video.mp4", format="YUV420P16")

In addition, the Overlay function internally will convert clips to yv24. You may want to avoid it by handling everything in 16bit RGB. v = LSMASHVideoSource("video.mp4", format="RGB48")

computerfan avatar Sep 15 '22 22:09 computerfan

Pull request can help this issue 😁😁😁 https://github.com/computerfan/VSFilterMod/pull/5

kedaitinh12 avatar Dec 18 '22 06:12 kedaitinh12

Good morning. I'm just reporting, in case the information is useful. I had a similar problem, my script breaks if I use prefetch() too high, causing avpsmod to close or the CLI encode to cancel on its own. I normally use the non-mod version, however it does not support some tags, such as: \alpha \t or \1vc(gradient). Pinterff's AssRender may work in some cases.

Anyway, thank you for your effort.

Kuronoe-Ookami avatar Oct 12 '23 13:10 Kuronoe-Ookami

Good morning. I'm just reporting, in case the information is useful. I had a similar problem, my script breaks if I use prefetch() too high, causing avpsmod to close or the CLI encode to cancel on its own. I normally use the non-mod version, however it does not support some tags, such as: \alpha \t or \1vc(gradient). Pinterff's AssRender may work in some cases.

Anyway, thank you for your effort.

Did you use that?? https://github.com/Asd-g/VSFilterMod/tree/master-1

kedaitinh12 avatar Oct 12 '23 15:10 kedaitinh12

Did you use that?? https://github.com/Asd-g/VSFilterMod/tree/master-1

I used the one we have here: https://github.com/computerfan/VSFilterMod/releases

And I tested other versions that I found on the avisynth wiki. I was able to use multithreading by forcing it through the CLI (--threads xx), but the prefetch(xx) within the avs script won't work. The assrender didn't read kanji from the "A-OTF Kaisho MCBK1 Pro MCBK1" font, or I did something wrong, it's possible.

I don't know what it could be. I'll try other things when I have more time.

Kuronoe-Ookami avatar Oct 12 '23 18:10 Kuronoe-Ookami

My share link was fix this, you need binary that, I tried binary this, you can try: https://drive.google.com/file/d/1SYM5RUkHJB1jvgmjN1c9E96k6GqRkd5Z/view?usp=drivesdk

kedaitinh12 avatar Oct 13 '23 00:10 kedaitinh12

My share link was fix this, you need binary that, I tried binary this, you can try: https://drive.google.com/file/d/1SYM5RUkHJB1jvgmjN1c9E96k6GqRkd5Z/view?usp=drivesdk

I took a quick test. Prefetch worked without crash avspmod. The tags I mentioned work well.

Thank you for your help.

Kuronoe-Ookami avatar Oct 13 '23 01:10 Kuronoe-Ookami