k4yt3x/video2x

Artifacts still persist!

Closed this issue · 21 comments

Pretty great effort so far (see pic 1), but something is very wrong with how this decodes some videos. I did an upscale of a live-action video and it appears to be perfect, whereas an animated video is unwatchably bad with artifacts (see pic 2).

2024-11-06 09_06_39-from

2024-11-06 18_27_28-e01) Utopia or Deuteranopia processed 1 mp4 - VLC media player

P.S. These were both done using default settings with Realesgran Plus.

I don't think the issue is with the video itself. The reason why you're getting these artifacts is likely due to the upscaled video being too large, and hardware decoding tends to produce these artifacts when the video is too large. Try turning off hardware decoding and the artifacts should be gone.

I don't think the issue is with the video itself. The reason why you're getting these artifacts is likely due to the upscaled video being too large, and hardware decoding tends to produce these artifacts when the video is too large. Try turning off hardware decoding and the artifacts should be gone.

NOPE - the one that came out fine, and other were both normal SD sources and the live action movie (that came out fine) was 2+ hours long, while the cartoon was only 15-minutes. AND I DID USE Software decoding. If only the logging actually worked here, might get some info, but that window (qt version) doesn't do anything.

THIS REALLY NEEDS proper investigation.

Interesting. If it's not software decoding then it might be some other issue. Could you please provide the following for me to do some tests:

  • Input file for the anime video
  • Your broken output file for the anime video
  • Encoder settings if you changed them

Also fyi, realesrgan-plus isn't meant for anime videos. realesr-animevideov3 is.

It's a bit too late today so I'll investigate tomorrow. You can share with either Google Drive, wormhole.app, Dropbox, or anything similar.

Good to know - will try the Animevideo one. I have a theory - will try it and get back to you. Initially, I had a lot of trouble with the first video (MKV from a DVD) and it wouldn't even start. After converted to MP4, I had no trouble. The animated video here was done long ago in old MP4 (not H.264). I want to reconvert it to really high-level H.264/265 and retry it. I suspect the optimizations for H.264/H.265 are so high in modern decoding it fixes a lot of this. Will let you know how it goes and/or put the stuff up you requested.

IT WORKED! The issue is solved. The animated video was converted from DVD Ages ago in old MP4 and when converted to an intermediate H.264, the issue is GONE!! So anyone running into artifacts might want to try converting to H.264 in Handbrake or VLC before scaling. Fixed all the issues.

I'm having the same problem on files that were already natively h264. Is there no way to run realesrgan-plus at 2x resolution? I've tried using the anime ones but they remove too much detail for my use case.

I'm having the same problem on files that were already natively h264. Is there no way to run realesrgan-plus at 2x resolution? I've tried using the anime ones but they remove too much detail for my use case.

Mine is working fine now. I wonder if it has to do with older versions of FFMPEG that did the encoding? All of my earlier stuff was on a PPC Mac using a very old version of FFMPEG & Handbrake. I wonder if it wasn't standardized quite yet?

@avalbrec I'd still like to get the old file that didn't work if you could. It should be handled correctly so long it can be decoded by FFmpeg. If it didn't then maybe I did something wrong. If you could send it I'll see if I can fix it.

@UntrustWasTaken The realesrgan-plus model only has a 4x version.

@avalbrec also could you give 6.1.1 a try to see if it makes any difference?

@avalbrec I'd still like to get the old file that didn't work if you could. It should be handled correctly so long it can be decoded by FFmpeg. If it didn't then maybe I did something wrong. If you could send it I'll see if I can fix it.
@avalbrec also could you give 6.1.1 a try to see if it makes any difference?

Will upload in the morning. Can also try the newer version and see if it changes anything.

@avalbrec I'd still like to get the old file that didn't work if you could. It should be handled correctly so long it can be decoded by FFmpeg. If it didn't then maybe I did something wrong. If you could send it I'll see if I can fix it.

Here is the file I had trouble with - https://drive.google.com/file/d/1tN8nMaL7DMWRmVtPDyQSMdVTDMrm24Tt/view?usp=sharing is old (pre-h.264 Apple/QuickTime MP4). Works on most things, but doesn't seem to like your decoder. Also, if you have the 6.1.1 version, would be happy to try it on that.

Thanks I'll try your video. 6.1.1 has already been released last night. You can get it on the releases page.

Seems to be running fine on my Linux with A6000:

video
output.mp4

Also fine for my Windows + RTX 4080

video
uod.processed.mp4

What's interesting is that when I decode this video on Firefox it has artifacts:

screenshot

image

Local playback with mpv is fine:

screenshot

mpv-shot0001

So I suspect it's still just with the decoding of the video.

Not sure. BUT all I know is that reconverting it fixed my worries. Thanks again!

OK, I'm closing this issue then if it's no longer a problem.