max h264 kbps is 2000

This commit is contained in:
Maxim Devaev 2022-03-15 19:25:12 +03:00
parent 9346169271
commit a140f11b1b
4 changed files with 4 additions and 4 deletions

View File

@ -432,7 +432,7 @@ def _get_config_scheme() -> Dict:
"h264_bitrate": {
"default": Option(0, type=valid_stream_h264_bitrate, if_empty=0, unpack_as="h264_bitrate"),
"min": Option(25, type=valid_stream_h264_bitrate, unpack_as="h264_bitrate_min"),
"max": Option(25000, type=valid_stream_h264_bitrate, unpack_as="h264_bitrate_max"),
"max": Option(20000, type=valid_stream_h264_bitrate, unpack_as="h264_bitrate_max"),
},
"h264_gop": {

View File

@ -77,7 +77,7 @@ def valid_stream_resolution(arg: Any) -> str:
def valid_stream_h264_bitrate(arg: Any) -> int:
return int(valid_number(arg, min=25, max=25000, name="stream H264 bitrate"))
return int(valid_number(arg, min=25, max=20000, name="stream H264 bitrate"))
def valid_stream_h264_gop(arg: Any) -> int:

View File

@ -131,7 +131,7 @@ def test_fail__valid_stream_resolution(arg: Any) -> None:
# =====
@pytest.mark.parametrize("arg", ["25", " 25000 ", 5000])
@pytest.mark.parametrize("arg", ["25", " 20000 ", 5000])
def test_ok__valid_stream_h264_bitrate(arg: Any) -> None:
value = valid_stream_h264_bitrate(arg)
assert type(value) == int # pylint: disable=unidiomatic-typecheck

View File

@ -432,7 +432,7 @@ export function Streamer() {
});
tools.slider.setOnUpDelayed($("stream-quality-slider"), 1000, (value) => __sendParam("quality", value));
tools.slider.setParams($("stream-h264-bitrate-slider"), 25, 25000, 25, 5000, function(value) {
tools.slider.setParams($("stream-h264-bitrate-slider"), 25, 20000, 25, 5000, function(value) {
$("stream-h264-bitrate-value").innerHTML = value;
});
tools.slider.setOnUpDelayed($("stream-h264-bitrate-slider"), 1000, (value) => __sendParam("h264_bitrate", value));