fix(encode): use modern nvenc low-latency preset

This commit is contained in:
2026-03-11 00:37:46 +08:00
parent e16ceec647
commit f59abb2a32
3 changed files with 28 additions and 3 deletions
+3 -1
View File
@@ -7,6 +7,7 @@ SRS_ROOT="${SRS_ROOT:-$HOME/Code/srs}"
SRS_BIN="${SRS_BIN:-$SRS_ROOT/trunk/objs/srs}"
SRS_CONF="${SRS_CONF:-$SRS_ROOT/trunk/conf/srs.conf}"
FFPROBE_BIN="${FFPROBE_BIN:-ffprobe}"
ENCODER_DEVICE="${ENCODER_DEVICE:-software}"
wait_for_port() {
local host="$1"
@@ -48,7 +49,7 @@ wait_for_stream() {
run_case() {
local transport="$1"
local codec="$2"
local stream_name="cvmmap_${transport}_${codec}"
local stream_name="cvmmap_${transport}_${codec}_${ENCODER_DEVICE}"
local expected_codec="$codec"
if [[ "$codec" == "h265" ]]; then
expected_codec="hevc"
@@ -57,6 +58,7 @@ run_case() {
"${BUILD_DIR}/rtmp_output_tester" \
--transport "$transport" \
--codec "$codec" \
--encoder-device "$ENCODER_DEVICE" \
--rtmp-url "rtmp://127.0.0.1/live/${stream_name}" \
--frames 36 \
--frame-interval-ms 33 \