computerfan / VSFilterMod

VSFilterMod with VapourSynth interface added
GNU General Public License v3.0
40 stars 5 forks source link

Support Multi-threads and more colors space for avs+ #3

Open kedaitinh12 opened 2 years ago

kedaitinh12 commented 2 years ago

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

rapierx commented 1 year ago

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

computerfan commented 1 year ago

@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.

rapierx commented 1 year ago

@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.

computerfan commented 1 year ago

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")

kedaitinh12 commented 1 year ago

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

Kuronoe-Ookami commented 9 months ago

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.

kedaitinh12 commented 9 months ago

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

Kuronoe-Ookami commented 9 months ago

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.

kedaitinh12 commented 9 months ago

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

Kuronoe-Ookami commented 9 months ago

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.