I want to record actully lossless video (full range RGB, no subsampling) , how do I do it?

mzso

New Member
Hello!

I prefer making recordings as it is, so I can re-encode them later to the best effect with settings that are incompatible with real-time encoding.
But I found no way to do this. The Lossless mode in "simple" output settings obviously produces subsampled videos so I didn't look further.
I also tried custom ffmpeg with settings that's needed to encode full-range RGB video, but that also failed. I always got 4:2:0 limited range video.

I usually used UT-video for this in the past, it was fastest and had decent compression rate. But if the AMD HW encoder could be set to lossless I suspect it might be better.
I also want lossless audio, I usually grabbed the the stream as it is, uncompressed.

So, how do I set OBS to record "as it is".
 

koala

Active Member
Use simple output mode, set to lossless recording quality. This will use the lossless UTVideo codec. To get 4:4:4 subsampling with this, set settings->advanced->Color Format to I444. This will create ULH4-encoded video, which is 4:4:4 subsampling.

This will result in videos like this:
Code:
>ffprobe -hide_banner "2021-09-28 13-17-43.avi"
Input #0, avi, from '2021-09-28 13-17-43.avi':
  Metadata:
    encoder         : Lavf58.29.100
  Duration: 00:00:08.63, start: 0.000000, bitrate: 345942 kb/s
    Stream #0:0: Video: utvideo (ULH4 / 0x34484C55), yuv444p(bt709/unknown/unknown), 1920x1080, 345712 kb/s, 30 fps, 30 tbr, 30 tbn, 30 tbc
    Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, 2 channels, s16, 1536 kb/s

Don't set Color Format to RGB. RGB will record true RGB (RLRG variant of utvideo), but will considerably slow down your machine, because there is no GPU hardware acceleration support for this in OBS. If I compare the bitrate of a i444 video with a RGB video, the bitrate is about the same, so I assume the quality is about the same. If 4:4:4 is what you mainly care about, go for I444.

If you record 60 fps video with this, a spinning disk might struggle with keeping up with the data stream. So record such footage to SSD.
 

mzso

New Member
Use simple output mode, set to lossless recording quality. This will use the lossless UTVideo codec. To get 4:4:4 subsampling with this, set settings->advanced->Color Format to I444. This will create ULH4-encoded video, which is 4:4:4 subsampling.

Thanks for the tip, I also set full range video as per my original desire. However this immediately brings up an issue.
Some data is set wrong for the video, because players treat it as limited range, even though the video is in fact full range. So it looks overly dark.
madVR explicitly says "limited range (says upstream)". I can override in madVR, so the video is shown as full range, and it appears properly then.
Don't set Color Format to RGB. RGB will record true RGB (RLRG variant of utvideo), but will considerably slow down your machine, because there is no GPU hardware acceleration support for this in OBS.

I don't understand this. What sort of HW acceleration do you mean? Colorspace conversions and rendering is always done by the GPU, and UT video surely doesn't have hardware acceleration. What's suppposed to be accelerated?
 

mzso

New Member
I tried RGB. The video was correct, but the performance was obscenely bad.

I wonder if 444 video can be made correct by using the "custom muxer settings". (What even goes there?)
Or is the limited/full range info stored in the video stream itself?
 
Last edited:

mzso

New Member
By the way can the container be a problem? OBS seems to use the ancient AVI in "Simple" output mode.
 

koala

Active Member
Player support for full color range is very bad. Many players will always assume partial and show broken colors. Since almost everything only deals with partial range anyway, it is recommended to use partial with every recording.

With hardware acceleration I mean the message that appears in the log if you choose RGB:
00:48:34.619: GPU conversion not available for format: 6
This will not appear with with i444.

Lossless recordings come as avi, yes. I assume this is because of the utvideo codec.

If you ask me, don't record lossless, use partial color range and 4:2:0 subsampling. It's a waste of disk space and a waste of postprocessing time due to the enormous raw video files, and in the end your postprocessed files will end up with these lower settings. Having the same video properties throughout the whole recording+postprocessing+viewing workflow helps minimizing quality loss that takes place with conversions.

Choose "indistinguishable quality, large file size" instead. This is still good enough for postprocessing and much smaller.
 

mzso

New Member
Player support for full color range is very bad. Many players will always assume partial and show broken colors. Since almost everything only deals with partial range anyway, it is recommended to use partial with every recording.

Nah. MadVR with LAV is a tried and tested chain for full range video.
Lossless recordings come as avi, yes. I assume this is because of the utvideo codec.
UT is held just fine within an MKV container.
Maybe AVI is the cause of the problem.

If you ask me, don't record lossless, use partial color range and 4:2:0 subsampling. It's a waste of disk space and a waste of postprocessing time due to the enormous raw video files, and in the end your postprocessed files will end up with these lower settings. Having the same video properties throughout the whole recording+postprocessing+viewing workflow helps minimizing quality loss that takes place with conversions.
In the end my recordings ended up being superior before, almost indistinguishable from the source in their final x264 encoded 4:4:4 full range form
 

koala

Active Member
In the end my recordings ended up being superior before, almost indistinguishable from the source in their final x264 encoded 4:4:4 full range form
This is really cool. If you create your videos for yourself as local archive, this will work fine. But if you intend to upload them to some video streaming service such as Youtube, these video services will always recode them to partial 4:2:0 footage with not very high bitrate. And this resulting video might look worse in comparison to a video that was created with partial 4:2:0 and constrained bitrate in mind from the beginning.
 

mzso

New Member
This is really cool. If you create your videos for yourself as local archive, this will work fine. But if you intend to upload them to some video streaming service such as Youtube, these video services will always recode them to partial 4:2:0 footage with not very high bitrate. And this resulting video might look worse in comparison to a video that was created with partial 4:2:0 and constrained bitrate in mind from the beginning.
Well, I'd say it preserves quality for the various format changes youtube usually goes through. At one point they might even support 4:4:4 or at least 4:2:2.

I would really like to find a solution to the false limited range issue, regardless.
 

Jo Li KMC

New Member
Use simple output mode, set to lossless recording quality. This will use the lossless UTVideo codec. To get 4:4:4 subsampling with this, set settings->advanced->Color Format to I444. This will create ULH4-encoded video, which is 4:4:4 subsampling.
As unbelievable as it seems (to me)… doing just these two things fixed a problem I was having where my videos had noticeable artifacting, fuzz, and pixelation when they should have been lossless. You'd honestly be hard pressed to tell that this image was a still from a game recording rather than a screenshot straight from the game, itself! (It has extra colors in its palette, but there's no artifacting.)

Additionally, I've been having some FPS issues where the encoded video would drop to 30 FPS at random in the video, but the software would say everything was perfectly fine. (With select games, anyway.) It seems like changing these two settings significantly improved the situation. Or maybe I just got lucky with this particular recording… But, I mean, I'm honestly over the moon to have my videos looking like straight screen captures, again! I know they'll get funky when I encode them properly, but I like having nice, clean raws to work with, when possible, so this is fantastic!

Thank you so much, koala!
 
Top