Skip to content

UserWarning: video_reader video backend is not available #2216

Closed
@fepegar

Description

@fepegar

🐛 Bug

I get a "video_reader video backend is not available" warning when trying to set it.

To Reproduce

Steps to reproduce the behavior:

$ conda create -n tv python -y && conda activate tv
$ pip install numpy                                                                                               
$ pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
$ python -c "import torchvision; torchvision.set_video_backend('video_reader')"

Output:

[('__call__', <function LevelMapper.__call__ at 0x123462820>), ('__init__', <function LevelMapper.__init__ at 0x123462790>)]
[('__call__', <function BalancedPositiveNegativeSampler.__call__ at 0x123649280>), ('__init__', <function BalancedPositiveNegativeSampler.__init__ at 0x1236491f0>)]
[('__init__', <function BoxCoder.__init__ at 0x123657af0>), ('decode', <function BoxCoder.decode at 0x123657ca0>), ('decode_single', <function BoxCoder.decode_single at 0x123657d30>), ('encode', <function BoxCoder.encode at 0x123657b80>), ('encode_single', <function BoxCoder.encode_single at 0x123657c10>)]
[('__call__', <function Matcher.__call__ at 0x1234628b0>), ('__init__', <function Matcher.__init__ at 0x123649160>), ('set_low_quality_matches_', <function Matcher.set_low_quality_matches_ at 0x123462700>)]
[('__init__', <function ImageList.__init__ at 0x123657e50>), ('to', <function ImageList.to at 0x123657a60>)]
[('__init__', <function Timebase.__init__ at 0x123b8cca0>)]
[('__init__', <function VideoMetaData.__init__ at 0x123b8ce50>)]
/usr/local/Caskroom/miniconda/base/envs/tv/lib/python3.8/site-packages/torchvision/__init__.py:65: UserWarning: video_reader video backend is not available
  warnings.warn("video_reader video backend is not available")

I'm using the nightly version because I hoped this would be fixed in #2183.

I get only the warning (i.e. last two lines) in the stable pip release.

Expected behavior

No warning when I set the backend.

Environment

PyTorch version: 1.6.0.dev20200514
Is debug build: No
CUDA used to build PyTorch: None

OS: Mac OSX 10.15.4
GCC version: Could not collect
CMake version: version 3.17.2

Python version: 3.8
Is CUDA available: No
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA

Versions of relevant libraries:
[pip] numpy==1.18.4
[pip] torch==1.6.0.dev20200514
[pip] torchvision==0.7.0.dev20200514
[conda] numpy 1.18.4 pypi_0 pypi
[conda] torch 1.6.0.dev20200514 pypi_0 pypi
[conda] torchvision 0.7.0.dev20200514 pypi_0 pypi

Additional context

Discovered when I tried following @bjuncek advice in #1884.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions