pytorch / pytorch/vision

torchvision.io.read_video fails to read video with only 1 second

Open
#7,281 5 comments 0 reactions 1 assignee View on GitHub

@bjuncek is already working on this.

Since Feb 19, 2023.

module: io module: vision triaged
Dominant language
Python
Stars
17.9k
Forks
7.3k
Avg merge
1d 15h
Merged PRs (30d)
13

Description

I tried to use torchvision.io.read_video to read videos, but some are empty. I found out they can be played commonly but with a time length of 1 second.
Below is a small example of the error

In python

import torchvision
video_info=torchvision.io.read_video('3199.avi')
video_array = video_info[0]
print(video_array.shape)

###Output

torch.Size([0, 1, 1, 3])

Versions

[conda] pytorch 1.11.0 py3.8_cuda11.3_cudnn8.2.0_0 pytorch
[pip3] torchvision==0.12.0

cc @datumbox @vfdev-5 @pmeier @bjuncek

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.