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 > Announcements and Chat > General Discussion

Reply
 
Thread Tools Search this Thread Display Modes
Old 13th April 2010, 08:05   #1  |  Link
GEFORCEXTREME
Registered User
 
Join Date: Jan 2010
Posts: 13
CBR Bitrate Changing On-the-fly

References:
http://x264dev.multimedia.cx/?p=286
https://forum.doom9.org/showthread.php?p=1383940

Hi, with reference to the above, I'm trying out x264_encoder_reconfig to do CBR bitrate changing on-the-fly while transcoding with VLC.

Here's what I did, from VLC's x264.c file, I created a separate threat (at the Open function of VLC's x264.c) that will prompt for user input using printf and scanf repeatedly (yeah, console, I don't know how to do GUI in VLC). I added a callback function to the settings vbv-maxrate and vbv-bufsize (also at Open function of VLC's x264.c). When these value change, the callback function get these values and run x264_encoder_reconfig.

I don't know if I'm doing it the wrong way, but the video doesn't seem to reflect the changes. I know my way of prompting user input using console is flawed but I want to test if this on-the-fly bitrate changing is possible.

Ok, from the reference above, it is said I can change bitrate in CBR mode. But I went through the code and didn't see a CBR mode setting or is CBR mode simply ABR mode with bitrate==vbv_maxrate? If not, how do I enable CBR mode? After enabling CBR mode, how do I change the CBR bitrate? By changing vbv_maxrate and then do x264_encoder_reconfig?

DarkShikari, and anyone, please help. I've been trying this out for like forever.

Thank you in advance.
GEFORCEXTREME is offline   Reply With Quote
Old 13th April 2010, 10:34   #2  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
bitrate == maxrate with bufsize set --> CBR

To change the bitrate in CBR mode, change the maxrate and bitrate, and (if applicable) the bufsize. Usually if you want to double the bitrate, for example, you double all three.
Dark Shikari is offline   Reply With Quote
Old 13th April 2010, 14:02   #3  |  Link
GEFORCEXTREME
Registered User
 
Join Date: Jan 2010
Posts: 13
bitrate == maxrate with bufsize set --> CBR


Does this mean I set bitrate == maxrate with bufsize set and mode to ABR or something like that? Because I don't see the CBR mode, only ABR, CQP and CRF.

Also, can I first set bufsize 0 then change it later? I assume from your description this wouldn't work because I'm not in CBR mode but in ABR mode. Is this correct?
GEFORCEXTREME is offline   Reply With Quote
Old 13th April 2010, 17:22   #4  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by GEFORCEXTREME View Post
bitrate == maxrate with bufsize set --> CBR


Does this mean I set bitrate == maxrate with bufsize set and mode to ABR or something like that?
Yes.
Quote:
Originally Posted by GEFORCEXTREME View Post
Also, can I first set bufsize 0 then change it later?
No.
Dark Shikari is offline   Reply With Quote
Old 14th April 2010, 04:01   #5  |  Link
GEFORCEXTREME
Registered User
 
Join Date: Jan 2010
Posts: 13
Thank you very much, DarkShikari. :-)
GEFORCEXTREME is offline   Reply With Quote
Old 15th April 2010, 07:44   #6  |  Link
GEFORCEXTREME
Registered User
 
Join Date: Jan 2010
Posts: 13
Dark Shikari,

The CRF version of the same program have been working flawlessly. Just trancoded a video file with 3 diff quality within the same file and it has been working flawlessly. Thank you.
GEFORCEXTREME is offline   Reply With Quote
Reply

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 09:10.


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