TNTwise/REAL-Video-Enhancer

Upscaling Resolution - Suggestion and/or Help

Opened this issue ยท 41 comments

I apologize for posting here, I don't have any issues with the program, it runs beautifully! I only have one suggestion or perhaps getting some help. Is there a way to lower the upscaling resolution? Having the resolution (fixed aspect ratio) of course so there won't be any stretching or black boxes.

I really love this handy tool and I use it daily, it's definitely the best one I proudly have installed on my system.
I would love to see this in an upcoming update!

Once again, I really apologize for posting it here, I found no other way to contact you, or to send this message out. I hope you don't mind.

Thank you!

What are you using to upscale (realesrgan, realsr,etc)? Is it cuda or ncnn? The upscaling resolution is fixed based on model, and the most common ones are 2,3, and 4 times.

Oh, I see, because some videos go beyond 3000-4000+ resolution. I was wondering if there's a way to upscale and improve quality but not letting the resolution go too high, perhaps in the 1440 range, Is this possible?
I am using RealSR - DF2K.
Thank you for replying!

You can use a custom ncnn model for that, there should be an option in settings to install, and then import a model. I converted some to ncnn here, and they are mostly 4x, but you can find models on openmodeldb.info, and if they are esrgan or compact, you can convert them via chainner

The models I converted:
https://github.com/tntwise/universal-ncnn-upscaler

If you have an NVIDIA GPU, i would recommend using the cuda build, and you can use almost any model from there without having to convert

Excellent! I will read that and see if I can get it to work, thank you very much for the help! :)

I don't see a discussion board, so I'll join the casual discussion in this bug report. I literally just asked over at Flowframes for a Linux version, and by sheer coincidence I find this app on Flathub. This is exactly what I was looking for.

Two questions: where can I donate to the project and can you do a Snap version for Ubuntu in addition to Flatpak?

Thanks ๐Ÿ‘๐Ÿป

Answer to question 1: I have not set up donations yet, I may in the future though.

  1. Unfortunately, as it is already difficult to maintain the current versions (appimage, flatpak, cuda, macos), I don't have plans to make a snap package.

Answer to question 1: I have not set up donations yet, I may in the future though. 2. Unfortunately, as it is already difficult to maintain the current versions (appimage, flatpak, cuda, macos), I don't have plans to make a snap package.

Thanks for responding so quickly. Got it, but if you ever do a Snap, I'll gladly pay an extra coin for that. Looking forward to being able to donate to this project. Side note: I just tried launching it on Ubuntu 24.04 (Flatpak), but the app doesn't start. Any known issues on Ubuntu 24.04?

Can you try launching it from the terminal? flatpak run io.github.tntwise.REAL-Video-Enhancer
There are no known issues with 24.04, maybe something went wrong with an update? I have had 24.04 on my laptop and it runs fine.

Can you try launching it from the terminal? flatpak run io.github.tntwise.REAL-Video-Enhancer There are no known issues with 24.04, maybe something went wrong with an update? I have had 24.04 on my laptop and it runs fine.

Sure, this is the output:

flatpak run io.github.tntwise.REAL-Video-Enhancer QObject::moveToThread: Current thread (0xe36f60) is not the object's thread (0x18a1500). Cannot move to target thread (0xe36f60) qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/app/bin/lib/cv2/qt/plugins" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: xcb, eglfs, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx.

This is a common qt issue, but I haven't had it come up in flatpak before... Does the appimage work?

You could try to see if enabling x11 fallback will fix it. This comes up a bunch when I'm running it in my local environment, but this seems like a flatpak issue somehow..

This is a common qt issue, but I haven't had it come up in flatpak before... Does the appimage work?

I'm on X11 (Nvidia), are you on Wayland? Appimage doesn't start either, but I've had that on Ubuntu 22.04 as well. I think I might need to enable support for Appimage here first (wife's computer). This is a fresh install of Ubuntu 24.04 btw.

You could try to see if enabling x11 fallback will fix it. This comes up a bunch when I'm running it in my local environment, but this seems like a flatpak issue somehow..

Ok, how can I enable X11 fallback mode?

I found out how to reproduce, what I think is going on is it doesnt have access to Wayland. Download flatseal off flathub, click on real video enhancer in flatseal, and check Wayland windowing system.

I found out how to reproduce, what I think is going on is it doesnt have access to Wayland. Download flatseal off flathub, click on real video enhancer in flatseal, and check Wayland windowing system.

Oh, so it requires Wayland access even when using it on X11? I ask because I'm on X11 right now.

Sorry, I assumed you were on wayland because you were on ubuntu 24.04, you can enable x11 and x11-fallback the same way. Maybe something went wrong when packaging the latest flatpak version. I will test on x11 in a second.

Sorry, I assumed you were on wayland because you were on ubuntu 24.04, you can enable x11 and x11-fallback the same way. Maybe something went wrong when packaging the latest flatpak version. I will test on x11 in a second.

Thanks! Yeah, I'm forced to use X11 on Nvidia until Nvidia drops the V555 drivers for Gnome 46.1 with explicit sync support. Otherwise Wayland and Nvidia is a mess when gaming etc. but that's going to get fixed soon, and then I'll migrate over to Wayland.

It doesnt seem to launch under x11, which is strange as i have only had issues under wayland. I dont understand why this happens tbh.

The appimage works without issue, i will test the flatpak on other x11 sessions and see, this is a new issue that i was never aware of. Thanks for bringing it up.

It doesnt seem to launch under x11, which is strange as i have only had issues under wayland. I dont understand why this happens tbh.

The appimage works without issue, i will test the flatpak on other x11 sessions and see, this is a new issue that i was never aware of. Thanks for bringing it up.

You're welcome! Thanks for helping out! Chances are this might be an Ubuntu or Flatpak specific issue because I remember seeing something similar in the past. I'll have to go offline for a few hours, but I'll be back later during the day to check on you. Hope you can get it fixed. And don't forget to make a donation page around here. I usually like to donate via Paypal to projects like these. Glad to see someone finally package this type of software in an easy to use format on Linux. I've been looking for something just like this for a while now.

I have been trying for a while now, and it seems to be a versioning issue, but I cant seem to figure out what is causing it. I can go back to an older version the build and it works.. i may drop flatpak support entirely because of weird issues like these that just show up randomly

I got it, some files were being copied to places they were supposed to be copied to. Im updating flathub now.

I got it, some files were being copied to places they were supposed to be copied to. Im updating flathub now.

On mobile right now, got to keep it short. Awesome! Glad you got it working. I hope you never drop Flatpak support because the format in itself is extremely user friendly for normal users. Having apps like these in one of the most popular software centers around is great.

Will test your new version once it gets updated on Flathub and will report back. Thank you! PS: You could add a PayPal donation button in one of the menus of your app. If you do, I can give you twenty bucks for the effort.

Thank you for reporting this. The best way to support me is to report the bugs you catch. I never would have realized this without you pointing it out.

Thank you for reporting this. The best way to support me is to report the bugs you catch. I never would have realized this without you pointing it out.

This is what open interactions like this is all about. You rock. PS: I'd also be willing to gift you something on Steam if you're a gamer. We need more ppl like you doing us a favor in the Linux world, and as such your work is highly appreciated.

Btw, almost forgot, I can confirm that it works now. I just patched and launched the app without issues. I left you a 5 star raiting on Flathub via Gnome Software. Thanks!

I set up a ko-fi https://ko-fi.com/tntwise due to multiple people suggesting a place for donations.

If you have an NVIDIA GPU, i would recommend using the cuda build, and you can use almost any model from there without having to convert

Hello mate, question, I see "Nvidia Cuda" in "manage models" but it's greyed out. I'm using the Flatpak version and I have an RTX A2000 gpu. Is there any way that I can use Cuda? Ty, just donated again. Love the app!

You need to download the cuda binary in the latest release, unfortunately cuda does not work under flatpak Thank you for your support!

Woot, that was fast! You responded within a minute! Oh no Cuda support via Flatpak? Darn it, I like using Flatpak because it's all bundled into one isolated package. Is there an ETA for Flatpak Cuda support? Where can I vote for this? Thx

I will attempt to add it in when flatpak supports cuda, for now cuda does not work under flatpak, due to how it is sandboxed as far as I know.

I could be wrong, and I will try it out before the next release.

Nice, thanks! I was just checking that because I had a similar question for Blender, and it seems like they have worked on it recently:

flathub/org.blender.Blender#8

flathub/org.blender.Blender#147

Not sure if that means that Cuda now generally works with Flatpak, but it might indicate some progress in this direction.

Does Appimage support Flatpak btw?

AppImage is it's standalone thing, similar to flatpak. The cuda binary is not an appimage, it is just a compiled executable, that should just be able to be ran. It is not containerized though, and I can't put the cuda build in an appimage due to size limitations (cuda is currently 7gb uncompressed, GitHub requires files to be under 2 gb) for the ncnn appimage, you could try appimagelauncher, but I have not tested much. Sorry for the inconvenience of this, I am still trying to make everything less complicated.

No problemo! Having a Flatpak version is good enough in my book, and I can always try the tar for Cuda. I'll wait a bit for you to test Cuda with FP before the next release. Thanks!

I apologize for the delay, as development has been rough trying to just get packaging correct for the CUDA build. I apologize that I have been unable to check flatpak comparability with CUDA yet, and I have thought it over what I am going to do. The current size of the CUDA build is 7.1 GB uncompressed. I have not seen a way for users to pick between versions of apps. Due to CUDA's size, I do not want it to be uploaded to flathub, and would prefer it to remain as a standalone binary. Again, I am sorry for this, but I do not want to publish a flatpak version of the CUDA build.

Hi TNT, no worries mate, what you describe does make sense after all (too big to upload). You actually bring up a good point too, it might be a good idea for Flathub to give developers and users alike an option to select a specific version of any given app in order to make a situation like these easily manageable.

That said, would uploading and listing the app via a separate app listing make sense in this case? For example, can you upload the app a second time and just add "with Nvidia cuda support" to the secondary app upload, making it two separate versions that we can choose from separately when searching Flathub?

That is a good idea, while it would require me to submit another app to flathub, I may try that after I can get cuda TensorRT stable and able to be built on Ubuntu 20.04. currently it requires 22.04 to be built, which would be bad for compatibility across all distros.

Sounds like a good plan to me! I'll be here to test when it's ready

After some testing with different builds, I can pretty much confirm flatpak cannot work with cuda.

  1. Space
  2. Distro compatibility, I cant get it to successfully build on ubuntu 20.04 while also working on newer distros
    I am planning a rewrite of this app, to make it more modular and extendable, but that will not come easy or soon. Sorry for this, but I dont think I can comfortably make a flatpak. Thank you for your time and support on this issue.