![]() |
Improving CodeFormer videos - Printable Version +- Selur's Little Message Board (https://forum.selur.net) +-- Forum: Hybrid - Support (https://forum.selur.net/forum-1.html) +--- Forum: Problems & Questions (https://forum.selur.net/forum-3.html) +--- Thread: Improving CodeFormer videos (/thread-3574.html) |
RE: Improving CodeFormer videos - Selur - 13.02.2024 Quote: It is theoretically possible to extend "VsViewer" so that can be launched using the command line like "VSpipe" ?if your rewrite most of it,... yes vspipe should normally more stable than vsviewer. One thing to look at is any anti virus software aside from windows defender,... Quote:CUDA is backward compatible with the previous versions ...are you sure? iirc CUDA 12 isn't always backward compatible (could be wrong there, but I think I read that somewhere when I came out, that it wasn't backward compatible due to aiming for newer cards only,...) Cu Selur RE: Improving CodeFormer videos - Dan64 - 13.02.2024 The question is quite simple. Currently to encode a movie using a Vapoursynth script are available 2 tools: 1) VsPipe.exe 2) VsViewer.exe If you know other tools please tell me which ones they are. I'd like to try to understand how I can extend VsViewer, could you provide the steps necessary to compile the current version ? Thanks, Dan RE: Improving CodeFormer videos - Dan64 - 14.02.2024 I discovered that StaxRip is distributed with a version of ffmpeg compiled with the option "--enable vapoursynth" I copied this version in the folder "Hybrid\64bit\Vapoursynth" and then executed the following command D:\Programs\Hybrid\64bit\Vapoursynth\ffmpeg -f vapoursynth -i CodeFormerTest6-001-BAD-1.vpy -c:v libx265 -c:a copy CodeFormerTest6-001-BAD-1.mp4 The movie was compiled successfully with no errors. In this way it is possible to see also the messages printed by the filters. In this case there were a lot of messages with text: "No face detected. Try to increase upsample_num_times.:14.18 bitrate= 147.9kbits/s speed=0.654x" Probably are all these messages that are creating problems to vspipe. So, no need to change VsViewer. It is just enough to add an option to use ffmpeg instead of vspipe. What do you think ? Dan I tried to use ffmpeg exactly as vspipe, using the following command D:\Programs\Hybrid\64bit\Vapoursynth\ffmpeg -f vapoursynth -i CodeFormerTest6-001-BAD-1.vpy -vcodec rawvideo -strict -1 -f yuv4mpegpipe - | "D:\Programs\Hybrid\64bit\x265.exe" --y4m - -o "outputfile.265" and I got the same problem, but this time with more details regarding the problem. Output #0, yuv4mpegpipe, to 'pipe:': It seems that the tons of messages generates using "dlib" have broken the pipe. Avoiding the pipe will allow to fully encode the movie. P.S. In effect "dlib" is refusing to recognize a face when is not well visible. Vice-versa "retinaface" try to recognize the face in any case, but often the output has a lot of artifacts, try to encode the movie using "retinaface" and you will see the damage introduced by the wrong choice performed by "retinaface". RE: Improving CodeFormer videos - Selur - 14.02.2024 Quote:"No face detected. Try to increase upsample_num_times.:14.18 bitrate= 147.9kbits/s speed=0.654x"Okay, what happens seems to be that your dlib version outputs stuff to std::out which is where the normal processed data is output and piped, thus is breaks the video data flow and breaks the pipe. Seems like this is a problem of dlib. Maybe vs-codeformer can capture these outputs, but I see no way to stop this from breaking the pipes. Cu Selur RE: Improving CodeFormer videos - Dan64 - 14.02.2024 (14.02.2024, 06:40)Selur Wrote:Quote:"No face detected. Try to increase upsample_num_times.:14.18 bitrate= 147.9kbits/s speed=0.654x"Okay, what happens seems to be that your dlib version outputs stuff to std::out which is where the normal processed data is output and piped, thus is breaks the video data flow and breaks the pipe. Is not a problem introduced in my version. Even the not enabled CUDA version is providing exactly the same message, the difference is that the CUDA version write a message every 0.4 secs while the CPU version every 20 secs. I commented all the unnecessary print messages (good only for development) in the filter vscodeformer. I commented out the "print" in the following lines ->face_restoration_helper.py and then cleared the cache. Now the vspipe is working as expected. ![]() I will write to HolyWu to do the same on the version released on "github". Dan P.S. In any case it could be a big enhancement to introduce "ffmpeg" as Video encoder like "nvenc". In this case it will be possible to skip "vspipe" providing to Hybrid a more robust alternative in case of "unknown" problems with filters. RE: Improving CodeFormer videos - Selur - 14.02.2024 Quote:In any case it could be a big enhancement to introduce "ffmpeg" as Video encoder like "nvenc"a. Hybrid already supports this on Linux b. don't see any gain in it compared to NVEncC Quote: In this case it will be possible to skip "vspipe" providing to Hybrid a more robust alternative in case of "unknown" problems with filters.In my eyes, ffmpegs Vapoursynth support is not more stable than vspipe. => not planning to support directly loading the a vapoursynth script through ffmpeg Cu Selur RE: Improving CodeFormer videos - Dan64 - 14.02.2024 I opened the issue to HolyWu: https://github.com/HolyWu/vs-codeformer/issues/7 RE: Improving CodeFormer videos - Selur - 14.02.2024 I wonder whether vs-codeformer code could simply capture those outputs instead of having to modify dlib. RE: Improving CodeFormer videos - Dan64 - 14.02.2024 (14.02.2024, 09:42)Selur Wrote: I wonder whether vs-codeformer code could simply capture those outputs instead of having to modify dlib. The proposed changes are in the vs-codeformer package. I not changed "dlib", so HolyWu should be able to fix this issue. P.S. I attached an archive with the patched filter code. RE: Improving CodeFormer videos - Selur - 14.02.2024 Ah, okay, thought they were in the dlib wheel or package. Cu Selur |