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

Showing incorrect colors #84

Closed
JohhanSam opened this issue Nov 25, 2024 · 6 comments
Closed

Showing incorrect colors #84

JohhanSam opened this issue Nov 25, 2024 · 6 comments

Comments

@JohhanSam
Copy link

JohhanSam commented Nov 25, 2024

The video-compare produces colors that dont match the video.

Video-compare output:
encodeav1
encodehevc

MPV output:
encodehevcMPV
encodeav1MPV

Both videos have been encoded from the same source, both files are 10bit
Source files: HEVC file, AV1 file

I have tried enabling -b but it did not resolve the issue.

@jonfryd
Copy link
Member

jonfryd commented Nov 25, 2024

Try performing color space conversion to sRGB using -T on and see if that resolves the issue.

@JohhanSam
Copy link
Author

Try performing color space conversion to sRGB using -T on and see if that resolves the issue.

They match now, however they are still quite inaccurate the source.

@jonfryd
Copy link
Member

jonfryd commented Nov 25, 2024

Your AV1 video is missing color space metadata, and I suspect that is at least part of the problem. I'm pretty sure the FFmpeg libraries defaults to Rec. 601 (BT.470bg) in this case, which is incorrect for your file. Perhaps mpv uses resolution-based logic to correctly guess the input color space when metadata is missing. Anyway, try this to explicitly use Rec. 709 for your AV1 file:

    video-compare -l setparams=colorspace=bt709 AV1.mkv HEVC.mkv

Your AV1 file's video metadata:
Screenshot 2024-11-25 at 4 59 52 PM

Your HEVC file's video metadata:
Screenshot 2024-11-25 at 5 33 13 PM

@jonfryd
Copy link
Member

jonfryd commented Nov 26, 2024

Can we close this, @JohhanSam?

@JohhanSam
Copy link
Author

Can we close this, @JohhanSam?

Yes. I would suggest adding a simpler way to setting the colorspace for both files, something like the existing (eg -t tv700) but other than that issue solved. Thanks.

@jonfryd
Copy link
Member

jonfryd commented Nov 27, 2024

Yes. I would suggest adding a simpler way to setting the colorspace for both files, something like the existing (eg -t tv700) but other than that issue solved. Thanks.

Good idea, I'll think of something that makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants