From bb4f6f3993cff9e7d70f63dd09ff1b9f239140ef Mon Sep 17 00:00:00 2001 From: Maxim Devaev Date: Tue, 15 Mar 2022 16:22:07 +0300 Subject: [PATCH] h264 max kbps is 20000 --- src/ustreamer/m2m.c | 2 +- src/ustreamer/options.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ustreamer/m2m.c b/src/ustreamer/m2m.c index b06b3d8..66d5893 100644 --- a/src/ustreamer/m2m.c +++ b/src/ustreamer/m2m.c @@ -70,7 +70,7 @@ m2m_encoder_s *m2m_h264_encoder_init(const char *name, const char *path, unsigne m2m_encoder_s *m2m_mjpeg_encoder_init(const char *name, const char *path, unsigned quality) { const double b_min = 25; - const double b_max = 25000; + const double b_max = 20000; const double step = 25; double bitrate = log10(quality) * (b_max - b_min) / 2 + b_min; bitrate = step * round(bitrate / step); diff --git a/src/ustreamer/options.c b/src/ustreamer/options.c index 4fb9095..4109b56 100644 --- a/src/ustreamer/options.c +++ b/src/ustreamer/options.c @@ -439,7 +439,7 @@ int options_parse(options_s *options, device_s *dev, encoder_s *enc, stream_s *s ADD_SINK("", sink, SINK) ADD_SINK("raw-", raw_sink, RAW_SINK) ADD_SINK("h264-", h264_sink, H264_SINK) - case _O_H264_BITRATE: OPT_NUMBER("--h264-bitrate", stream->h264_bitrate, 25, 25000, 0); + case _O_H264_BITRATE: OPT_NUMBER("--h264-bitrate", stream->h264_bitrate, 25, 20000, 0); case _O_H264_GOP: OPT_NUMBER("--h264-gop", stream->h264_gop, 0, 60, 0); case _O_H264_M2M_DEVICE: OPT_SET(stream->h264_m2m_path, optarg); # undef ADD_SINK