-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use ffmpeg to upscale video resolution with libplacebo? #200
Comments
I have an example of using ffmpeg's libplacebo filter here, relevant snippet:
( So you need to specify a vulkan device with
If your output resolution (libplacebo's |
thanks a lot for your answering!if i don't use |
Seeing GPU usage is a good sign but you should compare the output to the input to ensure that the shaders are working, you should also see that the output resolution is 2x the input resolution. |
Thank you for the reply, but I am still not clear about the specific functions of hwupload and hwdownload. The information I could find only provides simple descriptions of their roles. If I don't add these options, why would the GPU still be occupied? Does this mean adding or not adding these parameters does not affect shader invocation? Or does ffmpeg automatically upload streams to VRAM for processing when handling video and audio streams? If so, what is the significance of manually specifying upload and download? Also, I noticed that if I directly remove hwdownload, there are still no issues. Does this mean hwdownload is unnecessary? |
Discussed in #199
Originally posted by Arc-2023 July 30, 2023
In Vapoursynth, it is convenient to download and use plugins to change the frame rate of videos. However, it seems that using FFmpeg has more limitations (or maybe I haven't found the right method). Anime4K is a video enhancement algorithm suitable for anime and similar videos. In MPV, their plugins can be imported and used for real-time frame rate conversion.
In FFmpeg, how can I use the algorithms in glsl files to change the video frame rate, instead of using FFmpeg's built-in algorithms?
In FFmpeg, i can use libplacebo filters can also be used to apply GLSL shaders. In my tests, using command like:
this leads to noticeable GPU usage, but the output video resolution remains the same as the original.
I can pass in the w and h parameters when calling the libplacebo filter:
This achieves the purpose of super resolution, but is it essentially using anime4k for upscaling behind the processing?
Is it using the upscaling algorithm in libplacebo first, before applying anime4k? How can I achieve my original goal that only use anime4k to upscale?
here's my full command (in python):
The text was updated successfully, but these errors were encountered: