-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Inaccurate colors #77
Comments
Are you using the BT.709 color space for recording in OBS? It may be set to BT.601 or something by default. I actually remember OBS having incorrect colors by default, having way darker greens than what I recorded on my monitor. |
Updated the lucadalli/mp4-muxer-colorspace repo to demonstrate something that's quite bizarre but very interesting. If the videoTrack frames are drawn to a canvas, and new frames are created from said canvas, the output with mp4-muxer is the same, but with MediaRecorder the recording displays the correct colors! canvas-mediarecorder.mp4canvas-mp4muxer.mp4 |
@lucadalli I appreciate the in-depth digging you're doing! I was down this color space rabbit hole a while ago, as noted in the issues you sent. I may need to add the I'll need to play around with it. |
Made some local modifications to my muxer to add the This uses the following values in the colr box: These values I obtained by using the tables specified in the "Colour" section here combined with the colorSpace object within the decoder config: I also tried setting them all to 1, which is what the OBS export did. Results in this file: Both of the greens don't appear to match the actual green I see on the site. So, I'm not sure if I'm doing anything wrong here, or if this is a Chromium issue once again. Perhaps it would be good to report this specific case to them, too? Last time I reported it, it was WebP and VP9-related. |
I think it's best if we start sharing images of side-by-side comparisons because in my case both of your video files accurately show the colors on the website! 😵💫 Edit: When viewed on my phone (Pixel 8), the greens are dull and do not match the colors on the site. |
@Vanilagy The color space of the VideoFrame created from canvas is Could you try put those values in the |
I just released a new version 5.1.4 which contains this |
@lucadalli How's it going? |
@Vanilagy Tried with 5.1.4, no change. I created a bug report on the Chromium Issue Tracker. In the meantime I'm converting to YUV420 manually as per your comment. |
Compared below are two 8-bit MP4s.
The first one is recorded with OBS and displays colors correctly, the second one is muxed with MP4-muxer as shown in https://github.com/lucadalli/mp4-muxer-colorspace/blob/main/src/main.ts
As you can see, the greens in the videos muxed with MP4-muxer are a lot more dull.
While investigating the issue I came across these issues/bug reports reported by yourself. I'm thinking this could be somewhat related?
w3c/webcodecs#598
https://issues.chromium.org/issues/40061457
FFprobe output when checking bit bepth (both 8)
![image](https://private-user-images.githubusercontent.com/39853447/388595379-1ab2171f-19f4-45a7-b56f-3c16111a18bc.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1OTQwMjQsIm5iZiI6MTczOTU5MzcyNCwicGF0aCI6Ii8zOTg1MzQ0Ny8zODg1OTUzNzktMWFiMjE3MWYtMTlmNC00NWE3LWI1NmYtM2MxNjExMWExOGJjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDA0Mjg0NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ2NWIyOTBlNDBjNzgwNzdjZjkwMjI5NTYyZGE3MDYxNzgzNzg4NWZjZDZmYzQ0ZmFiNmM2Nzk0ZDExM2RhOTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.dQReBEtwkMF8VU_FFY-kgW03LTpMo3HskEMnRw02cD4)
obs-color.mp4
mp4-muxer-color.mp4
The text was updated successfully, but these errors were encountered: