diff --git a/torchvision/io/video.py b/torchvision/io/video.py index 2e3dbed65a2..c2a8c889162 100644 --- a/torchvision/io/video.py +++ b/torchvision/io/video.py @@ -115,7 +115,7 @@ def write_video( # PyAV does not support floating point numbers with decimal point # and will throw OverflowException in case this is not the case if isinstance(fps, float): - fps = np.round(fps) + fps = int(np.round(fps)) with av.open(filename, mode="w") as container: stream = container.add_stream(video_codec, rate=fps)