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. |
13th April 2010, 08:05 | #1 | Link |
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. |
13th April 2010, 10:34 | #2 | Link |
x264 developer
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. |
13th April 2010, 14:02 | #3 | Link |
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? |
Thread Tools | Search this Thread |
Display Modes | |
|
|