-
Notifications
You must be signed in to change notification settings - Fork 417
Closed as not planned
Description
Overview
I 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:
File av/video/frame.pyx:193, in av.video.frame.VideoFrame.pict_type.__set__()
TypeError: an integer is required
Expected behavior
Get a video file.
Actual behavior
Error
Versions
python = "^3.10"
torch = "^2.5.1"
torchvision = "^0.20.1"
lightning = "^2.4.0"
torchmetrics = "^1.5.1"
hydra-core = "^1.3.2"
hydra-colorlog = "^1.2.0"
hydra-optuna-sweeper = "^1.2.0"
rootutils = "^1.0.7"
pre-commit = "^4.0.1"
rich = "^13.9.4"
pytest = "^8.3.3"
torchrl = "^0.6.0"
tensordict = "^0.6.2"
ipykernel = "^6.29.5"
gymnasium = {extras = ["atari"], version = "<1.0.0"}
pygame = "^2.6.1"
av = "^14.0.0"
ffmpeg version 4.4.2-0ubuntu0.22.04.1
Research
I have done the following:
- Checked the PyAV documentation
- Searched on Google
- Searched on Stack Overflow
- Looked through old GitHub issues
Metadata
Metadata
Assignees
Labels
No labels