Dualan Controls Download

Blog, Picture

Lossless: when LZ4, Raw and QOI make sense

Sending the picture pixel for pixel over a fast cable, and what the three lossless methods are for.

The normal codecs throw away detail you can't see, which is how they get a 1440p picture through a gigabit cable. Lossless throws nothing away: what arrives in OBS is exactly what was on the gaming PC's screen. The price is network. You want a 2.5 Gbit link at least, better 10 Gbit.

Who it's for

Mostly people with a fast direct cable who want to rule out any compression, for example for recordings that get edited later, or for very fine text and pixel art. For a normal stream to Twitch or YouTube, HEVC at quality 90 looks the same after the platform has compressed it again.

The three methods

Choose Lossless as the codec on the Video page. Which method it uses is under Advanced > Lossless method:

  • LZ4 (the default) packs the picture with very little processor work. A still desktop gets much smaller, a busy game less so. Good on 2.5 to 5 Gbit.
  • Raw doesn't pack at all. No processor work, but 1440p at 60 fps needs about 2.65 Gbit (4:2:0), twice that in 4:4:4. For 10 Gbit cables.
  • QOI keeps the screen's exact colours (RGB) instead of converting them first. More processor work than LZ4. For people who care about every colour value.

How they behave

All three run on the processor, below the game's priority, and like JPEG they send one screen to one OBS. If the link turns out too slow, they make the picture smaller until it fits, never below 720p, and Home says so. When the link has room again, the picture grows back. So that a smaller picture still fills the canvas in OBS, right-click the Dualan Source > Transform > Edit Transform and set Bounding Box Type to Scale to inner bounds.

Measured here

On the development PC, with a 2560 x 1440 desktop at 60 fps:

per frame network
Raw 4:2:0 no packing 2.65 Gbit
LZ4 4:2:0 1.6-1.8 ms about 0.5 Gbit
QOI about 5.9 ms about 0.8 Gbit

A desktop packs far better than a game, so take LZ4 and QOI as best cases. Test my PC measures them on your PC too.