openh264 icon indicating copy to clipboard operation
openh264 copied to clipboard

Settings for encoder

Open octalflow opened this issue 11 years ago • 5 comments

Hello. I want to limit encoder output data size to 1 mega(1024*1024) bytes(NOT bits) per second. How to set parameters for my encoder ? what is the relationship between frameRate and encoder output quality ? If I want to increase my encoder output quality, what parameters do I must change ?

60 fps or 30 fps iTargetBitrate = iMaxBitrate = iLtrMarkPeriod = sSpatialLayers[0].iSpatialBitrate = sSpatialLayers[0].fFrameRate =

thank you.

octalflow avatar Oct 07 '15 04:10 octalflow

Settings are set in bits per second, you'll need to make the conversion yourself (1 byte = 8 bits). You will also need to set the bEnableFrameSkip field to true. I believe the maximum framerate is ~~30~~ 60 right now.

The relationship between framerate and quality depends on the bitrate you've set (and I guess the RCmode also). Usually bigger bitrate = more quality (at a given framerate).

chuckleplant avatar Oct 08 '15 14:10 chuckleplant

the maximum framerate is 60, agree other comments above.

sijchen avatar Oct 08 '15 17:10 sijchen

Thank you for your information. What is the difference between iTargetBitrate(iMaxBitrate) and iSpatialBitrate ?

octalflow avatar Oct 08 '15 22:10 octalflow

iTargetBitrate and iSpatialBitrate is the the bit rate the encoder will try to maintain the long-term average bit rate around with, the former is the total for all spatial layers if multiple spatial layers are set, the latter is for each spatial layer. Obviously if multiple spatial layers are set, the sum of the bit rate should be lower than the total bit rate setting. iMaxBitrate is when some buffer-size concerned receiver side needs, the encoder will try to put a more stricter limit in the output bit rate and try to not go over iMaxBitrate per seconds. After all the rate control algorithms are under adjustment recently, for your info.

sijchen avatar Oct 09 '15 22:10 sijchen

Thank you.

octalflow avatar Oct 09 '15 23:10 octalflow