From 63be5652276237679e0376cc904f1e1801231c6a Mon Sep 17 00:00:00 2001 From: Deivid Soto Date: Wed, 10 Jun 2026 12:00:33 +0200 Subject: [PATCH] test(hls): cubrir -forced_idr de QSV en el rate-control --- internal/engine/hls_ratecontrol_test.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/internal/engine/hls_ratecontrol_test.go b/internal/engine/hls_ratecontrol_test.go index a971277..9a1cc19 100644 --- a/internal/engine/hls_ratecontrol_test.go +++ b/internal/engine/hls_ratecontrol_test.go @@ -98,6 +98,19 @@ func TestBuildHLSFFmpegArgsRateControl(t *testing.T) { } }) + t.Run("qsv keeps bitrate + forced_idr", func(t *testing.T) { + cfg := base + cfg.Transcode.HWAccel = HWAccelQSV + got := strings.Join(buildHLSFFmpegArgsAt(cfg, probe, "/tmp/tmpdir", 0, 0), " ") + // -forced_idr 1 (QSV's spelling): same non-IDR forced-keyframe failure + // mode as NVENC — without it segments stretch to the full GOP. + for _, want := range []string{"-look_ahead 0", "-forced_idr 1", "-b:v 6000k"} { + if !strings.Contains(got, want) { + t.Errorf("qsv argv missing %q\n%s", want, got) + } + } + }) + t.Run("vaapi keeps fixed-bitrate triple", func(t *testing.T) { cfg := base cfg.Transcode.HWAccel = HWAccelVAAPI