-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
AOM AV1 and SVT-AV1 Encoders Force 4:2:0 Chroma Subsampling (I420) #10463
Comments
svt-av1 only does yuv420 and yuv420p10le, so that is expected. As for AOM, it does have support, and I can confirm your findings. It will be converted to 4:2:0 chroma subsampling. |
Simply adding a case for |
Damn, didn't know that about SVT-AV1...it's much more usable performance-wise than AOM in my experience so far. Relevant issue: https://gitlab.com/AOMediaCodec/SVT-AV1/-/issues/1433 |
It is what it is :) I experimented a bit, but its very annoying to deal with to be honest. There a multiple formats that do work, and multiple that dont. Adding cases/ifs for essentially all formats, for each encoder is pretty meh... If just yuv444 gets added, then it would set the precedent, and I would presume requests would come for yuv422, 10 bit and friends, rgb, what have you. I don't really feel like opening a PR I personally would not merge. If you or someone would make a very compelling argument for just adding a specific one (because it is very useful in x scenario), then maybe :) I personally can't. av1 is a highly compressed format, and aom is not exactly well suited for realtime encoding (OBS use cases), so it makes sense that it would primarily be used with yuv420. At least that is my take. |
So here's my use case. When I stream, I record the VOD separately in significantly higher quality for platforms that support higher quality video than x264 @ 6Mbps w/ 4:2:0. So basically everything that's not Twitch (barring the Enhanced Broadcasting Beta). Up until now, I've just been doing this using x264 with the software encoder because it's fast, compatible, and good quality...but only if you crank CRF/bitrate/whatever. It's not remotely efficient. A recent 3 hour stream I had recorded a VOD with a size of 21GB (CRF=14). Re-encoding that to AV1 after the fact, with roughly the same amount of perceived visual quality (CRF=28), reduces that video's size to ~11GB. Storage, how long it takes to upload to other platforms, and how long it takes to process on those platforms are the key concerns for me here, and re-encoding to AV1 locally takes a while too so I'd prefer to just have OBS record straight to a video file I can use. All of this said...AOM is definitely not fast enough for realtime encoding on CPU right now unless you've got a Threadripper or something. I sort of went into this believing SVT had support for 4:4:4 chroma subsampling because why wouldn't it at this point. So, I'm not sure what the solution is for my use case right now at least. OBS should definitely support 4:4:4 chroma subsampling for everything possible if it's supposed to be the king of streaming/recording software though. Especially if OBS has an option that says "turn this on for 4:4:4" and FFmpeg/the codec supports it. There's not even anything put in the logs about trying to use a Color Format that's not supported by FFmpeg/codec/etc right now. |
Operating System Info
Windows 10
Other OS
No response
OBS Studio Version
30.1.1
OBS Studio Version (Other)
No response
OBS Studio Log URL
https://obsproject.com/logs/ygEQcKH0QiDfJy5p
OBS Studio Crash Log URL
No response
Expected Behavior
Setting the Color Format in OBS to I444 and recording using AOM AV1 or SVT-AV1 should produce a video file with 4:4:4 Chroma Subsampling.
Current Behavior
The output video file has 4:2:0 Chroma Subsampling.
Example video: https://winteris.moe/share/2024-04-01_00-30-33.mkv
MediaInfo output of Example video:
Steps to Reproduce
Anything else we should know?
I think the relevant code is here, but I'm not massively familiar with OBS's codebase:
obs-studio/plugins/obs-ffmpeg/obs-ffmpeg-av1.c
Lines 53 to 65 in 3a10355
Also, setting
-profile high
or-pix_fmt yuv444p
has no effect. While AV1's Main Profile doesn't support 4:4:4, its High and Professional Profiles do:Is this just a relic of the AV1 ecosystem not really supporting High/Professional Profiles until relatively recently?
The text was updated successfully, but these errors were encountered: