Open aaronth07 opened 4 years ago
Try this. https://github.com/TianZerL/Anime4KCPP Witch have a GUI and support GPU acceleration
Hey, i had the same problem. Here is what i did.
@ThoughtfulDev May I ask which options did you use for the compilation and what OS you are on? The default official build for windows does not support -vf=gpu...
@bloc97 yes i noticed that windows does not work. I am using POP OS (Ubuntu basically) and added the mpv ppa (http://ppa.launchpad.net/mc3man/mpv-tests/ubuntu) I didn't compile from source (sorry :D). But i am sure its in the official build from 0.31 onward on Linux at least. The -vf=gpu option is only available on Linux afaik.
This is the mpv version output (0.32 has no bugs for me): mpv 0.32.0 Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects built on Sat Apr 4 05:54:47 UTC 2020 ffmpeg library versions: libavutil 56.31.100 libavcodec 58.54.100 libavformat 58.29.100 libswscale 5.5.100 libavfilter 7.57.100 libswresample 3.5.100 ffmpeg version: 4.2.2
The new filters Ver 3 (the single filters) all work also flawlessly and also when chained.
I havent been able to encode to x265 directly with MPV thought since i get a error about not support 4:4:4. I am not that good with encoding so i just left it at x264 and encode with ffmpeg after upscaling. If you are interested i am currently writing a python script with uses the currently up to date V3 of your shaders. It extracts the audio, subs of a file, scales it, then adds the audio and subs back and then converts it back to x265 if desired. But it still needs some work.
Edit: here is the commit which adds the gpu filter: https://github.com/mpv-player/mpv/commit/90df6c79c9400d3f1c711ef5696324908a5126ce
@ThoughtfulDev I see... I'm currently deciding if I am going to do a full Tensorflow+ffmpeg+Python port of Anime4K for easier use in non-real time applications, and I'm not entirely confident that mpv will introduce gpu encoding for all platforms. I guess I will simply start working on the port first and see from there...
@bloc97 seems like a good Idea. With the keras implementation in tensorflow integrated this shoulnt be that complicated instead of pure tensorflow (god i hate that).
Good luck. Looking forward to that.
@ThoughtfulDev Do share your script! BTW, what does vf=gpu..
do? If I am on a CPU-only laptop, is that even needed?
@NightMachinary i am not ready yet. I have to do some tests still. You need to use the vf=gpu option since the shaders need to be rendered on the GPU. Thats why you need mpv >= 0.32 since if you want to transcode the shader run on the gpu and then encode on cpu (x264 yuv444 - needs reencoding after that to x265 with ffmpeg to yuv420) or encoding on gpu nvenc(x265 already yuv420).
@bloc97 and @NightMachinary i just published my repository with the scripts: https://github.com/ThoughtfulDev/Anime4K
@ThoughtfulDev I see... I'm currently deciding if I am going to do a full Tensorflow+ffmpeg+Python port of Anime4K for easier use in non-real time applications, and I'm not entirely confident that mpv will introduce gpu encoding for all platforms. I guess I will simply start working on the port first and see from there...
Hope to get out early, my computer configuration is very low, can not use Anime4K smooth real-time, and transcoding can be better shared
You can have a look at my repository Anime4K which does offline encoding using the Anime4K shaders. https://github.com/ThoughtfulDev/Anime4K
You can have a look at my repository Anime4K which does offline encoding using the Anime4K shaders. https://github.com/ThoughtfulDev/Anime4K
Thank you very much! But I tested that this doesn't work on my Windows pc, and I'd appreciate your answer anyway.
Just to note about X264 encoding. Apparently you can do "i-frame only" encoding. So it saves a picture for each frame. It is incredibly expensive in terms of video size, but it's quality is technically infinite and you can use that to encode into other formats.
I will certainly try out your MPV solution with that and see if it works.
https://github.com/AaronFeng753/Waifu2x-Extension-GUI
Let's you encode with anime 4 land a number of other things, could be a good example for making a standalone one.
@ThoughtfulDev I see... I'm currently deciding if I am going to do a full Tensorflow+ffmpeg+Python port of Anime4K for easier use in non-real time applications, and I'm not entirely confident that mpv will introduce gpu encoding for all platforms. I guess I will simply start working on the port first and see from there...
Hello is this possible yet?
I have no interest in real time encoding, yet a encoder to re-encode anime in an upscaled would be extremely useful. Is there a way to do this with Anime4k?