About lossless recordings.
I wanted to record something completely uncompressed
recommendation:
...use simple output mode and as quality "lossless quality"
Also, there are guides. There you can find other suggestions for lossless recordings with OBS:
Guides for OBS Studio
obsproject.com
About the setting.
what the BGRA setting does...
it sets OBS canvas pixel format to "packed uncompressed format" similar to AV_PIX_FMT_BGRA in FFmpeg and matches GS_BGRA for graphics processing (texture formats list:
https://docs.obsproject.com/reference-libobs-graphics-graphics ). OBS uses graphics acceleration to compose its final image. OBS prepares all frames as textures, combines them and gets final texture that either matches the final format of the output or OBS converts it to requested YUV format. Canvas - is black empty space of specified size where you placing all your graphic sources.
About fallback mechanism.
...why it also choose to record in 4:2:0 when it's picked...
Most popular encoders, media containers and streaming services stores videos as YUV, not RGB. You are using "x264" encoder - it cannot record RGB-like pixel formats. The ".mp4" media container cannot store data that uses RGB-like pixel formats (".mkv" can) - this is by ISO standard for MP4 container. See ISO/IEC 14496-12 for details.
Maybe you want to ask why OBS instead of rising the error attempts to record at least "something"? There are many factors:
- similar fallback mechanism in other utils (re-encoding with FFmpeg - it chooses best compatible pixel format even when format is not specified);
- streaming to popular platforms (no RGB support, only YUV 4:2:0, because RGB-like or YUV 4:4:4 requires a lot of bandwidth);
- developer about custom output: "Video format handling has also changed; it will now attempt to use the closest format to the current format if available for a given video codec." (source: https://github.com/obsproject/obs-studio/commit/d3f92ca5d6bea05f9659cec7524f2a34d03e8c16 was in OBS v0.8.0 long time ago, and there is other examples from other developers: https://github.com/obsproject/obs-studio/pull/3439 that protects this fallback mechanism in other parts of OBS);
- my own opinion: users complains (it doesn't work! fix it! *ing program! I cannot stream! I streamed yesterday but now there is error! etc).
If you only want to know why 4:2:0 and not 4:4:4? Then here is the code where the NV12 (4:2:0) pixel format substitutes incompatible value for x264 encoder, it is very simple algorithm "IF not valid THEN...":
OBS Studio - Free and open source software for live streaming and screen recording - obsproject/obs-studio
github.com