diff --git a/test/decoders/manual_smoke_test.py b/test/decoders/manual_smoke_test.py index 7fe5878b..4a1b7b17 100644 --- a/test/decoders/manual_smoke_test.py +++ b/test/decoders/manual_smoke_test.py @@ -1,7 +1,7 @@ import os -import cv2 import torchcodec +from torchvision.io.image import write_png decoder = torchcodec.decoders._core.create_from_file( os.path.dirname(__file__) + "/../resources/nasa_13013.mp4" @@ -10,5 +10,5 @@ frame = torchcodec.decoders._core.get_frame_at_index( decoder, stream_index=3, frame_index=180 ) - -cv2.imwrite("frame180.png", frame.numpy()) +frame = frame.permute(2, 0, 1) +write_png(frame, "frame180.png")