My new video card can run 4 simultaneous encoding sessions. I verified this using FFmpeg Batch AV Converter earlier. I am running the same in MCEBuddy right now and my CPU utilization is 100% using ffmpeg as the encoder and MCEBuddy GUI is unresponsive and my machine is sluggish. I want to continue using MCEBuddy but I can’t have my mahcine crippled to do so. I had to shut down the GUI to do anything with my machine. I then reopened the GUI and it showed the progress of all four conversions for about 5 seconds before it locked up and became unresponsive again. The program is not usable this way. Am I doing something wrong and how do I correct it?
The profile for MKV HEVC is not compatible with hardware encoding so how does MCEBuddy pass parameters onto ffmpeg? Or doe it just use the default setting in ffmepg? Is there anyway to change the parameters for HW encoding?
I just dropped back to 2 concurrent conversions and that keeps under 90% with the other things I have running at the same time so at least my computer is useable. I love MCEBuddy but I would like to know how to get the CPU usage down for 4 concurrent conversions to get the speed bump. I was using a custom profile in the other program and could do 4 in about an hour with no hiccups and CPU utilization around 65%
If Hardware Acceleration is checked in the conversion task it will use hardware if it detects it is available. If you could attach one of the logs of a conversion that is taking up so much CPU we might be able to see what’s going on and make some suggestions.
By default that profile does try to use Handbrake first however, depending on your GPU it may fail because “medium” preset isn’t available.
Also, the audio is re-encoded which can take some CPU as it won’t be handled by GPU but this should be a very small amount. I choose to copy audio instead.
Here is the MKV HEVC profile.
Description=HEVC in MKV (H.265/AC3) conversion. Creates a smaller file (50% smaller than H.264) with comparable quality but very slow. order=handbrake,ffmpeg ffmpeg-general=-threads 0 ffmpeg-video=-ss 0 -vf yadif=0:-1:1,hqdn3d -vcodec libx265 -preset medium -crf 26 -map 0:v -sn ffmpeg-audio=-acodec ac3 -ab 160k -map 0:a ffmpeg-audioac3=-acodec ac3 -ab 256k -map 0:a ffmpeg-ext=.mkv ffmpeg-audiodelay=skip handbrake-general=--decomb --loose-anamorphic --verbose=2 handbrake-video=--start-at duration:0 -e x265 --encoder-preset medium -q 26 handbrake-audio=-E ffac3 -R auto -B 160 -D 0 -a 1,2,3,4,5 handbrake-audioac3=-E ffac3 -R auto -B 256 -D 0 -a 1,2,3,4,5 handbrake-ext=.mkv handbrake-audiodelay=skip PreConversionCommercialRemover=true
I wanted a little more from the profile and wanted to hardset the encoder to the specific GPU I was using. Just change the order= if you prefer ffmpeg. Here are a couple of examples:
[HEVC MKV Intel] Description=HEVC in MKV hardset to use Intel. order=handbrake,ffmpeg DisableEncoderReordering=true ffmpeg-general=-threads 0 ffmpeg-video=-ss 0 -vf yadif=0:-1:1,hqdn3d -vcodec hevc_qsv -preset slow -crf 26 -vsync 2 -map 0:v -sn ffmpeg-audio=-acodec ac3 -map 0:a ffmpeg-audioac3=-acodec copy -map 0:a ffmpeg-ext=.mkv ffmpeg-audiodelay=skip ffmpeg-UsingHardwareEncoding=true ffmpeg-DisableSoftwareEncoderFallback=true handbrake-general=--decomb --auto-anamorphic --verbose=2 handbrake-video=--start-at duration:0 -e qsv_h265 --encoder-preset quality -q 26 handbrake-audio=--aencoder copy --audio-copy-mask aac,ac3,eac3,truehd,dts,dtshd,mp3,flac -R auto handbrake-audioac3=--aencoder copy --audio-copy-mask aac,ac3,eac3,truehd,dts,dtshd,mp3,flac -R auto handbrake-ext=.mkv handbrake-audiodelay=skip
[HEVC MKV AnyStream NVidia] Description=HEVC in MKV hardset to use NVidia. order=handbrake,ffmpeg DisableEncoderReordering=true ffmpeg-general=-threads 0 ffmpeg-video=-ss 0 -vf yadif=0:-1:1,hqdn3d -vcodec hevc_nvenc -preset hq -crf 26 -vsync 2 -map 0:v -sn ffmpeg-audio=-acodec ac3 -map 0:a ffmpeg-audioac3=-acodec copy -map 0:a ffmpeg-ext=.mkv ffmpeg-audiodelay=skip ffmpeg-UsingHardwareEncoding=true ffmpeg-DisableSoftwareEncoderFallback=true handbrake-general=--decomb --auto-anamorphic --verbose=2 handbrake-video=--start-at duration:0 -e nvenc_h265 --encoder-preset hq -q 26 handbrake-audio=--aencoder copy --audio-copy-mask aac,ac3,eac3,truehd,dts,dtshd,mp3,flac -R auto handbrake-audioac3=--aencoder copy --audio-copy-mask aac,ac3,eac3,truehd,dts,dtshd,mp3,flac -R auto handbrake-ext=.mkv handbrake-audiodelay=skip handbrake-UsingHardwareEncoding=true handbrake-DisableSoftwareEncoderFallback=true AllowAllCopyRemuxing=true
Apart from using hardware encoders and optimizing profiles you can also see this topic for details on how to limit resources used by video encoding:
SystemIdleProcess…is [HEVC MKV AnyStream NVidia] a profile I will have to add to my profiles file to try it? If so would I just add it below the current HEVC profile which is software encoding?
I found the weak spot in the current HW accelerated profile in MCEBuddy watching a movie last night. The problem arises in low light conditions where most of the screen is shades of black, white, and grey because it is very dark. There is a halo or banding effect, like rings or a gradient of shades that look like a target with either the center of the screen being the bullseye or centered around a person moving in the low light. As soon as any real color comes into the scene this effect goes away or is minimized so much it is not noticeable. In good light conditions the picture is near perfect. I kept switching back and forth between this H.265 encode and the same movie in H.264 and in the latter the effect is not visible.
I’m going to use this movie to experiment with encoding parameters as I would like the effect to go away but keep my file sizes as small as possible. Do you have any suggestions on what parameters I should play with to correct this? I figure I would just encode the movie 5 or 6 times with slightly increased quality until it goes away and use that as my new profile, at least on horror movies as the normal light movies are great the way they are now. This is the first time I have found this anamoly.
EDIT…Ok I added the profile, selected it in MCEBuddy and am running just that movie for a baseline.
I know exactly what you are talking about with the black/dark scenes. I haven’t had much time to experiment with resolving this yet but you are on the right track of increase quality (technically decrease qualifier value, 26 in the profile) until it goes away. Other than that I don’t really have any suggestions for parameter tweaks. Might have to use software for those type of movies/shows also. And maybe even use a main10 profile to you get a proper HDR10 rip. Or H264 might be the way to go. I honestly don’t have the answer.
Thanks for the help, if we’re both experimenting maybe we’ll find an answer. If I figure it out I may just make a profile for Horror movies as they are the ones that have a large portion of dark scenes, especially with movement. I only noticed this because I watched “The Amityville Murders” last night and the last half the movie is mostly dark. I have noticed this effect in normal movies where very dark scenes have mostly black and movement but since they last of a second or less they are not worth increasing file size for something most people won’t notice…I notice everything.
My H.264 encode of this movie is of better quality only in dark scenes but it is also a software encode so I may just run a HW accelerated H.264 on it and see if the problem persists. One way or another I will find a solution and that may just be to not worry about something that I may be able to live with if the file size gets to big to make it go away. I have been watching horror movies every night for weeks and this is the first time this problem was noticeable.
I noticed it in Bright and I’m the same way, my wife didn’t care/notice but I thought it looked awful.
One trick you can do to save time is to use the MCEBuddy Custom Cuts application to strip out the other parts of the movie so you only get the scene(s) you want to test with. Or use other software to trim out the rest so you only have the scene(s) you want to test as your source file.
That’s a good idea, I can just strip out a 5 minute section I noticed it the most and I remember that time so I can do all the encodes in under an hour
I ran the movie through using your profile as is, once with crf 23, and once with crf 20 and nothing was different between any of the three resulting files. All were the same size and all of the same quality with the issue there as before.
Hmmm…that’s strange. Are you sure it used ffmpeg? Can you attach a log file for one of the files you converted?
[Uploading: The Amityville Murders STZEH.ts-Convert to MP4-2020-11-04T14-25-49.log…]
This is the log for the last one I did where I set the crf to 20
I can’t upload it for some reason, it keeps telling me The difference between the request time and the current time is too large.
…But according to the log it is using ffmpeg …but why is it using comskip? I never run that program, how do I turn it off?
It may call comskip but not do anything with it. I wouldn’t worry about it. Do you see “MCEBuddy.AppWrapper.Handbrake” anywhere towards the end of the log?
No, there is nothing like that with handbrake near the end, it does use handbrake at the beginning for checking things but then it goes to MCEBuddy.Transcode.ConvertWithFfmpeg
Here are some other options for nvenc_hevc encoder presets.
-preset <int> E..V..... Set the encoding preset (from 0 to 11) (default medium) default 0 E..V..... slow 1 E..V..... hq 2 passes medium 2 E..V..... hq 1 pass fast 3 E..V..... hp 1 pass hp 4 E..V..... hq 5 E..V..... bd 6 E..V..... ll 7 E..V..... low latency llhq 8 E..V..... low latency hq llhp 9 E..V..... low latency hp lossless 10 E..V..... lossless losslesshp 11 E..V..... lossless hp
Slow does 2 pass of hq that might produce better results. But honestly we might be barking up the wrong tree. Maybe just does some searching around on the internets for ffmpeg and nvenc_hevc.
Honestly, I’ve been primarily using intel hardware encoding lately because that’s what I have on my secondary machine where I do most of my capture/encoding.
I found the reason changing the crf value had no affect on the resulting video…crf is only for software encoding, you have to use a cq value with nvenc.
Also, all those profiles you posted have another flaw…they use software encoding for everything before the nvenc parameter, de-interlacing for instance. You can use yadif in nvenc and I tested it in ffmpeg Batch and when you let the GPU do the deinterlacing the encode times are half of what it takes MCEBuddy…I just haven’t figured out how to successully pass all parameters to the nvenc in MCEBuddy the way the profiles are structured. I keep getting errors.