Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 21st December 2018, 18:24   #1  |  Link
Rocinante
Registered User
 
Join Date: Jul 2018
Posts: 9
Need helps on option to limit Max bitrate of encoding.

This is my first post here, I apologize ahead of time if this is posted in the wrong place.

Recently, due to a change in upload policy of their website, my clients requires me to meet their needs to a 8Mb/s Average bit rate and a 15Mb/s Maximum bit rate in video. So, I tried to use -vbv-maxrate and -vbv-bufsize to limit the max rate in 2pass encoding, but the result always varies on videos and sometime exceeded the max bit rate that I set, even when I reduced my vbvbufsize to 1/2 of targeted vbvmaxrate. ( for example: I sometimes get 8Mb/s Average bit rate & 20Mb/s Maximum bit rate, and I had to re-encode with a lower vbv setting until I hit the 15Mb/s's sweet spot. )

After some research, I learned that vbv option doesn't translate into limiting Maximum bit rate, but I know for a fact that h264 renderer in Adobe Premiere Pro is capable to set a Maximum bit rate for 2pass encoding and the result is always precise, unlike the vbv option that I used.

So I'm wondering what setting that Premiere Pro used, and if anyone can teach me the command line for it or any way to achieve a precise max bit rate setting. Thanks a lot for your time and I appreciate any helps that you guys may offer.

Last edited by Rocinante; 22nd December 2018 at 18:43. Reason: added info on variable bit rate encoding.
Rocinante is offline   Reply With Quote
Old 22nd December 2018, 15:42   #2  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,904
I don't know what Adobe Premiere does, but I think it uses a proprietary encoder (Adobe Media Encoder) which is not based on x264. (Different encoders produce different results for the same codec).
Anyway, you said you used maxrate and bufsize, but vbv is a buffering model, therefore it indirectly limits the bitrate, 'cause the parameters define at which rate data enters the buffer and how much data can be in the buffer, (they don't define at which rate the data is consumed); in other words, the bitrate can vary and it can potentially be higher than the max-rate you set. Don't get me wrong, maxrate and bufsize do limit the bitrate, but they don't strictly limit it to the value you set, as they are meant to prevent the stream from underflow.
Can you please share your command line, though?
Last but not least, generally "MB" stands for "Megabytes"; what you meant is "Mb", Megabits.

Last edited by FranceBB; 22nd December 2018 at 15:44.
FranceBB is offline   Reply With Quote
Old 22nd December 2018, 18:42   #3  |  Link
Rocinante
Registered User
 
Join Date: Jul 2018
Posts: 9
Quote:
Originally Posted by FranceBB View Post
I don't know what Adobe Premiere does, but I think it uses a proprietary encoder (Adobe Media Encoder) which is not based on x264. (Different encoders produce different results for the same codec).
Anyway, you said you used maxrate and bufsize, but vbv is a buffering model, therefore it indirectly limits the bitrate, 'cause the parameters define at which rate data enters the buffer and how much data can be in the buffer, (they don't define at which rate the data is consumed); in other words, the bitrate can vary and it can potentially be higher than the max-rate you set. Don't get me wrong, maxrate and bufsize do limit the bitrate, but they don't strictly limit it to the value you set, as they are meant to prevent the stream from underflow.
Can you please share your command line, though?
Last but not least, generally "MB" stands for "Megabytes"; what you meant is "Mb", Megabits.
Thanks for your reply.

Well, Premiere Pro can achieve the max rate control even when not render through Media Encoder. Do you mean that different encoder interface will affects how a codec behave? It's to my believe that despite different GUI that we used, as long as the parameter and codec is the same, which is x264 in this case, we should get the same result. EDIT: I was wrong, I thought Premiere is using x264, but after checking, it's H.264, which the encoder is unknown.

Yes, I agree with you. So you can see that it's quite cumbersome to use VBV to achieve a fixed Max bit rate, that's the biggest problem that I'm facing currently.

Sure, but to eliminate other problems that might affect end results in my testing, I'm just running simple 2pass with "-preset veryslow" and "-maxrate 15000", "-bufsize 7500" now. Which is very weird that the 1/2 buffer size will quickly run out of data and almost defeats the purpose of setting on 15000 vbv maxrate.

My bad on the "MB" abbreviation, fixed on the original post. Thanks again for your time.

Last edited by Rocinante; 22nd December 2018 at 19:13.
Rocinante is offline   Reply With Quote
Reply

Tags
max bitrate, maximum bit rate, vbv-maxrate

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:00.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.