Skip to content
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

Color shifts in video exports #20

Open
painterize opened this issue Aug 23, 2024 · 6 comments
Open

Color shifts in video exports #20

painterize opened this issue Aug 23, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@painterize
Copy link

painterize commented Aug 23, 2024

Your project is fantastic, however the color of the ProRes export does not exactly match the color of the source.

I'm using a MacBook Pro 2019.

In my tests, it's mainly shades of blue which seem to noticeably shift in the export.

Can the next version please have this fixed? In comparison, the Windows version of the "Hybrid" application by Selur can process RealSR and create exports which exactly match the source video color.

@TNTwise
Copy link
Owner

TNTwise commented Aug 23, 2024

Some models can have color shifting, does it happen with any other encoder?

@painterize
Copy link
Author

painterize commented Aug 23, 2024

I tested the same RealSR JPEG model in your app and in the Hybrid (Windows) app.

If the encoder in your app is always ffmpeg, then maybe the command line needs extra parameters which carry over the exact colour metadata of the source?

Hybrid uses Vapoursynth scripts which seem to include lines which maintain color properties (I don't fully understand this stuff unfortunately).

@wabbitwabbitwabbitwabbit
Copy link

wabbitwabbitwabbitwabbit commented Nov 8, 2024

Does rife have color shifting?

Here is what I've done
yt-dlp this video
https://www.youtube.com/watch?v=pSsUhlXdMmQ

Run REAL-Video_enhancer interpolate on it with pytorch, rife 2.22-lite

Opening both the downloaded video and the interpolated video; pausing them both on the first frame.
When alt tabbing between them both, I can see a noticeable color shift.

I don't know if this is a rife thing, or a RVE(real-video-enhancer) thing.

@TNTwise TNTwise added the bug Something isn't working label Nov 17, 2024
@charliecao02
Copy link

Late to this discussion but I think the problem might be that ffmpeg by default converts RGB to YUV using bt601, regardless of the resolution (at least according to this article I found).

I noticed some videos I was interpolating had noticeable color shifting, so I tested this by adding -colorspace bt709 to the ffmpeg write command of FFmpeg.py in the backend here, and it fixed the color shift issue I was having

This is kinda just a bandaid for bt709 YUV videos, to fix the problem entirely you'd prob need to ffprobe to find the colorspace of the video first then encode the output video to that same colorspace (or use a library to find the colorspace, tho idk any)

@painterize
Copy link
Author

Late to this discussion but I think the problem might be that ffmpeg by default converts RGB to YUV using bt601, regardless of the resolution (at least according to this article I found).

I noticed some videos I was interpolating had noticeable color shifting, so I tested this by adding -colorspace bt709 to the ffmpeg write command of FFmpeg.py in the backend here, and it fixed the color shift issue I was having

This is kinda just a bandaid for bt709 YUV videos, to fix the problem entirely you'd prob need to ffprobe to find the colorspace of the video first then encode the output video to that same colorspace (or use a library to find the colorspace, tho idk any)

Could this amendment be made to the current working MacOS version please?

@TNTwise
Copy link
Owner

TNTwise commented Dec 31, 2024

I won't make changes to the outdated build, sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants