obsproject / obsproject/obs-studio
AOM AV1 and SVT-AV1 Encoders Force 4:2:0 Chroma Subsampling (I420)
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 76.4k
- Forks
- 10.2k
- Avg merge
- 4d 23h
- Merged PRs (30d)
- 12
Description
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:
General
Unique ID : 67236476256232977644775950872213691578 (0x329546385FB1E5387F1F6985A5A39CBA)
Complete name : D:\Dev Showcases\2024-04-01 00-30-18.mkv
Format : Matroska
Format version : Version 4
File size : 313 KiB
Duration : 5 s 909 ms
Overall bit rate : 434 kb/s
Frame rate : 60.000 FPS
Writing application : Lavf60.16.100
Writing library : Lavf60.16.100
ErrorDetectionType : Per level 1
Video
ID : 1
Format : AV1
Format/Info : AOMedia Video 1
Format profile : Main@L5.0
Codec ID : V_AV1
Duration : 5 s 900 ms
Width : 2 304 pixels
Height : 1 296 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 60.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Default : No
Forced : No
Color range : Full
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
Audio
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : A_AAC-2
Duration : 5 s 909 ms
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Title : Track1
Default : No
Forced : No
Steps to Reproduce
- Set Advanced > Video > Color Format to I444 (8-bit, 4:4:4, 3 planes)
- Change Output > Output Mode to Advanced
- Set Output > Recording > Video Encoder to AOM AV1 or SVT-AV1
- Press Start Recording
- Observe the output video file has 4:2:0 Chroma Subsampling upon Stopping Recording
Anything else we should know?
I think the relevant code is here, but I'm not massively familiar with OBS's codebase:
https://github.com/obsproject/obs-studio/blob/3a1035576eb6a7c60c1757b3498d97da5d7bfb3b/plugins/obs-ffmpeg/obs-ffmpeg-av1.c#L53-L65
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with plugins/obs-ffmpeg/obs-ffmpeg-av1.c at the referenced lines, then reproduce the recording with I444 and AOM AV1 or SVT-AV1 using the listed OBS settings. Compare the resulting file's chroma subsampling with the expected 4:4:4 output and determine whether the encoder profile and pixel format are being passed correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- audio-video-rtc
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100