Question / Help Ideal Encoding Parameters for Video Archiving?

ghostravenstorm

New Member
This is more of an encoding question with h.264 in general than OBS specifically, but I use OBS to record losslessly.

I have an archive of lossless, or "near lossless" I should say, game videos that I want to compress down fro the sake of file size cause I record about 100GB in one hour. I'm using FFmpeg to encode all my videos and I'm trying to figure out ideal parameters to preserve frame quality in both the game environment as well as 2D user interfaces. I have figured out what parameters I should use to keep the scene in good quality, but I struggle to keep menus and fine details in UI from getting bit-crushed.

Serveral months ago I though I finally settled on decent parameters, but then Blizzard released their recording feature for highlight in Overwatch, so I've been pulling my hair out trying to understand how Overwatch's engine is rendering these videos. In MedaInfo there's no encoding settings available so I have no idea how their h.264 encoder is set up, but it's basically using only 1 ref frame, 2 b-frames, no CABAC. It also says limited color range, but when I compare the recording produced by the engine and a lossy 4:2:0 video produce by OBS of the same highlight, I notice OBS has super washed out colors and the UI is blurred around the edges.

It feels like Overwatch's engine is not rendering these video in the same way I'm originally thinking of. It's somehow rendering in layers to preserve the bits it needs to keep the UI sharp, and compress what is extraneous in the main scene. How can I match that using OBS or FFmpeg? I want to try to keep the UI sharp without ridiculous bitrates in all game videos.

Right now the real challenge is transparent UI over the game scene. Blocking artifacts wreak havoc on that kind of stuff in a compressed h264 format.

These are currently the fine-tuned settings I use in FFmpeg. I'm trying to find an ideal settings for video games specifically because all the guides I read are constantly referring to traditional film or animation when I read what the in-depth settings do.
Code:
-c:v libx264 ^
-crf 23 ^
-refs 4 ^
-mixed-refs 1 ^
-weightp 2 ^
-weightb 1 ^
-bf 2 ^
-b_strategy 2 ^
-b-pyramid 2 ^
-me_method umh ^
-me_range 16 ^
-subq 8 ^
-trellis 1 ^
-aq-mode 1 ^
-aq-strength 0.70 ^
-qcomp 0.85 ^
-coder ac ^
-fast-pskip 1 ^
-8x8dct 1 ^
-partitions all ^
-mbtree 1 ^
-direct-pred 3 ^
-sc_threshold 40 ^
-rc-lookahead 30 ^
-psy 1 ^
-psy-rd 1.05:0.00 ^
-deblock 0:0 ^
-g 30 ^
 
Last edited:
I would just all-spam clean crf 21 or 20 and nothing else, 23 may be too low, but im not very much familar with rest of the options;) used ffmpeg only few times.
doom9.org may be better place to look
 
Top