torchvision.io.read_video error
See original GitHub issue🐛 Describe the bug
torchvison io can’t read video. It work fine for images but when reading video it get killed.
Code
from torchvision import io
vd, _, info = io.read_video('sample.mp4')
Error
killed
Versions
System and Environment
Collecting environment information...
PyTorch version: 1.9.1+cu102
Is debug build: False
CUDA used to build PyTorch: 10.2
ROCM used to build PyTorch: N/A
OS: Ubuntu 20.04.3 LTS (x86_64)
GCC version: (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Clang version: Could not collect
CMake version: version 3.16.3
Libc version: glibc-2.10
Python version: 3.7.9 (default, Aug 31 2020, 12:42:55) [GCC 7.3.0] (64-bit runtime)
Python platform: Linux-5.11.0-40-generic-x86_64-with-debian-bullseye-sid
Is CUDA available: True
CUDA runtime version: 11.4.120
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 2060 with Max-Q Design
Nvidia driver version: 470.57.02
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.2.1
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.2.1
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.2.1
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.2.1
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.2.1
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.2.1
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.2.1
HIP runtime version: N/A
MIOpen runtime version: N/A
Versions of relevant libraries:
[pip3] efficientnet-pytorch==0.7.1
[pip3] facenet-pytorch==2.5.2
[pip3] mypy-extensions==0.4.3
[pip3] numpy==1.19.2
[pip3] pytorch-ignite==0.4.4
[pip3] pytorch-lightning==1.3.5
[pip3] tensorboard-pytorch==0.7.1
[pip3] torch==1.9.1
[pip3] torch-tb-profiler==0.2.1
[pip3] torchaudio==0.7.0a0+a853dff
[pip3] torchmetrics==0.3.2
[pip3] torchvision==0.10.1
[conda] blas 1.0 mkl
[conda] cudatoolkit 11.0.221 h6bb024c_0
[conda] efficientnet-pytorch 0.7.1 pypi_0 pypi
[conda] facenet-pytorch 2.5.2 pypi_0 pypi
[conda] mkl 2020.2 256
[conda] mkl-service 2.3.0 py37he8ac12f_0
[conda] mkl_fft 1.2.0 py37h23d657b_0
[conda] mkl_random 1.1.1 py37h0573a6f_0
[conda] mypy-extensions 0.4.3 pypi_0 pypi
[conda] numpy 1.19.2 py37h54aff64_0
[conda] numpy-base 1.19.2 py37hfa32c7d_0
[conda] pytorch-ignite 0.4.4 pypi_0 pypi
[conda] pytorch-lightning 1.3.5 pypi_0 pypi
[conda] tensorboard-pytorch 0.7.1 pypi_0 pypi
[conda] torch 1.9.1 pypi_0 pypi
[conda] torch-tb-profiler 0.2.1 pypi_0 pypi
[conda] torchaudio 0.7.2 py37 pytorch
[conda] torchmetrics 0.3.2 pypi_0 pypi
[conda] torchvision 0.10.1 pypi_0 pypi
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Reading/Writing images and videos - PyTorch
The torchvision.io package provides functions for performing IO operations. They are currently specific to reading and writing video and images.
Read more >Failing to load a large video in pytorch - Stack Overflow
The failure occurs at torch.stack(vid_tensor). There is no error, the execution simply stops. The same occurs if I run torchvision.io.read_video ...
Read more >torchvision Changelog - pyup.io
[IO] Replace hardcoded error code with ENODATA (3277) ... new video reading API (released as Beta) which is more flexible than `torchvision.io.read_video`.
Read more >[D] Efficiently loading videos in PyTorch without extracting ...
I tried it but I got similar speed as OpenCV and it threw errors for ... For videos on disk I use torchvision.io.read_video,...
Read more >torchvision.io.read_video Example - Program Talk
Learn how to use python api torchvision.io.read_video. ... ValueError('Unexpected error during loading of frame') # sometimes torchvision returns multiple ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@prabhat00155 With latest version, the problem is fixed.
Do you get this on any video or one particular video? Also, I see that you are on older version of pytorch and torchvision. Could you try with the latest and see if you still get the crash.