# Retaining RGB color space (saving to local file only)



## ElliotLi (May 15, 2015)

Hi!

I've been playing with the OBS code, trying to figure out how to hack it to retain the RGB color space, in order to do a perfect lossless screen recording (with x264 -qp 0). So far I don't have much a clue yet. Therefore I'd much appreciate it if someone can give me some tips about where I should be looking at, or if this change would require too much hacking to be doable in a short time.

Thanks! Any comments are welcome.


----------



## Sapiens (May 15, 2015)

The latest OBS-MP added support for this sort of thing but you probably want to use I444 instead of RGB with x264, or use the ffmpeg output to pick a different codec.

https://github.com/jp9000/obs-studio/releases


----------



## ElliotLi (May 15, 2015)

Sapiens said:


> The latest OBS-MP added support for this sort of thing but you probably want to use I444 instead of RGB with x264, or use the ffmpeg output to pick a different codec.
> 
> https://github.com/jp9000/obs-studio/releases



That's great, Sapiens! Thanks! I still haven't figured out the differences between OBS-mp and OBS. But anyway, I'm trying OBS-mp now.

I found that I444 output is only in effect when I use Advanced Output Mode; in Simple mode the output file always has 4:2:0 no matter what Color Format I chose in Advanced Video settings. This is a little confusing.

When I figured out and tested everything, I'll try to post a summary.


----------



## Jim (May 15, 2015)

Simple mode only has one encoder for both streaming/recording, so it has to force NV12/4:2:0 with it to ensure that the user doesn't accidentally stream with 4:4:4 (flash/streaming services do not support 4:4:4 decoding so it would come out as black).

Advanced output mode allows you to safely separate the encoding for streaming and encoding, so if you make the recording output use a separate encoder it will allow you to use full 4:4:4 there because it's isolated from streaming entirely.  Otherwise it'll always be converted to NV12/4:2:0 to ensure streaming compatibility.  Kind of an annoying gotcha for users but it's necessary.


----------

