Question / Help Difference between H264 and Mpeg4 and other codecs.

Audaxxx

New Member
Hi OBS community,

I've been experimenting a bit with codecs recently and have found that using Avi Mpeg4 is encoding with more than 1/4 the cpu load than H264. Is this to be expected? Basically i'm finding I can achieve much higher quality recordings as I can crank up the settings and still not drop frames.

Does anyone know of any other codecs that are less cpu intensive than Mpeg4? I'm not too worried about the file size as it's going to hard drive but don't want it to come out too huge.

I was also wondering if it was possible to increase the quality settings when using ffmpeg Mpeg4, other than up the bitrate which I've done already? I tried putting different tags in the "Video Encoder Settings (if any)" box but nothing is getting recognised according to the logs. I've tried googling and looking on the ffmpeg site but can't find anything. Was hoping I could increase the quality of Mpeg4 some more as I have some CPU overhead left.
 

koala

Active Member
With "avi mpeg4" you probably mean the H.263 encoder, and you compare it with the H.264 encoders used in OBS.

Yes, H.263 needs way less computing power than H.264. This is mostly because H.264 produces about half the size in comparison to H.263 to achieve the same quality. If you speak about streaming, it means you can double the quality with just using a different encoder, or double the resolution with just using a different encoder.
About 5-10 years ago, a huge amount of articles were written that discuss H.263 versus H.264. No need to repeat that stuff here and now. Fire up your favorite search machine and look them up.

Don't forget that H.263 was used at a time where the common resolutions of videos were 320x200 and 640x400.

In the end, today H.264 is the state of the art encoder and H.263 the previous one, the obsoleted one. CPUs are literally ten times more powerful than when H.263 was state of the art.
The next generation encoder is already on the doorstep, it's hevc (H.265), which is a similar step ahead to H.264 as H.264 was in comparison to H.263.

OBS is primarily a streaming client, so it primarily supports the encoders required for streaming, which is H.264. Use these with the standard output modes of OBS, and you are fine and sane. It just works.

If you want to use one of the other encoders that come as fallout with the ffmpeg library, you are on your own, and you throw away all the knowledge that accumulated to the implementation of h.264 in OBS. You restart a discussion that ended about 5 years ago.
If your CPU isn't able to encode with H.264, you have a device not suitable for streaming or recording with current quality standards. You can still record with obsoleted quality standards from 10 years ago, but you are on your own.
 

Audaxxx

New Member
Thanks for the detailed reply koala. I'm trying to squeeze as much quality as I can from my hardware 780ti and 4790k as i can't afford a new GPU yet. Hopefully the prices will come down soon eh. Maybe 263 is the way to go for me in the meantime if it's a little faster for recording.

I completely get what your saying about streaming though and will certainly use 264 if I get into that.
 

koala

Active Member
GTX 780ti and 4790k is still top performance. No need to worry. Use nvenc with CQP mode and a quality setting of 18 or 20. Or better, use simple output mode, use "Hardware (NVENC)" as encoder with "Indistinguishable Quality, large file size" as recording quality.
You will not see any difference between the recording and the original footage. By using nvenc, you relieve your CPU from the encoding stress and give the game you're recording every bit of CPU it can have.

On the other side, if you use h.263 as encoder, you would definitely see a difference, even if you used the best settings. The quality would be worse. This is because h.264 has the better encoding in the algorithm. h.264 is able to produce really sharp images, while images encoded with h.263 always look somewhat washed out and blurry, no matter how much quantizer or bitrate you give.
 
Top