View Full Version : How to change the value of vbv params in the process of encoding?
TommySailing
24th May 2009, 14:40
I limit the vbv_buffer_size and vbv_max_bitrate to reduce the encoded frame size when a high-motion or new scene appeared,it worked,but the quality of I frame is not good. So I want to reset the vbv_buffer_size and vbv_max_bitrate when encode a I frame, but how to change these params in the process of encoding?
Or, can we change the frame rate in the process of encoding?
Thanks!
LoRd_MuldeR
24th May 2009, 14:56
No, you can't. If you use VBV, then x264 will make sure that the entire stream complies to the specified VBV restrictions.
You can't change the VBV parameters in the process of encoding, because this would invalidate all the frames that have already been encoded!
Remember: VBV restrictions come from the hardware of your playback equipment. They don't suddenly change ;)
TommySailing
25th May 2009, 09:31
No, you can't. If you use VBV, then x264 will make sure that the entire stream complies to the specified VBV restrictions.
You can't change the VBV parameters in the process of encoding, because this would invalidate all the frames that have already been encoded!
Remember: VBV restrictions come from the hardware of your playback equipment. They don't suddenly change ;)
Thanks!
Except the VBV params,can I just change the frame rate during the encoding?
LoRd_MuldeR
27th May 2009, 19:12
Except the VBV params,can I just change the frame rate during the encoding?
Why would you want to do that :confused:
You can change the framerate of the final video easily and as often as you like...
akupenguin
27th May 2009, 21:59
Why would you want to do that
Because if the content is VFR, that affects what VBV means in terms of bits per frame. Post-hoc addition of timecodes works fine for unrestricted encoding, but not so well for streaming.
TommySailing
30th May 2009, 16:35
Because if the content is VFR, that affects what VBV means in terms of bits per frame. Post-hoc addition of timecodes works fine for unrestricted encoding, but not so well for streaming.
How will I change the frame rate on earth?
Comatose
30th May 2009, 20:42
This interests me too. Is there no way to change the fps/vbv settings using zones or something?
akupenguin
30th May 2009, 22:37
No. The correct way would be to pass a timestamp with each frame rather than having a FPS at all. But I haven't implemented that, nor do I have any such plans.
Comatose
31st May 2009, 17:45
So there's no real way to get around this issue, other than adjusting to the lowest common denominator (e.g. changing the FPS so it's the same on the entire video, or setting the vbv params so they fit the highest FPS section)?
How difficult would it be to implement the timestamp thing, for someone who's very familiar with programming, but has no clue when it comes to programming video encoders? Is there some kind of (not-super-complex) resource I'll be able to reference?
akupenguin
31st May 2009, 18:57
The implementation would almost entirely be contained in ratecontrol.c, so that does limit the amount of codec knowledge you need. Otoh, ratecontrol.c isn't very documented.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.