Skip to content

Commit bdd133f

Browse files
committed
disable av1_nvenc
1 parent 4af1f53 commit bdd133f

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

test/test_encoders.py

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,27 +1271,23 @@ def test_extra_options_utilized(self, tmp_path, profile, colorspace, color_range
12711271
@pytest.mark.needs_cuda
12721272
@pytest.mark.skipif(in_fbcode(), reason="ffmpeg CLI not available")
12731273
@pytest.mark.parametrize("pixel_format", ("nv12", "yuv420p"))
1274-
@pytest.mark.parametrize("format_codec", [
1275-
("mov", "h264_nvenc"),
1276-
("mp4", "hevc_nvenc"),
1277-
("avi", "h264_nvenc"),
1278-
pytest.param(
1279-
("mkv", "av1_nvenc"),
1280-
marks=pytest.mark.skipif(
1281-
get_ffmpeg_major_version() <= 5,
1282-
reason="av1_nvenc not supported in FFmpeg 4 and 5"
1283-
)
1284-
),
1285-
("flv", "h264_nvenc")
1286-
])
1274+
@pytest.mark.parametrize(
1275+
"format_codec",
1276+
[
1277+
("mov", "h264_nvenc"),
1278+
("mp4", "hevc_nvenc"),
1279+
("avi", "h264_nvenc"),
1280+
# ("mkv", "av1_nvenc"), # av1_nvenc is not supported on CI
1281+
],
1282+
)
12871283
@pytest.mark.parametrize("method", ("to_file", "to_tensor", "to_file_like"))
12881284
def test_nvenc_against_ffmpeg_cli(
12891285
self, tmp_path, pixel_format, format_codec, method
12901286
):
12911287
# Encode with FFmpeg CLI using nvenc codecs
12921288
format, codec = format_codec
12931289
device = "cuda"
1294-
qp = 1 # Lossless (qp=0) is not supported on av1_nvenc, so we use 1
1290+
qp = 1 # Lossless (qp=0) is not supported on av1_nvenc, so we use 1
12951291
source_frames = self.decode(TEST_SRC_2_720P.path).data.to(device)
12961292

12971293
temp_raw_path = str(tmp_path / "temp_input.raw")
@@ -1320,7 +1316,9 @@ def test_nvenc_against_ffmpeg_cli(
13201316

13211317
ffmpeg_cmd.extend(["-pix_fmt", pixel_format]) # Output format
13221318
if codec == "av1_nvenc":
1323-
ffmpeg_cmd.extend(["-rc", "constqp"]) # Set rate control mode for AV1 else:
1319+
ffmpeg_cmd.extend(
1320+
["-rc", "constqp"]
1321+
) # Set rate control mode for AV1 else:
13241322
ffmpeg_cmd.extend(["-qp", str(qp)]) # Use lossless qp for other codecs
13251323
ffmpeg_cmd.extend([ffmpeg_encoded_path])
13261324

0 commit comments

Comments
 (0)