Could HW encoding cause Keyframe interval to go from 8/10 second to almost 9 seconds?

I posted a topic in general discussion but now I’m wondering if this is a HW encoding issue. The topic I speak of is HERE. The only changes to my system were as follows:

  1. Windows 8.1 updated to a new Nvidia driver a few days ago but it had no direct affect

  2. Yesterday I completely removed MCEBuddy 2.5.4, all config files, and NET Framework 4
    and 3

  3. I reinstalled 2.4.11 and for the first time ever on this system HW acceleration worked, my
    encode times are under an hour now for a 2 hour movie whereas before they were 4-6
    hours…except now my keyframes are almost 9 seconds instead of 8/10 seconds

  4. Today I reverted back to NET Frmaework 3, then 4 with no change in speed or keyframes.

I have no idea what to do to fix this issue. I cannot properly edit some of my files now with huge keyframes but I love the enormous speed boost. I am using the same profile, MKV Normal Quality which lists a keyframe interval of 25 which is consistent with them being about 8/10 of a second on 30 FPS video…but I’m getting 10 times the size of keyframes with no clue what has happened.

Any help would be appreciated and thanks in advance.

I would recommend downloading the latest BETA version and then attach the logs from that version. That way we can baseline and see what’s going on before reverting to any older versions.

I did as you suggested. I installed the latest BETA and now the keyframes are fine once again but I’m back to abysmal performance and super long encoding times. One file took 4 hours 47 minutes, another 3 hours 36 minutes, and one 2 hours 18 minutes. With 2.4.11 reinstalled I was averaging under an hour per movie with the longest being 1 hour 7 minutes…I converted 41 movies in 36 hours with the wrong keyframe interval though. I will include the logs of the three I used 2.5.5 to convert last night.

4 hours 47 minutes

3 hours 36 minutes

2 hours 18 minutes

The logs were helpful. The difference between the old and new version of MCEBuddy is that now the new version can use both handbrake and ffmpeg to do hardware conversions with NVidia.

There are slight differences in the handbrake and ffmpeg settings for the same profile which in your case seems to be affecting your hardware encoder, it’s not able to handle the handbrake video filters.

The solution is simple, just open your profile and change the order for your profile from

order=handbrake,ffmpeg,mencoder

to

order=ffmpeg,handbrake,mencoder

and I think it’ll solve your issue.

Thank you, I will try that now and report back.

Well that is not a good solution either, it is better but it is still a waste of time and electricity. I am encoding the same film that took 4 hours 47 minutes, the log which I already included in the original post. I reinstalled 2.4.11 while I was waiting to hear back from you and the log is below

Same film encoded with 2.4.11 took only 33 minutes

At the moment I am using 2.5.5 to encode the same movie over again and it is set to take over 4 times longer than using 2.4.11 and a little less than half the time it took before I made the profile change you suggested

Is there any way we can just fix the keyframe interval problem in 2.4.11? I re-encoded movies I had done before and if there is a quality difference I can’t see it but it takes 5 to 10 times less time so I don’t need a newer version if it performs that badly

Can you attach the logs with the updated profile so we can compare what’s going on between the two. If they’re both using ffmpeg then there shouldn’t be any difference.

My Bloody Valentine 4 hours 47 seconds with 2.5.5

My Bloody Valentine 33 minutes with 2.4.11 but wrong keyframe interval

I am currently encoding the same film with the profile changes you told me to make and it will take about 2 more hours so I will add that log when finished

Thanks

You didn’t change the order in your profiles.conf file so there won’t be any change.

You need to open profiles.conf in your MCEBuddy installation config directory, locate your profile (you’re using MKV Normal Quality) and then change

order=handbrake,ffmpeg,mencoder

to

order=ffmpeg,handbrake,mencoder

After doing this save the file (keep in mind this is an administrative folder so you may need to copy the file to your desktop, edit it and then put it back). Once it’s done then rerun the conversion and it’ll run just as fast as 2.4.11. You’re using older hardware GeForce GT 730 which doesn’t do well with handbrake filters and would perform better with ffmpeg.

I did do as you said but I have not completed a job with those setting yet because it is taking more than 4 times longer than 2.4.11. I just checked the config file and the change is there. I will add that log as soon as it finishes in an hour and a half.

You dont’ need to wait for it to finish. You can stop it and upload the log.

OK, here is the log for the same movie I put up the other two logs earlier. This one is with the change to the profile you asked me to make. It was on track to have taken about 2 hour 25 minutes to complete, about half with 2.5.5 as downloaded and installed and about 4.5 times longer than 2.4.11

My Bloody Valentine

Very helpful. 2.5.5 is using a new version of ffmpeg which requires a new driver for nvidia. Your driver is too old and that’s why it’s failing and falling back to handbrake:

2020-06-16T16:53:27 MCEBuddy.AppWrapper.FFmpeg --> [h264_nvenc @ 000000cbe0959800] Driver does not support the required nvenc API version. Required: 9.0 Found: 8.1
2020-06-16T16:53:27 MCEBuddy.AppWrapper.FFmpeg --> [h264_nvenc @ 000000cbe0959800] The minimum required Nvidia driver for nvenc is 418.81 or newer
2020-06-16T16:53:27 MCEBuddy.AppWrapper.FFmpeg --> Error initializing output stream 0:0 – Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

So you can either update your driver or copy the ffmpeg version from 2.4.11 and put it into 2.5.5 in the ffmpeg folder and it should work for you. Ideally through it may be better to update your drivers.

I’m installing the newest driver on Nvidias website now but if it’s a driver issue then should I try giving Handbrake priority first after I install the new video driver?..in 2.4.11 Handbrake has priority and runs the fastest on my systme.

Also, why am i not getting email notifications when you respond to this topic? I would have answered you much faster

The new Nvidia driver has the encode times using ffmpeg back to about an hour like yesterday, I’m compressing a different movie than earlier. Would you suggest trying Handbrake first over ffmpeg like the priority as set by default in MCEBuddy? Is Handbrake superior to ffmpeg?

The only problem is I’m now using 2.5.5 with good speed but the reason I came here is not fixed…the keyframe interval is still wrong at almost 9 seconds

The three movied I encoded with 2.5.5 early today before you figured out the issue with my speed all used software encoding and the keyframe interval is correct…every file I’ve encoded with HW acceleration has the wrong keyframe interval at almost 9 seconds. So how do we fix this?

One thing I also noticed is using mediainfo to analyze the file shows reference frames of 1, not 3 as in the settings so is there some way the configurations are not getting passed correctly when HW acceleration is used?

Thanks for all your help so far

I changed the keyframe interval in the config file to 2 and the minimum to 2 and there was no change at all in the keyframe interval of the next file I encoded.

What do we do now? The HW encoding seems to do it’s own thing and ignore the config file. All HW encoded files I’ve checked have had only 1 reference frame when the config file specifies 3 and the keyframe interval is off by a factor of 10 time longer than it’s supposed to be.

This makes the resulting files unusable regardless of how fast it encodes them.