-
-
Notifications
You must be signed in to change notification settings - Fork 900
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
Support for Linux #74
Comments
I originally wanted to design this program for Linux, but it's way harder to setup waifu2x on Linux. If you have any documentations on easy waifu2x implementations for Linux, please post them here and I'll make video2x Linux compatible. |
We can still keep this open as a long-term project. |
@k4yt3x I looked through AUR packages in my arch linux, there were:
So, I suppose that both waifu2x and waifu2x-converter-cpp are cross-platform. The problem is that linux users may install any possible dependecies by themselves. In that way, I suggest you to write separate shell script for bash/ksh/etc which will search for it and generate configuration for this system. For example, P.S. As I mentioned before, ask me if you need help with setting it up for linux or testing. |
I'll try to install it and look for some manuals or something |
Just throwing in my +1 for this. Only reason I'm running a Windows VM at the moment is for this alone and it'd be nice to trim the fat on my VM box and run a barebones *nix install with the GPU passed to it. Looking at the documentation on the packages listed above it does appear the upstream waifu2x package that they pull from supports CUDA so it should be good to go. So either someone can see if it is available in their repo (as Smarthard mentioned, Arch has it and looks to be pretty up to date. I haven't been able to confirm debian or Ubuntu have it in-repo) or just simply 'compile' it which seems to not even need that and boils down to just installing its own pre-requisite packages. Personally if it comes down to a concern over ease of install I'd do like most other *nix projects and just say 'this is a pre-req, go to this git project and install it'. But that's just me. By now this is something I have come to expect with most *nix projects on github. |
@cr08 for sure I will add Linux support. I know it's harder to setup, but I'm personally more willing to run this kind of applications on Linux. The only problem here is that it would take a lot of time to develop and test the changes. |
Update: what do you guys think about this? https://github.com/nagadomi/waifu2x-caffe-ubuntu/blob/ubuntu/INSTALL-linux.md |
@k4yt3x well, this project seems to be no more maintained - the latest commit was in May, 2017. Maybe it would be better to use I've found an issue with Arch PKGBUILD. But nothing interesting there and I still don't know how to simplify installation process for debian-family or whatever else Linux distro. However, waifu2x-converter-cpp from AUR has installed easily and works out of the box. P.S. I think it's nothing to worry about if video2x couldn't run at any Linux right away. We just can start from setting it up and testing at Arch Linux and after it continue to add support for others. |
For the testing setup I recommend you to use Manjaro Linux - it's installation and configuration not take too much time like it would be with Arch. But it's arch-based distro, so it compitability with Arch is 100% and with AUR too. |
I personally use Debian-based system a lot, so is Debian my daily OS, so I understand Debian family better than Arch. I might just start with Debian and see how far I get. Though if Arch has an already-built-package, I might try that out as well and see how well it works. |
Just investigated, DeadSix27/waifu2x-converter-cpp supports linux builds, and already has AUR builds. |
Take a look at https://github.com/nihui/waifu2x-ncnn-vulkan. |
@k4yt3x |
@hirios That would have to come after porting this project to Linux. One step at a time. |
I've been using Video2x on Mint 19.2 (Ubuntu 18.04) for a bit now without issue. For anyone who wants to run Video2X on Linux it's surprisingly easy. Here are some easy to follow instructions to get Video2X setup on your machine: Install Dependencies (mostly for waifu2x-caffe):
CUDA 10 && CuDNN:(I tried CUDA 9, but couldn't get waifu2x-caffe to work for some sort of reason. I kept getting core dumps.) Build CMake: If CMake is not new enough, you can use snap to update your version: Or if your system doesn't have snap, build cmake from scratch: Graphics Drivers (optional):
NOTE: For driver changes you will need to reboot before running Video2x. CUDA 10: NOTE: I had to add CuDNN: These can be installed by Build waifu2x-caffe-ubuntu:Video2x uses this to do the upscaling.
(Found at: https://github.com/nagadomi/waifu2x-caffe-ubuntu/blob/ubuntu/INSTALL-linux.md Working and obtained on 2019-08-25) Setup Video2X:
Copy waifu2x-caffe to Video2X: (Waifu2x-caffe is not being installed into /usr/local/bin like a normal program, because it requires files in the same folder that I'm not comfortable putting into bin.) Install Video2X's dependencies: Modify Video2X to work on Linux:Video2X is not designed for Linux atm, so I modified some of the code to get it working. By the time you're reading this, these issues might be fixed: Bug fix 1: (required) video2x.json, line 3:
with
video2x.json, line 59:
with
ffmpeg.py, line 33
with
video2x.py, line 230
with
Bug fix 2: (required) ffmpeg.py, line 287:
with
Bug fix 3: (optional) video2x.json, line 86
with
Bug fix 4: (required) open ffmpeg.py, goto line 70
with
Running Video2X:Grab your favorite mkv and type in something like:
|
@ddouglas87 what a waste to put it in an issue. |
Thanks. This is all new to me, so it means a lot to me that you think highly of it.
I would but before that there a few bugs that could be fixed first in Video2X. I'm not on Windows so it's hard for me to test if, most notably, bug 2 breaks Windows. I'll do a pull request. |
I did try going through this last night and was able to at least get to where video2x would run and do the initial video-to-frames stage but once that had completed and started to move on it errored out. I don't have the exact error on hand but it had something to do with a debug logging line that syslog didn't like and the error it gave after a brief google search seemed related to null bytes that syslog doesn't like. Again, the details are really vague this early in the morning and I'll try to get that error message when I can. I also have some cruft on this VM after the last attempt many months ago to try and get video2x working on linux so I may just wipe and start fresh. Good news is both this and my Windows 10 VM are on the same storage disk in Proxmox and the fps rates for the video-to-frames stage shot up over 2x. Windows 10 I was seeing about 60fps on average and on this Ubuntu VM I was seeing about 140-150fps. The storage disk is SSD. Crossing fingers this also translates to even a modicum of better performance in other areas. EDIT: There were also potentially some missing packages not listed in ddouglas87's comment. Again, I want to wipe this VM and start clean and try again figure out how it goes from there. |
We'll see if this can get posted properly. Should be the error I got which is actually on the ffprobe stage. 2019-09-04 11:37:00.063951 [+] INFO: Executing: ffprobe -v quiet -print_format json -show_format -show_streams -i /media/NAS_Downloads/completed/test/E01.mkv
2019-09-04 11:37:00.334633 [+] INFO: Executing: ffprobe -v quiet -pix_fmts
[!] ERROR: An exception has occurred
Traceback (most recent call last):
File "video2x.py", line 403, in <module>
upscaler.run()
File "/home/cr08/video2x/bin/upscaler.py", line 338, in run
pixel_formats = fm.get_pixel_formats()
File "/home/cr08/video2x/bin/ffmpeg.py", line 70, in get_pixel_formats
Avalon.debug_info(pixel_formats)
File "/home/cr08/.local/lib/python3.6/site-packages/avalon_framework/py", line 195, in debug_info
syslog.syslog(syslog.LOG_DEBUG, msg)
TypeError: [priority,] message string |
I'm going to edit/update this particular comment as I go so not to spam this too badly. Clean install of my Ubuntu VM. Used a mini iso for Server 18.04. Only tasks I installed were the base server and OpenSSH server tasks. Those are usually my go-to for a barebones system. Right off the bat two missing dependency that comes up during the cmake step for building waifu2x-caffe-ubuntu is Also for the necessary required frameworks to be installed via Also earlier up the process chain I found on Ubuntu 18.04 I was given the option to use |
@cr08 I have just edited your post to delete the redundant information. It's not even a v2x error, it's error in the printing framework. |
Thanks! I wrote the guide off of memory. I was worried there would be more errors. I have
Oh, I totally forgot that bit. doh!
You can use your favorite package manager, like snap, or brew, or conan or whatever, but I decided to not mention installing a package manager just to install cmake. It may be a bit quicker if snap installs binaries as the build is a bit slow for cmake, but I'm hesitant to change the guide on this one. What do you mean you were given the option to use snap? Did you google building cmake and snap came up? I admit I haven't heard of snap until now. |
The actual step of running CMake for that portion it was failing on some python related items, I forget the entire message but it did mention
It appears to be built into Ubuntu out of the box or at least a stub for snap exists. Just as a check right after the install was completed and I logged in I just ran |
Thanks. Added
I just looked it up and it's supposed to be on Ubuntu 18.04. I'm not sure why my system doesn't have it. I'll update the guide. Thanks for all the help. :) |
Good news is with all the above accounted for and commenting out line 70 of ffmpeg.py (as just a test and it appears to be purely a debug note/comment) it is now to the frame upscaling stage and processing accordingly. I imagine the later stages of creating the output MKV and transferring tracks will go off without much fanfare as that all falls on ffmpeg now. I should note just for completeness that in my case I left out the optional modifications since I only ever process one video at a time so don't have a need for concurrent instances of video2x. |
Also as a fun tidbit for some users: If you are like me and running a headless VM and needing to do all this through SSH, you'll eventually find that Nvidia's developer site when trying to get the CuDNN libs it will prevent you from doing so via wget because it needs you to log in first for authentication. Found this particular thread on Nvidia's own forums and a couple posts down one user recommends an extension for chrome which is linked therein which will let you track down an authenticated link through Chrome on another device which you can then feed to wget. Very likely you could also do this through Chrome's developer tools as well. https://devtalk.nvidia.com/default/topic/1002046/download-cudnn-via-wget-or-curl-/ |
I'll personally just download it onto my workstation and sftp it onto the server, or export my browser cookie into JSON and load it into curl. |
This is a bug and will be addressed in either future releases of Video2X or future releases of the Avalon Framework. |
No root access , No apt command [Environmet variable]
This is what I install: [Install Deependencies] cmake + openssl if your cmake version is lower than 3.12.2, this may happen when you ./configure the caffe, because CUDA 10.0+ requires at least CMake 3.12.2+
opencv
m4
libtool
autoconf
gettext
help2man
texinfo
bison
indent
flex
doxgen
hdf5
ffmpeg ( I think this is the hardest package to build-full, but I found a script to auto build )
[Build waifu2x-caffe-ubuntu]
find this file and edit it
add this line
[Video2x]
Next steps is same as for other linux server you may missing something else, but these instructions can still be a good reference. |
@ddouglas87 @28598519a I will be closing this issue right now since Linux support has already been added. Since your documentation could potentially be really helpful for the community, would you be interested to add them to v2x's wiki page? |
√ |
Ubuntu 18.04
I cant seem to find where 72 is being set so I can change it.. thoughts? |
@gateway I did some searches, here's what I got
|
Fedora has built package of |
Ok, since the built rpm of |
@jeffshee Is that still happening? https://src.fedoraproject.org/rpms/waifu2x-converter-cpp |
@romulasry I just reinstalled the package version and tested, seems no more issue. |
FYI, under the context of v2x, we're making Python bindings for all *-ncnn-vulkan's. Distro won't be a concern in the future either, it should work for all platforms. |
Description
As for now it can only run on Windows will be there any update to support linux?
Sources
https://github.com/k4yt3x/video2x#prerequisites
The text was updated successfully, but these errors were encountered: