Color Format and Color Range and Lossless Understanding

jasonseeb

New Member
First off, hello! This is my second time posting here, with the first time back in 2020. I figured I would re-introduce myself. I have been streaming/recording for about four years now. I usually search here or on Reddit for my answers, but I have some questions that I could not find clear answers to.

Some background:
I stream one scene and record two separate scenes for gameplay and camera on my dual PC setup. I'm using NVENC HEVC(RTX 4090) and possibly X264(i9-12900KS) for the stream, depending on GPU usage.

1. I intend to record in I444 color format. I understand the stream will still be NV12, but at an increased CPU usage, correct?

2. I intend to record in the full-color range. However, my understanding is that the stream needs to be limited. Will the stream be sent correctly?

3. I saw somewhere that I444 should use main10 for the encoder profile since it would be YUY for lossless, while other places say main10 is only for HDR. Should the profile for recording be main10 for lossless with I444?

4. Is the 4090RTX capable of BGRA?
 

Suslik V

Active Member
Because, answers may depend on version of OBS you are using and selected parameters of encoding. You can make new Scene Collection and new Profile just for test recordings.

On the forum only few threads mentions high-end equipment. Next threads only for example:
a bit older - https://obsproject.com/forum/threads/4k-60fps-lossless-recording-not-doable-on-my-hardware.176004/
similar equipment - https://obsproject.com/forum/thread...ror-occurs-with-certain-color-formats.176240/

About colors and conversions. If only 8-bit recordings needed then you can try test charts: https://obsproject.com/forum/resour...t-color-range-settings-guide-test-charts.442/ thus you can get the answer to "are colors OK?" in all stages of your production (this also may become the answer to question #2).
 

jasonseeb

New Member
@Suslik V
Thank you for the informative threads you posted. I want to record and stream at the same time. I did a test stream using this online test https://www.eizo.be/monitor-test/ (the gradients test). Full color range was a much better match to the source than using limited, at least with I444 for color format.

For future reference, I am on Windows 11 using OBS 31.0.0, and the capture card is the Blackmagic Design Decklink Quad HDMI.
 

DayGeckoArt

Member
I record in 4:4:4 with the main profile. I use HEVC and CQP set to 20 to 30 depending on how much quality I want and the content. As far as I know, Main10 is for 10 bit color. I just realized I do have my monitor set to 30 bit color so maybe I should be using Main10!
 

Suslik V

Active Member
I did a test stream... Full color range was a much better match to the source than using limited...
So, the Full range in OBS settings did the difference while streaming service accepts only Limited?! I think, you need to analyze the results. Because I don't understand what you've compared.

The limited range itself is not so awful. The real use case may mask any differences. For example, this image is result of conversion from Limited range to Full (8-bit) that every media player do on the fly: https://imgur.com/a/OaKIXnP Until you see original it is very hard to say that the original was limited range (at least, I cannot. I need side-by-side comparison).

Side note. As far as I understand, Windows doing all math for its desktop in 16-bit per color component precision when more than 8-bit selected, thus all these 10-bit, 12-bit etc are re-scaled anyway to match the output (the display device).
 
Last edited:

jasonseeb

New Member
@Suslik V

Setup:
Gaming PC
RTX 4090

Streaming PC
Blackmagic Design Decklink Quad HDMI

I use HDMI out to the capture card. It is seen as an extra monitor.

NVIDIA control panel on the gaming PC is as follows for the capture card.
1734099189885.png


Capture card setup on streamPC
Source is "Blackmagic Device"
1734100472718.png


OBS Stream Setting
1734100746047.png


OBS Original Screenshot from StreamPC
Screenshot 2024-12-13 08-40-38 Stream.png


OBS Advanced Video Setting Limited
1734101465460.png


Stream Screenshot Limited
1734101182065.png


OBS Advanced Video Setting Full
1734101605734.png


Stream Screenshot Full
1734101824049.png


Because I don't understand what you've compared.
Full looks more like the original by far. I'm not sure if this answered your question as to what I was saying. Crazy banding on the limited setting.
 

Attachments

  • 1734100709667.png
    1734100709667.png
    164.3 KB · Views: 9

jasonseeb

New Member
I record in 4:4:4 with the main profile. I use HEVC and CQP set to 20 to 30 depending on how much quality I want and the content. As far as I know, Main10 is for 10 bit color. I just realized I do have my monitor set to 30 bit color so maybe I should be using Main10!
Thanks for the information! Much appreciated!

I'm still looking for the answers to any of the four questions I asked.
 

jasonseeb

New Member
1. I intend to record in I444 color format. I understand the stream will still be NV12, but at an increased CPU usage, correct?

2. I intend to record in the full-color range. However, my understanding is that the stream needs to be limited. Will the stream be sent correctly?

3. I saw somewhere that I444 should use main10 for the encoder profile since it would be YUY for lossless, while other places say main10 is only for HDR. Should the profile for recording be main10 for lossless with I444?

4. Is the 4090RTX capable of BGRA?

I'm going to document some of my answers as I find them.

1. I do not know how to tell what format is being streamed (NV12 or I444), depending on what I select in the Advanced Video Settings of OBS. I was able to see a difference in CPU usage. There is about 3-4% more CPU usage when the Color Format is I444 versus NV12. I was streaming the same static Scene for both formats. I may see an increase in CPU usage between the two formats had I used a changing Scene instead of a static one. I tested each one four times just in case it was an anomaly.
 

Suslik V

Active Member
As for Limited. Banding is normal. It is always like this for conversion from Limited to Full. It also present in the example image I posted above - it almost not possible to notice, but believe me - it is there.
 

jasonseeb

New Member
1. I intend to record in I444 color format. I understand the stream will still be NV12, but at an increased CPU usage, correct?

2. I intend to record in the full-color range. However, my understanding is that the stream needs to be limited. Will the stream be sent correctly?

3. I saw somewhere that I444 should use main10 for the encoder profile since it would be YUY for lossless, while other places say main10 is only for HDR. Should the profile for recording be main10 for lossless with I444?

4. Is the 4090RTX capable of BGRA?

I'm going to document some of my answers as I find them.

1. I do not know how to tell what format is being streamed (NV12 or I444), depending on what I select in the Advanced Video Settings of OBS. I was able to see a difference in CPU usage. There is about 3-4% more CPU usage when the Color Format is I444 versus NV12. I was streaming the same static Scene for both formats. I may see an increase in CPU usage between the two formats had I used a changing Scene instead of a static one. I tested each one four times just in case it was an anomaly.

2. The stream is sent as is, it would seem from my results in the post above.
The surprising find for me was the Limited Color Range resulted in a considerable downgrade from the source image. The Full Color Range seemed to be perfect.

3. TBD

4. TBD
 

jasonseeb

New Member
As for Limited. Banding is normal. It is always like this for conversion from Limited to Full. It also present in the example image I posted above - it almost not possible to notice, but believe me - it is there.
"It is always like this for conversion from Limited to Full"

I'm kind of lost and would like some clarity please. What is being converted from Limited to Full in what I said I'm doing?

Also, are you aware of how to see how the stream was encoded from OBS in a log file or something?
 

Suslik V

Active Member
What is being converted from Limited to Full in what I said I'm doing?
Base.
The "Limited" means that data saved and transferred at lower precision than "Full". This can be done by limiting full range [0..255] for each component of the color for the selected pixel. To show "Limited" range video on PC screen (PC screens, unlike TV-sets, mostly "Full" range devices) media player converts "Limited" ranges [16..235] to "Full" [0..255] ranges.

OBS grabs PC screen, so this is "Full" range source. When you set OBS base canvas/output to compose "Limited" range videos then OBS converts grabbed "Full" range to "Limited" on the fly. This "Limited" range transferred to online service you choose ("streaming to"). This service delivers "Limited" range videos to your viewers. Then internet browser of each PC of each user converts this "Limited" range video to "Full" range on the fly, so it can be displayed on PC screen without shadowing bright areas. Who watches your videos on TV-set still watches "Limited" range as is. But in both cases perception of the video is the same.

Conclusion.
It is not like you doing something wrong - it is like this by nature, by math, by logic of the engineering. The banding should present.

Also, are you aware of how to see how the stream was encoded from OBS in a log file or something?
I'm not aware. I need to look into source code to find if some additional logging was added recently.

I do not know how to tell what format is being streamed (NV12 or I444)
You can use "same as stream" encoder setting for local recordings and visually determine what was transferred online (by viewing local recording). Of course, you need to stream test images (test charts), have trained eyes and well working media player (VLC or mpv player).
About test images. I posted some links above (free charts for 8-bit per color component devices), but in general you can look in: https://obsproject.com/forum/resources/categories/guides-obs-studio.8/ for color format guide.
 

koala

Active Member
Crazy banding on the limited setting.
Not really. It's not visible if you don't explicitly look for it. Even less for moving images and not still images.

Using limited instead of full means about 15% less data to transfer, so it's the same effect as a boost of your bitrate by 15%. With 15% more bandwidth, your encoder is able to encode more finer details, so the overall quality improves. You sacrifice a small bit of banding to achieve a higher encoding quality in general.
 

jasonseeb

New Member
Base.
The "Limited" means that data saved and transferred at lower precision than "Full". This can be done by limiting full range [0..255] for each component of the color for the selected pixel. To show "Limited" range video on PC screen (PC screens, unlike TV-sets, mostly "Full" range devices) media player converts "Limited" ranges [16..235] to "Full" [0..255] ranges.

OBS grabs PC screen, so this is "Full" range source. When you set OBS base canvas/output to compose "Limited" range videos then OBS converts grabbed "Full" range to "Limited" on the fly. This "Limited" range transferred to online service you choose ("streaming to"). This service delivers "Limited" range videos to your viewers. Then internet browser of each PC of each user converts this "Limited" range video to "Full" range on the fly, so it can be displayed on PC screen without shadowing bright areas. Who watches your videos on TV-set still watches "Limited" range as is. But in both cases perception of the video is the same.

Conclusion.
It is not like you doing something wrong - it is like this by nature, by math, by logic of the engineering. The banding should present.
Your conclusion is valid because I did not think I was doing something wrong. Sorry if I made you believe that.

I was confused by what you meant from "Limited to Full". I needed more information because it was one sentence, and I was misinterpreting it because I lacked knowledge. You have provided many details of what you meant, and I fully understand. Thank you for that!

You can use "same as stream" encoder setting for local recordings and visually determine what was transferred online (by viewing local recording). Of course, you need to stream test images (test charts), have trained eyes and well working media player (VLC or mpv player).
About test images. I posted some links above (free charts for 8-bit per color component devices), but in general you can look in: https://obsproject.com/forum/resources/categories/guides-obs-studio.8/ for color format guide.
This is also very helpful, and I'm upset with myself for not thinking of doing that, lol. Thank you again!
 

jasonseeb

New Member
Not really. It's not visible if you don't explicitly look for it. Even less for moving images and not still images.

Using limited instead of full means about 15% less data to transfer, so it's the same effect as a boost of your bitrate by 15%. With 15% more bandwidth, your encoder is able to encode more finer details, so the overall quality improves. You sacrifice a small bit of banding to achieve a higher encoding quality in general.
I was wondering about the data saved from using limited versus full, and I thank you for the information! I figured you would save some bandwidth to be used for other areas of the video.
 

jasonseeb

New Member
Update #3

1. I intend to record in I444 color format. I understand the stream will still be NV12, but at an increased CPU usage, correct?


I streamed in NV12 and I444 with a static image. I did it four times in each format to increase the chances it was not an anomaly. I saw about 3-4% more usage when the Color Format is I444 versus NV12. This number may be different if a moving image was used but this satisfied part of my question.

Thanks to @Suslik V for giving me information on having the Recording Settings use the Stream Settings for encoding. By doing this,
the resulting video was NV12, even if the setting was I444, as determined by MediaInfo. This leads me to believe the stream is sent to Twitch with the NV12 Color Format.


2. I intend to record in the full-color range. However, my understanding is that the stream needs to be limited. Will the stream be sent correctly?

I used the same testing method for Color Format to check for Color Range. The resulting video was in full color, as determined by MediaInfo. This leads me to believe the stream is sent to Twitch with Full Color Range.


3. I saw somewhere that I444 should use main10 for the encoder profile since for YUV it would be closer to lossless than the main profile. Other places say main10 is only for HDR. Should the profile for recording be main10 for lossless with I444?

TBD (Any suggestions?)


4. Is the 4090RTX capable of BGRA?
I did a test recording using the BGRA Color Format. The resulting video was the same as if I used I444, as determined by MediaInfo. This leads me to believe this card does not support BGRA.
 

jasonseeb

New Member
Of course, you need to stream test images (test charts), have trained eyes and well working media player (VLC or mpv player).
How does VLC play the video properly? I have been trying to find this answer, and I understand this is not a VLC forum. Please don't feel inclined to answer.

I have been using the latest Media Player Classic, which worked well. Thank you for the "mpv player" suggestion! I was unaware of this program, but it worked well. VLC shows me banding.
 

Suslik V

Active Member
@jasonseeb about media players - use what works better for you.

4. The BGRA format encoding that utilizes hardware units from GPU (aka "NVENC") not available in OBS v31.0.0. Available formats for NVENC for the mentioned version of OBS: 4:4:4, 4:2:0 for 8-bit and 4:2:0 for 10-bit (no matter what your card capable of).

3. Internally OBS uses NV_ENC_HEVC_PROFILE_MAIN10_GUID as profile for the "main10" setting and forces 10-bit output for the encoder. That's all. As for the 4:4:4 for 10-bit see p4 (above).
 

jasonseeb

New Member
Update #4
I believe I have all the answers I initially wanted. It was quite a pleasure to have informative responses from @Suslik V @koala @DayGeckoArt
Hopefully, in the future, I can provide thoughtful answers to the questions of others.

1. I intend to record in I444 color format. I understand the stream will still be NV12, but at an increased CPU usage, correct?


I streamed in NV12 and I444 with a static image. I did it four times in each format to increase the chances it was not an anomaly. I saw about 3-4% more usage when the Color Format is I444 versus NV12. This number may be different if a moving image was used but this satisfied part of my question.

Thanks to @Suslik V for giving me information on having the Recording Settings use the Stream Settings for encoding. By doing this,
the resulting video was NV12, even if the setting was I444, as determined by MediaInfo. This leads me to believe the stream is sent to Twitch with the NV12 Color Format.


2. I intend to record in the full-color range. However, my understanding is that the stream needs to be limited. Will the stream be sent correctly?

I used the same testing method for Color Format to check for Color Range. The resulting video was in full color, as determined by MediaInfo. This leads me to believe the stream is sent to Twitch with Full Color Range.


3. I saw somewhere that I444 should use main10 for the encoder profile since for YUV it would be closer to lossless than the main profile. Other places say main10 is only for HDR. Should the profile for recording be main10 for lossless with I444?

Internally, OBS uses NV_ENC_HEVC_PROFILE_MAIN10_GUID as the profile for the "main10" setting and forces 10-bit output for the encoder. That's all. As for the 4:4:4 for 10-bit see p4 (above).
Credit to @Suslik V


4. Is the 4090RTX capable of BGRA?

The BGRA format encoding that utilizes hardware units from GPU (aka "NVENC") not available in OBS v31.0.0. Available formats for NVENC for the mentioned version of OBS: 4:4:4, 4:2:0 for 8-bit and 4:2:0 for 10-bit (no matter what your card capable of).
Credit to @Suslik V
 
Top