request the h264 codec
request the VP8 codec
request the VP9 codec
request the AV1 codec
H264 may offer hardware encoding for better battery life with mobile and embedded devices
iOS devices should generally use H264, but the max resolution supported then is 1280x720.
macOS systems generally prefer H264 and will sometimes hardware-encode.
As for Windows PCs, if using a Chromium-based browsers (Chrome/Edge), your system may choose to use hardware-encoding when using publishing via a H264. This typically happens at 360p or higher resolutions, but it may not always happen. You can check to see if you are hardware-encoding by checking your video out stats, via CTRL + Clicking on your video: "External Encoder" would likely indicate hardware acceleration of some sort. If you have an Nvidia graphics card, you may be limited to two or three H264 hardware encoders, which could cause problems if you intend to use NVEnc for RTMP streaming also.
VP8 is the default in most cases, even though Apple devices may default to H264.
OBS on PC does not handle packet loss well when using VP8.
The Electron Capture app handles VP8 very well.
iOS devices can stream at 1080p30 or 720p60 when using VP8, but they get warm in doing so
VP9 offers better compression than VP8, but is also more CPU-intensive to use.
VP9 seems to reduce the chance of "rainbow puke" video problems in OBS Studio vs VP8
Do not feel compelled to stream at HD resolutions; even 540p can look good and runs much cooler.
AV1 is the most advanced codec, but also the most CPU-intensive to use.
Requires Chrome v90 or newer on both publisher and viewer to work
Experimental at this point in time; may not perform well.