Skip to content

Commit fb6cf4e

Browse files
committed
Remove outdated installion section
1 parent 8d9b94c commit fb6cf4e

File tree

4 files changed

+43
-69
lines changed

4 files changed

+43
-69
lines changed

av/about.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "14.1.0"
1+
__version__ = "14.2.0rc1"

docs/Makefile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
SPHINXOPTS =
2-
SPHINXBUILD = sphinx-build
32
BUILDDIR = _build
43
PYAV_PIP ?= pip
54
PIP := $(PYAV_PIP)
@@ -17,15 +16,13 @@ _build/rst/%.rst: %.py $(TAGFILE) $(shell find ../include ../av -name '*.pyx' -o
1716
python $< > $@.tmp
1817
mv $@.tmp $@
1918

20-
clean:
21-
rm -rf $(BUILDDIR) $(FFMPEGDIR)
22-
23-
html: $(RENDERED) $(TAGFILE)
19+
html: $(RENDERED)
2420
$(PIP) install -U sphinx
25-
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
21+
rm -rf $(BUILDDIR)
22+
sphinx-build -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
2623

2724
test:
28-
PYAV_SKIP_DOXYLINK=1 $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
25+
PYAV_SKIP_DOXYLINK=1 sphinx-build -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
2926

3027
open:
3128
open _build/html/index.html

docs/conf.py

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ def sandboxed(*args, **kwargs):
8888
doctest_test_doctest_blocks = ""
8989

9090
extlinks = {
91-
"ffmpeg": ("https://ffmpeg.org/doxygen/trunk/%s.html", "%s"),
9291
"ffstruct": ("https://ffmpeg.org/doxygen/trunk/struct%s.html", "struct %s"),
9392
"issue": ("https://github.com/PyAV-Org/PyAV/issues/%s", "#%s"),
9493
"pr": ("https://github.com/PyAV-Org/PyAV/pull/%s", "#%s"),
@@ -203,9 +202,7 @@ def makerow(*texts):
203202

204203
seen = set()
205204
enum_items = [
206-
(name, item)
207-
for name, item in vars(enum).items()
208-
if isinstance(item, enum)
205+
(name, item) for name, item in vars(enum).items() if isinstance(item, enum)
209206
]
210207
for name, item in enum_items:
211208
if name.lower() in seen:
@@ -226,8 +223,45 @@ def makerow(*texts):
226223
return [table]
227224

228225

226+
def ffmpeg_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
227+
"""
228+
Custom role for FFmpeg API links.
229+
Converts :ffmpeg:`AVSomething` into proper FFmpeg API documentation links.
230+
"""
231+
232+
base_url = "https://ffmpeg.org/doxygen/7.0/struct{}.html"
233+
234+
try:
235+
struct_name, member = text.split(".")
236+
except Exception:
237+
struct_name = None
238+
239+
if struct_name is None:
240+
url = base_url.format(text)
241+
else:
242+
fragment = {
243+
"AVCodecContext.thread_count": "#aa852b6227d0778b62e9cc4034ad3720c",
244+
"AVCodecContext.thread_type": "#a7651614f4309122981d70e06a4b42fcb",
245+
"AVCodecContext.skip_frame": "#af869b808363998c80adf7df6a944a5a6",
246+
"AVCodec.capabilities": "#af51f7ff3dac8b730f46b9713e49a2518",
247+
"AVCodecDescriptor.props": "#a9949288403a12812cd6e3892ac45f40f",
248+
}.get(text, f"#{member}")
249+
250+
url = base_url.format(struct_name) + fragment
251+
252+
node = nodes.reference(rawtext, text, refuri=url, **options)
253+
return [node], []
254+
255+
229256
def setup(app):
230257
app.add_css_file("custom.css")
258+
app.add_role("ffmpeg", ffmpeg_role)
231259
app.add_directive("flagtable", EnumTable)
232260
app.add_directive("enumtable", EnumTable)
233261
app.add_directive("pyinclude", PyInclude)
262+
263+
return {
264+
"version": "1.0",
265+
"parallel_read_safe": True,
266+
"parallel_write_safe": True,
267+
}

docs/overview/installation.rst

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -21,63 +21,6 @@ Another way to install PyAV is via `conda-forge <https://conda-forge.github.io>`
2121
See the `Conda quick install <https://conda.io/docs/install/quick.html>`_ docs to get started with (mini)Conda.
2222

2323

24-
Bring your own FFmpeg
25-
---------------------
26-
27-
PyAV can also be compiled against your own build of FFmpeg (version ``7.0`` or higher). You can force installing PyAV from source by running:
28-
29-
.. code-block:: bash
30-
31-
pip install av --no-binary av
32-
33-
PyAV depends upon several libraries from FFmpeg:
34-
35-
- ``libavcodec``
36-
- ``libavdevice``
37-
- ``libavfilter``
38-
- ``libavformat``
39-
- ``libavutil``
40-
- ``libswresample``
41-
- ``libswscale``
42-
43-
and a few other tools in general:
44-
45-
- ``pkg-config``
46-
- Python's development headers
47-
48-
49-
MacOS
50-
^^^^^
51-
52-
On **MacOS**, Homebrew_ saves the day::
53-
54-
brew install ffmpeg pkg-config
55-
56-
.. _homebrew: http://brew.sh/
57-
58-
59-
Ubuntu >= 18.04 LTS
60-
^^^^^^^^^^^^^^^^^^^
61-
62-
On **Ubuntu 18.04 LTS** everything can come from the default sources::
63-
64-
# General dependencies
65-
sudo apt-get install -y python-dev pkg-config
66-
67-
# Library components
68-
sudo apt-get install -y \
69-
libavformat-dev libavcodec-dev libavdevice-dev \
70-
libavutil-dev libswscale-dev libswresample-dev libavfilter-dev
71-
72-
73-
Windows
74-
^^^^^^^
75-
76-
It is possible to build PyAV on Windows without Conda by installing FFmpeg yourself, e.g. from the `shared and dev packages <https://ffmpeg.zeranoe.com/builds/>`_.
77-
78-
Unpack them somewhere (like ``C:\ffmpeg``), and then :ref:`tell PyAV where they are located <build_on_windows>`.
79-
80-
8124
Building from the latest source
8225
-------------------------------
8326

0 commit comments

Comments
 (0)