styler00dollar / VapourSynth-RIFE-ncnn-Vulkan

RIFE filter for VapourSynth
MIT License
97 stars 22 forks source link

pipe:: Invalid data found when processing input #14

Closed NenelFX closed 7 months ago

NenelFX commented 10 months ago

It's giving me an error on my PC

pipe:: Invalid data found when processing input

It's all versions that give this error

the version of nihui/rife-ncnn-vulkan works all models

Will it be my GPU? Device Name GeForce 920M 1gb vram Vulkan 1.1.95

Or could it be that some dll?

I used this code

"clip=core.rife.RIFE(clip, model=9, gpu_thread=16, tta=False, uhd=False, sc=True, factor_num=5, factor_den=2)"

[ import vaporsynth as vs from vaporsynth import core core.num_threads=4 core.max_cache_size=4096 clip = core.raws.Source(r"-") sup = core.mv.Super(clip) bw = core.mv.Analyse(sup,isb=True) clip = core.mv.SCDetection(clip,bw,thscd1=600,thscd2=130) clip = core.resize.Bicubic(clip,format=vs.RGBS,matrix_in=1) clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, width=1280, height=720) clip=core.rife.RIFE(clip, model=9, gpu_thread=16, tta=False, uhd=False, sc=True, factor_num=5, factor_den=2) clip=core.resize.Bicubic(clip=clip, format=vs.YUV420P10, matrix_s="470bg") clip=core.fmtc.bitdepth(clip, bits=8)

sup = core.mv.Super(clip)

fw = core.mv.Analyse(sup)

bw = core.mv.Analyse(sup,isb=True)

clip = core.mv.FlowBlur(clip,sup,bw,fw,blur=50.0)

sup = core.mv.Super(clip)

fw = core.mv.Analyse(sup)

bw = core.mv.Analyse(sup,isb=True)

clip = core.mv.FlowFPS(clip,sup,bw,fw,60,1,blend=False)

clip.set_output() ]

hooke007 commented 10 months ago

gpu_thread=16

... It made me think that you had 8*RTX4080. Try 1 first.

NenelFX commented 10 months ago

gpu_thread=16

... It made me think that you had 8*RTX4080. Try 1 first.

did not work.

I don't know much about this code "gpu_thread=16" in the other version of "HomeOfVapourSynthEvolution/VapourSynth-RIFE-ncnn-Vulkan" I used "gpu_thread=2 and 16" and it didn't make a difference in performance but there were no errors in all rife models but this version of "styler00dollar/VapourSynth-RIFE-ncnn-Vulkan" None of the models have worked for me yet always gives the error pipe:: Invalid data found when processing input if the error is because of the vulkan version of my gpu I'll have to wait for a version of RIFE v4.7 and 4.8 to come out from "nihui/rife-ncnn-vulkan"did not work.

I don't know much about this code "gpu_thread=16" in the other version of "HomeOfVapourSynthEvolution/VapourSynth-RIFE-ncnn-Vulkan" I used "gpu_thread=2 and 16" and it didn't make a difference in performance but there were no errors in all rife models but this version of "styler00dollar/VapourSynth-RIFE-ncnn-Vulkan" None of the models have worked for me yet always gives the error pipe:: Invalid data found when processing input if the error is because of the vulkan version of my gpu I'll have to wait for a version of RIFE v4.7 and 4.8 to come out from "nihui/rife-ncnn-vulkan"

styler00dollar commented 10 months ago

pipe:: Invalid data found when processing input is a generic message with no meaning. Can be anything. The error is either in another place in the console or in the piped data. Either look for the real error or look directly in the piped output by piping data into console instead of ffmpeg to see if something is written there. Sometimes error messages get piped. I assume your vapoursynth script is faulty and it is not even related to the plugin.

hooke007 commented 10 months ago

Previously I ran his simplified script here and worked well.

sup = core.mv.Super(clip)
bw = core.mv.Analyse(sup,isb=True)
clip = core.mv.SCDetection(clip,bw,thscd1=600,thscd2=130)
clip = core.resize.Bicubic(clip,format=vs.RGBS,matrix_in=1)
clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, width=1280, height=720)
clip=core.rife.RIFE(clip, model=9, gpu_thread=2, tta=False, uhd=False, sc=True, factor_num=5, factor_den=2)
clip=core.resize.Bicubic(clip=clip, format=vs.YUV420P10, matrix_s="470bg")
clip=core.fmtc.bitdepth(clip, bits=8)
NenelFX commented 9 months ago

I would like to know exactly what the requirement for "VapourSynth-RIFE-ncnn-Vulkan" is

because the error is probably the Vulkan version of my GPU

styler00dollar commented 9 months ago

If it would be vulkan related you would see something like vk... in the error log. Read what I wrote and debug why your script is faulty.

styler00dollar commented 7 months ago

I will close this due to lack of updates and assume it was user error.

TNTwise commented 7 months ago

I did some testing on this today, and for some reason, the max gpu thread count is 4. My GPU is not being utilized fully, and the vram is sitting at 1.5gb. my only guess is ncnn version, as compiling regular rife-ncnn-vulkan with newer ncnn versions causes a segfault in any scenario. I'll test later for known working versions of ncnn and see if that fixes it. Could be Linux specific tho, haven't tested windows or Mac.

TNTwise commented 7 months ago

tested and nothing, i can only assume a problem with vapoursynth, as the full error reads. Script evaluation failed: Python exception: 'utf-8' codec can't decode byte 0xb3 in position 6: invalid start byte

Traceback (most recent call last): File "src/cython/vapoursynth.pyx", line 3124, in vapoursynth._vpy_evaluate File "src/cython/vapoursynth.pyx", line 3125, in vapoursynth._vpy_evaluate File "render.py", line 19, in clip = core.rife.RIFE( ^^^^^^^^^^^^^^^ File "src/cython/vapoursynth.pyx", line 2860, in vapoursynth.Function.call UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb3 in position 6: invalid start byte

Failed to recognize file format. Exiting... (Errors when loading file)

I tried to compile older vapoursynth versions, but they dont compile on linux due to fexceptions not being enabled somewhere, I will still look into this, but i am not that good with c++ or vapoursynth in general.

styler00dollar commented 7 months ago

Tried vapoursynth-git-R65.32.gcac1a7a3-1, ncnn version 1.0.20240122 and gcc 13.2.1 on arch and it works for me. 2 threads result in close to 100% gpu usage on my 4090. This error happens if you select a cpu device and try to use multiple threads, but it works with one thread. With a gpu it should work without problems.

NenelFX commented 5 months ago

Hello, would you be able to do a build with this file? meson.build.txt meson.build.2.txt