0
votes

I want to encode in real-time using as little CPU and memory\disk I\O as possible, keeping a low CRF (currently 14). Will changing the encoding profile from Baseline to something else affect encoding CPU usage?

My current settings are:

Profile\Level: Baseline@L5.2

Resolution and frame rate: 1920x1080 @ ~144.001 FPS (variable frame rate mode)

Average overall data rate: 174 mbit\s (audio is ~320kbit\s VBR AAC)

x264 settings: cabac=0 / ref=1 / deblock=0:0:0 / analyse=0:0 / me=dia / subme=0 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=24 / lookahead_threads=4 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=250 / keyint_min=25 / scenecut=0 / intra_refresh=0 / rc=crf / mbtree=0 / crf=14.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=0

1

1 Answers

0
votes

Different encoding formats, parameters and profiles etc will definitely affect CPU - they involve doing different work or the same work in different ways.

Unfortunately, I think you will find that you will have to trade off quality, CPU and storage and decide which is most important for you to reduce or save.

As a general rule for a given quality level, and assuming you are using up to date codecs, those codecs which produce a smaller file or lower bitrate, need to do more work to achieve this and so will use more CPU on both the encoding and decoding side. Similarly, if you want to reduce CPU you will likely have a larger file or bitstream.

To answer your specific question around the profile, baseline encoding for h.264 will not use B frames.

B Frames are frames which are stored or streamed as a delta to preceding or following frames. The encoder and decider generally has to do more work if it is using B frames, so you are using a low CPU approach by using Baseline, but your video side will be larger for a given quality level.

If you switch to a profile which does use B frames (and other extra compression 'tricks'), such as High, then your video will be smaller but it will take more CPU to encode and decode.