You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using x264 encoder we have the following logs:
0:02:10.861619002 17 0x7f61541de000 DEBUG enctreebin kmsenctreebin.c:146:configure_encoder: Configure encoder: <x264enc0>
0:02:10.861714154 17 0x7f61541de000 DEBUG enctreebin kmsenctreebin.c:494:kms_enc_tree_bin_configure:<kmsenctreebin1> Encoder plugin found: <x264enc0> for caps: video/x-h264, stream-format=(string)avc, alignment=(string)au, width=(int)[ 16, 2147483647 ], height=(int)[ 16, 2147483647 ]
0:02:10.861723736 17 0x7f61541de000 DEBUG enctreebin kmsenctreebin.c:311:kms_enc_tree_bin_get_bitrate:<kmsenctreebin1> Bitrate = Current value: 300000
0:02:10.861745774 17 0x7f61541de000 ERROR glib GLib-GObject:0:: value "0" of type 'guint' is invalid or out of range for property 'bitrate' of type 'guint'
0:02:10.861754748 17 0x7f61541de000 DEBUG enctreebin kmsenctreebin.c:370:kms_enc_tree_bin_set_target_bitrate:<x264enc0> "bitrate" set: 300
The problem is around the error log, see context below.
Context
The consequence of the above is that the bitrate setting is ignored and some max bitrate of 2Mbps is used.
Looking at the code of kurento 7.1.0 (which is the version we use) we can see this piece of code and matching it with the logs:
Indeed new_bitrate * kbps_div / 1000 is then 300 * 1 / 1000. Hence the error log and this issue report.
How to reproduce?
Configure MediaElement.conf.ini with the following content:
;; Target video bitrate for media transcoding.
;;
;; The bitrate of a video has a direct impact on its perceived image quality.
;; Higher bitrate means higher quality, but also a larger amount of bytes to
;; transmit or store. Use this parameter to set the desired average bitrate in
;; videos that are transcoded by the media server.
;;
;; This parameter is most useful for RecorderEndpoint and RtpEndpoint: when
;; media is being transcoded (either for streaming or storing on disk), the
;; resulting quality is directly controlled with this value.
;;
;; For WebRtcEndpoint, this value should be left as default, as remote WebRTC
;; receivers will already send feedback to inform the media server about what is
;; the optimal bitrate to send.
;;
;; Setting a value will only work if done before the media starts to flow.
;;
;; * Unit: bps (bits per second).
;; * Default: 300000 (300 kbps).
encoderBitrate=300000
And create a pipeline with x264 encoder and logs enabled, for example I used GST_DEBUG set to the following:
We have made a fix on PR #97 , after testing it should be merged for next release
fab-sgnct
changed the title
'encoderBitrate configured in MediaElement.conf.ini ignored with x264` encoderencoderBitrate configured in MediaElement.conf.ini ignored with x264 encoder
Jan 17, 2025
Prerequisites
Issue description
When using x264 encoder we have the following logs:
The problem is around the error log, see context below.
Context
The consequence of the above is that the bitrate setting is ignored and some max bitrate of 2Mbps is used.
Looking at the code of kurento 7.1.0 (which is the version we use) we can see this piece of code and matching it with the logs:
new_bitrate
to300000
as expected:kbps_div
to1
:so then
new_bitrate
value is300
0
:Indeed
new_bitrate * kbps_div / 1000
is then300 * 1 / 1000
. Hence the error log and this issue report.How to reproduce?
Configure
MediaElement.conf.ini
with the following content:And create a pipeline with
x264
encoder and logs enabled, for example I usedGST_DEBUG
set to the following:Expected & current behavior
I got the unexpected bitrate at the end of the pipeline.
(Optional) Possible solution
Instead of setting value
300000
, I can use value300000000
in configuration and get the following logs:About Kurento Media Server
About your Application Server
The text was updated successfully, but these errors were encountered: