H265 "Main10" constant bitrate does not work

Selecting the below output settings results in a bitrate much lower than what is selected (1.6mbps vs 24mbps for my clip), to the point of banding and artifacting. This only occurs with “Main10” and does not occur with “High” profile of H265.

image_2024-07-08_145436311

Solution : I’ve checked the export command and changed "-b:v" "24M" to "-rc" "cbr" "-b:v" "24M" which now forces ffmpeg to adhere to the selected bitrate. Banding and artifacting is now fixed as a result.

TLDR; add "-rc" "cbr" to ffmpeg command to force use of constant bitrate

Edit : This issue is with both AMD and Nvidia GPU’s, specifically 7900xtx and 3070ti

3 Likes

Topaz Video AI 5.2 still had not fixed this.
However, the export command solution did not work for me. Though the banding is fixed, the upscaled clip is not playable.

same happened. I said before again and agian. but not solved. My pc is amd 5900x with nvidia rtx 4900.

@hyun.choi @ko-lun.chen I’ve found a better fix than changing the command line everytime.
Go to directory C:\ProgramData\Topaz Labs LLC\Topaz Video AI\models and open file “video-encoders.json”

Go to line 394 (now 415 after 5.2.1) and change the line to include -rc cbr
Full line being "cbr": "-rc cbr -b:v <CONST_BITRATE_VALUE> -preset p6",
Example below

That fixes constant bitrate for both Nvidia and AMD GPU’s.
AMD using NVENC is a separate issue. . . but it works.

Note : Mediainfo will show video bitrate incorrectly (tagging issue?), but the overall bitrate will be correct.

3 Likes

thank u so much for kind and good solution!!
note: sadly to me, It wasn’t resolved…

Not sure but this may be related. I’m way back on Version 3.012 and I’ve noticed recently H265 “Main10” has gone from encoding at around 15 Mb/s (Auto) for DVD to 1080p right down to 4Mb/s which is unusable. Even manually setting bitrates makes no difference or which model I use. Waiting for a solution as right now the program has become useless.

Replacing the line in “video-encoders.json” works for me. I’ve enhanced a few clips. The bitrate is constant as set. I guess Video AI might not work well with the recent Nvidia drivers. When I found this issue, I went back to Ver. 4s and Ver. 3s. But the issue remained. I did not roll back to the older Nvidia drivers though.

1 Like

5.2.1 still not fix it :tired_face:

I sent the “logs for support” to the team last week. Hope they will fix it in the next release…

1 Like

It seems NV geforce 560.70 driver has fixed it: [NVENC] Quality and bitrate settings are ignored at 10-bit encoding [4697900].

I’ve just tried the new 560.70 driver and it looks like there’s been an improvement in bitrate, but with the stock TVAI command (without -rc cbr) I’m getting 9Mb/s instead of the 24Mb/s selected in TVAI.
Previously I was getting around 1.5Mb/s output without the -rc cbr parameters, sooo progress?

Strangely enough… updating to Nvidia driver 560.70 had the same effect on my AMD card… improved from 1.5Mb/s output to 9Mb/s output.

For now, at least in the limited few runs I’ve done, it still does not adhere to the constant bitrate selected in TVAI. I’ll be keeping -rc cbr in the video encoder json file for now.

1 Like

You are right! I got the same result as you had. The latest driver has improved slightly but has not solved TVAI’s issue. The team should really dig into this issue!

2 Likes

Well I will update my drivers too and I just received a reply about it being GPU drivers. However, I also use Davinci Resolve and encode with Main10 and have not had the same issues so it still seems a bit odd to me and not entirely down to drivers otherwise Resolve would be having the same issues surely?

Hi everyone,

Thanks for your testing and feedback on the CBR mode for NVENC! We are planning to push a fix for bitrate settings soon which should match the output bitrate to the selected value in the app menu.

4 Likes

When will it be fixed

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.