TypeError: an integer is required #1666
-
OverviewI would like to output a video but get the follwoing error: import torch
import torchvision
# Example dummy video tensor
video = torch.randint(0, 255, (30, 720, 1280, 3), dtype=torch.uint8) # 30 frames of 720p video
# Write the video
torchvision.io.write_video("test_video.mp4", video, fps=30, video_codec="h264") Error:
Expected behaviorGet a video file. Actual behaviorError Versions
ResearchI have done the following:
|
Beta Was this translation helpful? Give feedback.
Answered by
WyattBlue
Dec 6, 2024
Replies: 4 comments 2 replies
-
Go report this to torchvision |
Beta Was this translation helpful? Give feedback.
1 reply
This comment was marked as off-topic.
This comment was marked as off-topic.
-
Replace with. frame.pict_type = PictureType.NONE
# or
frame.pict_type = 0 Major versions bumps are allowed to breaking. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
WyattBlue
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Replace with.
Major versions bumps are allowed to breaking.