Thanks to Sapiens' help, I've put up the following method for making (almost) lossless local recordings using x264 lossless encoding. It is useful for making high quality screen recordings that can be edited/transcoded later offline using a slower codec.
It is made possible by the OBS-mp release since 0.10.0, where YUV 4:4:4 and RGB color space support are added. It is almost lossless because the conversion from RGB to YUV 4:4:4 is not truly lossless (you can't get back bitwise identical images), but it is way much better than using 4:2:0, and considered by many people to be an acceptable form of 'lossless'.
SETTINGS
Output -> Output Mode: Advanced (Simple mode will always generate I420 output files).
Go to the Recording tab, set:
SOME MEASUREMENTS
My CPU is Intel i7-3770 @ 3.40GHz. It handles x264 lossless @ 48fps effortlessly. And the recording has negligible impact on my gaming, which is much better than all other recorder/codecs I have experimented with (I've tried a lot, including Lagarith, MJPG, huffyuv, etc.).
Data volumes (input is 1900x1200, fps varies):
It may be worth nothing that I don't archive these recorded files. I record a lot, and pick the best clips and compress them again using the much slower x265, which can generally achieve 6:1 to 10:1 compression ratio with almost no perceptible quality loss.
FUTURE WORK
It is possible to use FFmpeg to do true RGB compression, albeit less efficiently.
It is made possible by the OBS-mp release since 0.10.0, where YUV 4:4:4 and RGB color space support are added. It is almost lossless because the conversion from RGB to YUV 4:4:4 is not truly lossless (you can't get back bitwise identical images), but it is way much better than using 4:2:0, and considered by many people to be an acceptable form of 'lossless'.
SETTINGS
Output -> Output Mode: Advanced (Simple mode will always generate I420 output files).
Go to the Recording tab, set:
- CPU Usage Preset: ultrafast
- x264 Options: qp=0
- Use CBR: yes
- Bitrate: doesn't matter
- Scaled Resolution should equal to Base Resolution
- Common FPS Values: choose one you prefer. I'm using 48 fps.
- Video Color Format: I444
- YUV Color Space: 709
- YUV Color Range: Partial
SOME MEASUREMENTS
My CPU is Intel i7-3770 @ 3.40GHz. It handles x264 lossless @ 48fps effortlessly. And the recording has negligible impact on my gaming, which is much better than all other recorder/codecs I have experimented with (I've tried a lot, including Lagarith, MJPG, huffyuv, etc.).
Data volumes (input is 1900x1200, fps varies):
- x264 lossless ultrafast (48 fps): 62-70 MB/s
- x264 lossless veryfast (48 fps): ~52 MB/s
- Lagarith lossless (20 fps): ~66 MB/s
- MJPG lossy, 85% quality (30 fps): ~14 MB/s
It may be worth nothing that I don't archive these recorded files. I record a lot, and pick the best clips and compress them again using the much slower x265, which can generally achieve 6:1 to 10:1 compression ratio with almost no perceptible quality loss.
FUTURE WORK
It is possible to use FFmpeg to do true RGB compression, albeit less efficiently.