pod: do not forget to use mkv not mp4 in OBS and set for HDR

I thought I was saving a step by having OBS record directly into mp4 but I forgot the reason we use mkv. It’s because if OBS crashes you lose the whole mp4 so do the two steps. Use mkv and then run a remix tool in OBS when done.

The reason for this is that an MP4 by default writes a final MOOV record that’s dependent on the whole file. So, if OBS crashes, the final record isn’t written and the file isn’t finalized. But if you set `settings > output > custom mixer settings to “movflags=frag_keyframe+empty_moov“

I just use mkv so I don’t have to remember this setting. This doesn’t require file “finalization”. Then when you want to use an MKV file you can convert it to MP4 with a single OBS Commend

Also, make sure the HDR output default is set. All my inputs are not HDR when I get new cameras. I should be able to do screen captures in HDR of things in HDR. Make sure to go to the Settings in the Controls Dock to set 4K HDR output.

Here are my settings, I normally set if for very “fat output” because my M1 Pro Max can handle a huge stream

  1. Output > Recording > Indistinguisble Quality, Large File Size
  2. Output > Recording Format: Mastroka Video (.mkv)
  3. Output > Recording > Video Encoder: Hardware (Apple, HEVC)
  4. Output > Recording Audio Encoder: AAC (Default)
  5. Video > Base (Canvas) Resolution: 3840×2160
  6. Video > Output (Scaled) Resolution 3840×2160
  7. Video > Common FPT Values: 30fps (I don’t need more
  8. Advanced > Video > Color Format: P010 (10-bit, 4:2:0, 2 planes) or P416 (16-bit, 4:4:4, 2 planes) if you have a very fast machine
  9. Advanced > Video > HDR Nominal Peak Level: 1000 nits
  10. Advanced > Video > Color Space: Rec.2100 PQ
  11. Advanced > Video > Color Range: Full

The settings are i020 apparent which sets 10 bit of color as well but with 3 planes and not two. The P010 works with SDR for 10-bit SDR (so more color gradations)

What’s all this then about Color Spaces

This is a long a deep topic, but to explain the above settings:

  1. The standard format for years was sRGB color space at 8 bits per channel. It’s been used since the 1990s for standard dynamic range or normal colors. You get this by setting SDR White Level so that full brightness is at most 300 nits.
  2. Extended Dynamic Range popularized by Apple is another format that is HDR with 16 bits of color per channel and the range of numbers used allows values >1.0
  3. sRGB 8-bit. Set NV/12/I410/I444/RGB color format plus sRGB/Rec.709/Rec.601
  4. sRGB 16-bit. Set P010/I010 color format + sRGB/Rec.709/Rec.601 color space
  5. EDR. Set P010/I010 color format + Rec.2100

What the heck are P010 and I010? This all has to do with the Hardware you have and what graphics system you have in your machine:

  1. NVIDIA NVENC. This needs a GeForce 600 or higher and runs on Linux and Windows
  2. AMD Advanced Media Framework AMF. This is for AMD graphics cards.
  3. Intel Quick Sync Video (QSV). You need an Intel HD Graphics GPU on Sandy Bridge or newer.
  4. Apple VideoToolbox (VT). Runs on all Apple Silicon and Intel Macs. On Apple silicon, you can stream in N.264 and you can record in H.264, HEVC, and Apple Pro Res

Well P010 works with NVEnc HEVC X.265 decoders to generate PQ and HLG Videos, so this is a good choice if you have an nVidia Graphics card.

I010 works with AO Media AV1 codec from Google, so I just use P010 which is 10-bit color, but those a lot of color chroma subsampling at 4:2:0 . If you are filming screens and things you can experiment with:

  1. P216. This gives 16-bit color and you are using 4:2:2 so much less compression
  2. P416. This is the full if you want computer monitor quality 4:4:4 which is no subsampling at all and 16-bit color.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

I’m Rich & Co.

Welcome to Tongfamily, our cozy corner of the internet dedicated to all things technology and interesting. Here, we invite you to join us on a journey of tips, tricks, and traps. Let’s get geeky!

Let’s connect