HEVC encoding using FFMPEG using 30+% of cpu

Hey all,

I have notice that when I’m encoding from H264 to H265 that my GPU is doing 49-50% of usage and my CPU is around 30% usage for the FFMPEG process. Can someone please help me fix FFMPEG usage on cpu when wanting only GPU hardware encode for hevc_nvenc? Or at least let me know what is going on with the CPU usage here. :smiley:

Here is my profile :

[MKV HVEC - No Time Removed]
Description=WARNING: Handbrake Constant Quality encoding (18) with Nvidia HVEC.
order=ffmpeg, handbrake
AllowH264CopyRemuxing=true
FixedResolution=true
AutoDeinterlace=true
ffmpeg-UsingHardwareEncoding=True
ffmpeg-general=-threads 0
ffmpeg-video=-ss 0 -map_metadata -1 -c:v hevc_nvenc -cq 18 -rc vbr -map 0:v
ffmpeg-audio=-acodec ac3 -ab 256k -map 0:a
ffmpeg-audioac3=-acodec ac3 -ab 384k -map 0:a
ffmpeg-ext=.mp4
ffmpeg-audiodelay=skip
handbrake-UsingHardwareEncoding=true
handbrake-general=–decomb --denoise=“weak” --loose-anamorphic --verbose=2 -T -O
handbrake-video=–start-at duration:0 -e x265 -q 18
handbrake-audio=-E ffac3 -R auto -B 256 -D 0 -a 1,2,3,4,5
handbrake-audioac3=-E ffac3 -R auto -B 384 -D 0 -a 1,2,3,4,5
handbrake-ext=.mp4
handbrake-audiodelay=skip
PreConversionCommercialRemover=false

Here are my system specs:

CPU: Intel i9-9900k @ 3.60 GHz (OC 4.9 GHZ all cores).
RAM: RAM: Corsair Vengeance LPX 16GB DDR4 3200MHZ.
MOBO: Gigabit Aorus Z390 Ultra.
GPU: EVGA GeForce GTX 1080 Ti FTW3 ( 11G-P4-6696-KR ).

You’re also converting the audio to AC3 which consumes CPU.

Silly question - are there any audio transcoding engines/algos/codecs or options that also utilize the GPU?
Or is that just not a thing that will happen any time soon?

I’m not aware of any audio codec that has hardware encoding or decoding support in a GPU. If you don’t compress your audio it won’t use any CPU though. Well none related to decode/encode of audio.

ffmpeg-audio=-acodec copy -map 0:a
ffmpeg-audioac3=-acodec copy -map 0:a
2 Likes

Ah totally overlooked the audio portion of the conversation. So with the line that you sent it would do a 1:1 copy of the original source audio?

Correct. If you replace the lines with the ones I sent then it will do a 1:1 copy of the source audio with no conversion.

1 Like

@SystemIdleProcess - I made the change yet ffmpeg.exe is still using above 30% of cpu. See attached

Can you attach the conversion log? I’m more of a Handbrake guy so not sure if this is normal or not but the log might help.

You might be able to figure out more about what is chewing up CPU within the MCEBuddy and FFMPEG processes using Microsoft/SysInternals Process Explorer and looking at the thread stack for the thread that’s eating CPU.