We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
How to install torchvision to use video_reader backend?
I simply installed torchvision from conda (as advertised on pytorch.org). But `torchvision.set_video_backend('video_reader')` prints `video_reader video backend is not available. Please compile torchvision from source and try again`. This should be mentioned in https://pytorch.org/docs/stable/torchvision/index.html#torchvision.set_video_backend and in torchvision README (including if the `video_reader` is temporarily not supported)

cc @bjuncek

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `torchvision/__init__.py`
Content:
```
1 import warnings
2 import os
3 
4 from .extension import _HAS_OPS
5 
6 from torchvision import models
7 from torchvision import datasets
8 from torchvision import ops
9 from torchvision import transforms
10 from torchvision import utils
11 from torchvision import io
12 
13 import torch
14 
15 try:
16     from .version import __version__  # noqa: F401
17 except ImportError:
18     pass
19 
20 # Check if torchvision is being imported within the root folder
21 if (not _HAS_OPS and os.path.dirname(os.path.realpath(__file__)) ==
22         os.path.join(os.path.realpath(os.getcwd()), 'torchvision')):
23     message = ('You are importing torchvision within its own root folder ({}). '
24                'This is not expected to work and may give errors. Please exit the '
25                'torchvision project source and relaunch your python interpreter.')
26     warnings.warn(message.format(os.getcwd()))
27 
28 _image_backend = 'PIL'
29 
30 _video_backend = "pyav"
31 
32 
33 def set_image_backend(backend):
34     """
35     Specifies the package used to load images.
36 
37     Args:
38         backend (string): Name of the image backend. one of {'PIL', 'accimage'}.
39             The :mod:`accimage` package uses the Intel IPP library. It is
40             generally faster than PIL, but does not support as many operations.
41     """
42     global _image_backend
43     if backend not in ['PIL', 'accimage']:
44         raise ValueError("Invalid backend '{}'. Options are 'PIL' and 'accimage'"
45                          .format(backend))
46     _image_backend = backend
47 
48 
49 def get_image_backend():
50     """
51     Gets the name of the package used to load images
52     """
53     return _image_backend
54 
55 
56 def set_video_backend(backend):
57     """
58     Specifies the package used to decode videos.
59 
60     Args:
61         backend (string): Name of the video backend. one of {'pyav', 'video_reader'}.
62             The :mod:`pyav` package uses the 3rd party PyAv library. It is a Pythonic
63             binding for the FFmpeg libraries.
64             The :mod:`video_reader` package includes a native C++ implementation on
65             top of FFMPEG libraries, and a python API of TorchScript custom operator.
66             It is generally decoding faster than :mod:`pyav`, but perhaps is less robust.
67     """
68     global _video_backend
69     if backend not in ["pyav", "video_reader"]:
70         raise ValueError(
71             "Invalid video backend '%s'. Options are 'pyav' and 'video_reader'" % backend
72         )
73     if backend == "video_reader" and not io._HAS_VIDEO_OPT:
74         message = (
75             "video_reader video backend is not available."
76             " Please compile torchvision from source and try again"
77         )
78         warnings.warn(message)
79     else:
80         _video_backend = backend
81 
82 
83 def get_video_backend():
84     return _video_backend
85 
86 
87 def _is_tracing():
88     return torch._C._get_tracing_state()
89
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/torchvision/__init__.py b/torchvision/__init__.py
--- a/torchvision/__init__.py
+++ b/torchvision/__init__.py
@@ -64,6 +64,10 @@
             The :mod:`video_reader` package includes a native C++ implementation on
             top of FFMPEG libraries, and a python API of TorchScript custom operator.
             It is generally decoding faster than :mod:`pyav`, but perhaps is less robust.
+
+    .. note::
+        Building with FFMPEG is disabled by default in the latest master. If you want to use the 'video_reader'
+        backend, please compile torchvision from source.
     """
     global _video_backend
     if backend not in ["pyav", "video_reader"]:

{"golden_diff": "diff --git a/torchvision/__init__.py b/torchvision/__init__.py\n--- a/torchvision/__init__.py\n+++ b/torchvision/__init__.py\n@@ -64,6 +64,10 @@\n             The :mod:`video_reader` package includes a native C++ implementation on\n             top of FFMPEG libraries, and a python API of TorchScript custom operator.\n             It is generally decoding faster than :mod:`pyav`, but perhaps is less robust.\n+\n+    .. note::\n+        Building with FFMPEG is disabled by default in the latest master. If you want to use the 'video_reader'\n+        backend, please compile torchvision from source.\n     \"\"\"\n     global _video_backend\n     if backend not in [\"pyav\", \"video_reader\"]:\n", "issue": "How to install torchvision to use video_reader backend?\nI simply installed torchvision from conda (as advertised on pytorch.org). But `torchvision.set_video_backend('video_reader')` prints `video_reader video backend is not available. Please compile torchvision from source and try again`. This should be mentioned in https://pytorch.org/docs/stable/torchvision/index.html#torchvision.set_video_backend and in torchvision README (including if the `video_reader` is temporarily not supported)\n\ncc @bjuncek\n", "before_files": [{"content": "import warnings\nimport os\n\nfrom .extension import _HAS_OPS\n\nfrom torchvision import models\nfrom torchvision import datasets\nfrom torchvision import ops\nfrom torchvision import transforms\nfrom torchvision import utils\nfrom torchvision import io\n\nimport torch\n\ntry:\n    from .version import __version__  # noqa: F401\nexcept ImportError:\n    pass\n\n# Check if torchvision is being imported within the root folder\nif (not _HAS_OPS and os.path.dirname(os.path.realpath(__file__)) ==\n        os.path.join(os.path.realpath(os.getcwd()), 'torchvision')):\n    message = ('You are importing torchvision within its own root folder ({}). '\n               'This is not expected to work and may give errors. Please exit the '\n               'torchvision project source and relaunch your python interpreter.')\n    warnings.warn(message.format(os.getcwd()))\n\n_image_backend = 'PIL'\n\n_video_backend = \"pyav\"\n\n\ndef set_image_backend(backend):\n    \"\"\"\n    Specifies the package used to load images.\n\n    Args:\n        backend (string): Name of the image backend. one of {'PIL', 'accimage'}.\n            The :mod:`accimage` package uses the Intel IPP library. It is\n            generally faster than PIL, but does not support as many operations.\n    \"\"\"\n    global _image_backend\n    if backend not in ['PIL', 'accimage']:\n        raise ValueError(\"Invalid backend '{}'. Options are 'PIL' and 'accimage'\"\n                         .format(backend))\n    _image_backend = backend\n\n\ndef get_image_backend():\n    \"\"\"\n    Gets the name of the package used to load images\n    \"\"\"\n    return _image_backend\n\n\ndef set_video_backend(backend):\n    \"\"\"\n    Specifies the package used to decode videos.\n\n    Args:\n        backend (string): Name of the video backend. one of {'pyav', 'video_reader'}.\n            The :mod:`pyav` package uses the 3rd party PyAv library. It is a Pythonic\n            binding for the FFmpeg libraries.\n            The :mod:`video_reader` package includes a native C++ implementation on\n            top of FFMPEG libraries, and a python API of TorchScript custom operator.\n            It is generally decoding faster than :mod:`pyav`, but perhaps is less robust.\n    \"\"\"\n    global _video_backend\n    if backend not in [\"pyav\", \"video_reader\"]:\n        raise ValueError(\n            \"Invalid video backend '%s'. Options are 'pyav' and 'video_reader'\" % backend\n        )\n    if backend == \"video_reader\" and not io._HAS_VIDEO_OPT:\n        message = (\n            \"video_reader video backend is not available.\"\n            \" Please compile torchvision from source and try again\"\n        )\n        warnings.warn(message)\n    else:\n        _video_backend = backend\n\n\ndef get_video_backend():\n    return _video_backend\n\n\ndef _is_tracing():\n    return torch._C._get_tracing_state()\n", "path": "torchvision/__init__.py"}], "after_files": [{"content": "import warnings\nimport os\n\nfrom .extension import _HAS_OPS\n\nfrom torchvision import models\nfrom torchvision import datasets\nfrom torchvision import ops\nfrom torchvision import transforms\nfrom torchvision import utils\nfrom torchvision import io\n\nimport torch\n\ntry:\n    from .version import __version__  # noqa: F401\nexcept ImportError:\n    pass\n\n# Check if torchvision is being imported within the root folder\nif (not _HAS_OPS and os.path.dirname(os.path.realpath(__file__)) ==\n        os.path.join(os.path.realpath(os.getcwd()), 'torchvision')):\n    message = ('You are importing torchvision within its own root folder ({}). '\n               'This is not expected to work and may give errors. Please exit the '\n               'torchvision project source and relaunch your python interpreter.')\n    warnings.warn(message.format(os.getcwd()))\n\n_image_backend = 'PIL'\n\n_video_backend = \"pyav\"\n\n\ndef set_image_backend(backend):\n    \"\"\"\n    Specifies the package used to load images.\n\n    Args:\n        backend (string): Name of the image backend. one of {'PIL', 'accimage'}.\n            The :mod:`accimage` package uses the Intel IPP library. It is\n            generally faster than PIL, but does not support as many operations.\n    \"\"\"\n    global _image_backend\n    if backend not in ['PIL', 'accimage']:\n        raise ValueError(\"Invalid backend '{}'. Options are 'PIL' and 'accimage'\"\n                         .format(backend))\n    _image_backend = backend\n\n\ndef get_image_backend():\n    \"\"\"\n    Gets the name of the package used to load images\n    \"\"\"\n    return _image_backend\n\n\ndef set_video_backend(backend):\n    \"\"\"\n    Specifies the package used to decode videos.\n\n    Args:\n        backend (string): Name of the video backend. one of {'pyav', 'video_reader'}.\n            The :mod:`pyav` package uses the 3rd party PyAv library. It is a Pythonic\n            binding for the FFmpeg libraries.\n            The :mod:`video_reader` package includes a native C++ implementation on\n            top of FFMPEG libraries, and a python API of TorchScript custom operator.\n            It is generally decoding faster than :mod:`pyav`, but perhaps is less robust.\n\n    .. note::\n        Building with FFMPEG is disabled by default in the latest master. If you want to use the 'video_reader'\n        backend, please compile torchvision from source.\n    \"\"\"\n    global _video_backend\n    if backend not in [\"pyav\", \"video_reader\"]:\n        raise ValueError(\n            \"Invalid video backend '%s'. Options are 'pyav' and 'video_reader'\" % backend\n        )\n    if backend == \"video_reader\" and not io._HAS_VIDEO_OPT:\n        message = (\n            \"video_reader video backend is not available.\"\n            \" Please compile torchvision from source and try again\"\n        )\n        warnings.warn(message)\n    else:\n        _video_backend = backend\n\n\ndef get_video_backend():\n    return _video_backend\n\n\ndef _is_tracing():\n    return torch._C._get_tracing_state()\n", "path": "torchvision/__init__.py"}]}