Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let SceneFileWriter access ffmpeg via av instead of via external process #3501

Merged
merged 134 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from 131 commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
61222b5
added av as a dependency
behackl Dec 7, 2023
fa18ed5
make partial movie files use av instead of piping to external ffmpeg
behackl Dec 7, 2023
9ad5275
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 7, 2023
99e4e2f
opengl rendering: use av for movie files
behackl Dec 7, 2023
de1721b
Merge branch 'av-support' of github.com:behackl/manim into av-support
behackl Dec 7, 2023
205ab34
no need to check for ffmpeg executable
behackl Dec 7, 2023
86967dd
refactor: *_movie_pipe -> *_partial_movie_stream
behackl Dec 7, 2023
fabd4d1
improve (oneline) documentation
behackl Dec 7, 2023
068689b
pass more options to partial movie file rendering
behackl Dec 7, 2023
fb4233b
move ffmpeg verbosity settings to config; renamed option dict
behackl Dec 7, 2023
d8b99e8
replaced call to ffmpeg in combine_files by using av
behackl Dec 7, 2023
0f33f2b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 7, 2023
9adb09d
there was one examples saved as a gif?
behackl Dec 7, 2023
93cdf35
Merge branch 'av-support' of github.com:behackl/manim into av-support
behackl Dec 7, 2023
c1afbd6
chore(deps): re-order av
jeertmans Dec 8, 2023
50f5790
chore(lib): simplify `write_frame` method
jeertmans Dec 8, 2023
efcb12d
chore(lib): add audio
jeertmans Dec 8, 2023
6f7523d
fix(lib): same issue for conversion
jeertmans Dec 8, 2023
3b7772a
fix(lib): webm export
jeertmans Dec 8, 2023
6f62ed1
fix(lib): transparent export
jeertmans Dec 8, 2023
5f76ccf
try(lib): fix gif + TODOs
jeertmans Dec 8, 2023
11aebee
chore(deps): lower dep crit
jeertmans Dec 8, 2023
176e177
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 8, 2023
ca12971
feat(lib): add support for GIF
jeertmans Dec 11, 2023
26be507
fix(ci): rewrite tests
jeertmans Dec 11, 2023
0dd41d1
fix
jeertmans Dec 11, 2023
325ccba
chore(ci): prevent calling concat on empty list
jeertmans Dec 11, 2023
5f848bf
add missing dot
jeertmans Dec 11, 2023
788270c
Merge branch 'main' into av-support
jeertmans Dec 11, 2023
904cfb4
fix(ci): update frame comparison ?
jeertmans Dec 12, 2023
0ec9ab2
Merge branch 'main' into av-support
jeertmans Dec 12, 2023
8cc54c7
fix(log): add handler to libav logger
jeertmans Dec 12, 2023
2df10f6
Merge remote-tracking branch 'behackl/av-support' into av-support
jeertmans Dec 12, 2023
3983e13
chore: add TODO
jeertmans Dec 12, 2023
1286897
fix(lib): concat issue
jeertmans Dec 12, 2023
46b79d3
Revert "fix(ci): update frame comparison ?"
jeertmans Dec 12, 2023
156424d
fix(ci): make it pass tests
jeertmans Dec 12, 2023
7c96eaf
chore(lib/docs/ci): remove FFMPEG entirely
jeertmans Dec 12, 2023
eeaa3d9
added av as a dependency
behackl Dec 7, 2023
6ed0362
make partial movie files use av instead of piping to external ffmpeg
behackl Dec 7, 2023
717c50f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 7, 2023
3c2d56b
opengl rendering: use av for movie files
behackl Dec 7, 2023
3ace234
no need to check for ffmpeg executable
behackl Dec 7, 2023
731b287
refactor: *_movie_pipe -> *_partial_movie_stream
behackl Dec 7, 2023
2e41ce4
improve (oneline) documentation
behackl Dec 7, 2023
10e13e1
pass more options to partial movie file rendering
behackl Dec 7, 2023
d03aadb
move ffmpeg verbosity settings to config; renamed option dict
behackl Dec 7, 2023
16b0408
replaced call to ffmpeg in combine_files by using av
behackl Dec 7, 2023
74941f3
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 7, 2023
be993f1
there was one examples saved as a gif?
behackl Dec 7, 2023
7a4e6dc
chore(deps): re-order av
jeertmans Dec 8, 2023
463a630
chore(lib): simplify `write_frame` method
jeertmans Dec 8, 2023
e3f1c6f
chore(lib): add audio
jeertmans Dec 8, 2023
ead0b58
fix(lib): same issue for conversion
jeertmans Dec 8, 2023
e22e485
fix(lib): webm export
jeertmans Dec 8, 2023
cded948
fix(lib): transparent export
jeertmans Dec 8, 2023
c147bca
try(lib): fix gif + TODOs
jeertmans Dec 8, 2023
736b1ee
chore(deps): lower dep crit
jeertmans Dec 8, 2023
e10e726
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 8, 2023
4fbbd3c
feat(lib): add support for GIF
jeertmans Dec 11, 2023
0ddb1a0
fix(ci): rewrite tests
jeertmans Dec 11, 2023
7ed675f
fix
jeertmans Dec 11, 2023
f9aa05f
chore(ci): prevent calling concat on empty list
jeertmans Dec 11, 2023
931caab
add missing dot
jeertmans Dec 11, 2023
23ec3b2
fix(ci): update frame comparison ?
jeertmans Dec 12, 2023
86e78cc
fix(log): add handler to libav logger
jeertmans Dec 12, 2023
7c716e4
chore: add TODO
jeertmans Dec 12, 2023
482a108
fix(lib): concat issue
jeertmans Dec 12, 2023
cd9c4b4
Revert "fix(ci): update frame comparison ?"
jeertmans Dec 12, 2023
6c0bf90
fix(ci): make it pass tests
jeertmans Dec 12, 2023
18f0020
chore(lib/docs/ci): remove FFMPEG entirely
jeertmans Dec 12, 2023
a6f381f
chore(deps): update lockfile
jeertmans Dec 12, 2023
d839aa1
Merge remote-tracking branch 'behackl/av-support' into av-support
jeertmans Dec 12, 2023
ec799a9
chore(lib): rewrite ffprobe
jeertmans Dec 12, 2023
83758b8
Merge branch 'main' into av-support
jeertmans Dec 18, 2023
bafd285
Merge remote-tracking branch 'origin/main' into av-support
behackl Jan 31, 2024
9d33785
fix typo
behackl Jan 31, 2024
7d10ac7
slightly more aggressive removal of ffmpeg in docs; minor language ch…
behackl Jan 31, 2024
a8a3228
fix gif output stream dimensions
behackl Jan 31, 2024
c4c44f4
minor style change
behackl Feb 2, 2024
2882ed1
fix encoding of (transparent) mov files
behackl Feb 2, 2024
f4ae088
fixed metadata / comment
behackl Feb 3, 2024
7bca93b
set frame rate for --format=gif in output_stream
behackl Feb 3, 2024
f16d739
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 3, 2024
397c6e0
more video tests for different render settings, also test pix_fmt
behackl Feb 12, 2024
305fb31
improve default bitrate setting via crf
behackl Feb 12, 2024
9f01f43
Merge branch 'av-support' of github.com:behackl/manim into av-support
behackl Feb 12, 2024
4aec603
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 12, 2024
85d2326
Merge remote-tracking branch 'origin/main' into av-support
behackl Apr 19, 2024
fb5132d
parametrized format/transparency rendering test
behackl Apr 24, 2024
9ec6169
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 24, 2024
60abd6e
context managers for (some) av.open
behackl Apr 24, 2024
e7a0f3e
Merge branch 'av-support' of github.com:behackl/manim into av-support
behackl Apr 24, 2024
e0a2f29
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 24, 2024
418ef26
Update manim/utils/commands.py
behackl Apr 24, 2024
8cb266c
Merge branch 'main' into av-support
behackl Apr 25, 2024
28718aa
fixed segfault
behackl Apr 25, 2024
f1485e9
update test data involving implicit functions (output improved!)
behackl Apr 25, 2024
ca711b0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 25, 2024
4c45836
explicity set pix_fmt for transparent webms
behackl Apr 25, 2024
518bef9
Merge branch 'av-support' of github.com:behackl/manim into av-support
behackl Apr 25, 2024
03651f7
special-special case extracting frame from vp9-encoded file with tran…
behackl Apr 27, 2024
25a2419
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 27, 2024
1d8176d
fix transparent gifs, more special casing in parametrized video forma…
behackl Apr 27, 2024
bb9fb87
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 27, 2024
38b9011
Merge remote-tracking branch 'origin/main' into av-support
behackl Apr 28, 2024
f50efa4
run tests on macos-latest again
behackl Apr 28, 2024
4de6f85
removed old control data
behackl Apr 30, 2024
e60b542
Revert "run tests on macos-latest again"
behackl Apr 30, 2024
5fe5bb5
added sound to codec test; fixed issue with sound track in gif (disab…
behackl May 1, 2024
6f2473f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 1, 2024
174a631
manual wav -> ogg transcoding
behackl May 1, 2024
917294f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 1, 2024
d8ff9aa
fixed f-string
behackl May 1, 2024
aeaca15
Merge branch 'av-support' of github.com:behackl/manim into av-support
behackl May 1, 2024
4727a09
refactored codec test, split out gif
behackl May 1, 2024
761ab71
check for non-zero audio samples
behackl May 1, 2024
db8fac0
more cleanup
behackl May 1, 2024
e0a664d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 1, 2024
4633c41
Merge remote-tracking branch 'origin/main' into av-support
behackl May 1, 2024
2781a6d
Merge branch 'av-support' of github.com:behackl/manim into av-support
behackl May 1, 2024
39dcb6e
remove ffmpeg from readthedocs apt_packages
behackl May 1, 2024
dd3a545
round up run_time if positive and shorter than current frame rate
behackl May 5, 2024
15abc8c
added more run_time tests
behackl May 5, 2024
d91f412
black
behackl May 5, 2024
3ddbcc3
improve implementation of test
behackl May 5, 2024
f2a6e66
Merge remote-tracking branch 'origin/main' into av-support
behackl May 5, 2024
14ccf50
removed some unused imports
behackl May 9, 2024
1eb5a42
improve wording of logged warning
behackl May 9, 2024
878debf
move run_time checks from Animation.begin to Scene.get_run_time
behackl May 12, 2024
7d0c892
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 12, 2024
0048b72
remove unused import
behackl May 12, 2024
36207c6
flake: PT012
behackl May 12, 2024
e3f9ced
Merge branch 'main' into av-support
behackl May 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,5 @@ PASTE HERE
<!-- output of `tlmgr list --only-installed` for TeX Live or a screenshot of the Packages page for MikTeX -->
</details>

<details><summary>FFMPEG</summary>

Output of `ffmpeg -version`:

```
PASTE HERE
```
</details>

## Additional comments
<!-- Add further context that you think might be relevant for this issue here. -->
9 changes: 0 additions & 9 deletions .github/ISSUE_TEMPLATE/installation_issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,5 @@ PASTE HERE
<!-- output of `tlmgr list --only-installed` for TeX Live or a screenshot of the Packages page for MikTeX -->
</details>

<details><summary>FFMPEG</summary>

Output of `ffmpeg -version`:

```
PASTE HERE
```
</details>

## Additional comments
<!-- Add further context that you think might be relevant for this issue here. -->
6 changes: 0 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@ jobs:
run: |
echo "date=$(/bin/date -u "+%m%w%Y")" >> $GITHUB_OUTPUT

- name: Install and cache ffmpeg (all OS)
uses: FedericoCarboni/setup-ffmpeg@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
id: setup-ffmpeg

- name: Install system dependencies (Linux)
if: runner.os == 'Linux'
uses: awalsh128/cache-apt-pkgs-action@latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-publish-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Install system dependencies
run: |
sudo apt update && sudo apt install -y \
pkg-config libcairo-dev libpango1.0-dev ffmpeg wget fonts-roboto
pkg-config libcairo-dev libpango1.0-dev wget fonts-roboto
wget -qO- "https://yihui.org/tinytex/install-bin-unix.sh" | sh
echo ${HOME}/.TinyTeX/bin/x86_64-linux >> $GITHUB_PATH

Expand Down
1 change: 0 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ build:

apt_packages:
- libpango1.0-dev
- ffmpeg
- graphviz

python:
Expand Down
1 change: 0 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ FROM python:3.11-slim

RUN apt-get update -qq \
&& apt-get install --no-install-recommends -y \
ffmpeg \
build-essential \
gcc \
cmake \
Expand Down
4 changes: 2 additions & 2 deletions docs/source/contributing/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ For first-time contributors
#. Install Manim:

- Follow the steps in our :doc:`installation instructions
<../installation>` to install **Manim's dependencies**,
primarily ``ffmpeg`` and ``LaTeX``.
<../installation>` to install **Manim's system dependencies**.
We also recommend installing a LaTeX distribution.

- We recommend using `Poetry <https://python-poetry.org>`__ to manage your
developer installation of Manim. Poetry is a tool for dependency
Expand Down
18 changes: 9 additions & 9 deletions docs/source/guides/deep_dive.rst
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ The scene then asks its renderer to initialize the scene by calling

Inspecting both the default Cairo renderer and the OpenGL renderer shows that the ``init_scene``
method effectively makes the renderer instantiate a :class:`.SceneFileWriter` object, which
basically is Manim's interface to ``ffmpeg`` and actually writes the movie file. The Cairo
basically is Manim's interface to ``libav`` (FFMPEG) and actually writes the movie file. The Cairo
renderer (see the implementation `here <https://github.com/ManimCommunity/manim/blob/main/manim/renderer/cairo_renderer.py>`__) does not require any further initialization. The OpenGL renderer
does some additional setup to enable the realtime rendering preview window, which we do not go
into detail further here.
Expand Down Expand Up @@ -310,8 +310,8 @@ the order they are called, these customizable methods are:
After these three methods are run, the animations have been fully rendered,
and Manim calls :meth:`.CairoRenderer.scene_finished` to gracefully
complete the rendering process. This checks whether any animations have been
played -- and if so, it tells the :class:`.SceneFileWriter` to close the pipe
to ``ffmpeg``. If not, Manim assumes that a static image should be output
played -- and if so, it tells the :class:`.SceneFileWriter` to close the output
file. If not, Manim assumes that a static image should be output
which it then renders using the same strategy by calling the render loop
(see below) once.

Expand Down Expand Up @@ -762,10 +762,10 @@ to learn more, the :func:`.get_hash_from_play_call` function in the
mechanism.

In the event that the animation has to be rendered, the renderer asks
its :class:`.SceneFileWriter` to start a writing process. The process
is started by a call to ``ffmpeg`` and opens a pipe to which rendered
raw frames can be written. As long as the pipe is open, the process
can be accessed via the ``writing_process`` attribute of the file writer.
its :class:`.SceneFileWriter` to open an output container. The process
is started by a call to ``libav`` and opens a container to which rendered
raw frames can be written. As long as the output is open, the container
can be accessed via the ``output_container`` attribute of the file writer.
With the writing process in place, the renderer then asks the scene
to "begin" the animations.

Expand Down Expand Up @@ -815,7 +815,7 @@ time is extracted (3 seconds long) and stored in
skip (it should not), then whether the animation is already
cached (it is not). The corresponding animation hash value is
determined and passed to the file writer, which then also calls
``ffmpeg`` to start the writing process which waits for rendered
``libav`` to start the writing process which waits for rendered
frames from the library.

The scene then ``begin``\ s the animation: for the
Expand Down Expand Up @@ -1001,7 +1001,7 @@ and :meth:`.Animation.clean_up_from_scene` methods are called.
In the end, the time progression is closed (which completes the displayed progress bar)
in the terminal. With the closing of the time progression, the
:meth:`.Scene.play_internal` call is completed, and we return to the renderer,
which now orders the :class:`.SceneFileWriter` to close the movie pipe that has
which now orders the :class:`.SceneFileWriter` to close the output container that has
been opened for this animation: a partial movie file is written.

This pretty much concludes the walkthrough of a :class:`.Scene.play` call,
Expand Down
5 changes: 2 additions & 3 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ Installing Manim via Conda and related environment managers
Conda is a package manager for Python that allows creating environments
where all your dependencies are stored. Like this, you don't clutter up your PC with
unwanted libraries and you can just delete the environment when you don't need it anymore.
It is a good way to install manim since all dependencies like
``ffmpeg``, ``pycairo``, etc. come with it.
It is a good way to install manim since all dependencies like ``pycairo``, etc. come with it.
Also, the installation steps are the same, no matter if you are
on Windows, Linux, Intel Macs or on Apple Silicon.

Expand Down Expand Up @@ -69,7 +68,7 @@ in order for Manim to work properly, some additional system
dependencies need to be installed first. The following pages have
operating system specific instructions for you to follow.

Manim requires Python version ``3.8`` or above to run.
Manim requires Python version ``3.9`` or above to run.

.. hint::

Expand Down
2 changes: 1 addition & 1 deletion docs/source/installation/jupyter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ then execute it.
.. code-block::

!sudo apt update
!sudo apt install libcairo2-dev ffmpeg \
!sudo apt install libcairo2-dev \
texlive texlive-latex-extra texlive-fonts-extra \
texlive-latex-recommended texlive-science \
tipa libpango1.0-dev
Expand Down
19 changes: 5 additions & 14 deletions docs/source/installation/linux.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ The installation instructions depend on your particular operating
system and package manager. If you happen to know exactly what you are doing,
you can also simply ensure that your system has:

- a reasonably recent version of Python 3 (3.8 or above),
- a reasonably recent version of Python 3 (3.9 or above),
- with working Cairo bindings in the form of
`pycairo <https://cairographics.org/pycairo/>`__,
- FFmpeg accessible from the command line as ``ffmpeg``,
- and `Pango <https://pango.gnome.org>`__ headers.

Then, installing Manim is just a matter of running:
Expand All @@ -33,13 +32,13 @@ Required Dependencies
apt – Ubuntu / Mint / Debian
****************************

To first update your sources, and then install Cairo, Pango, and FFmpeg
To first update your sources, and then install Cairo and Pango
simply run:

.. code-block:: bash

sudo apt update
sudo apt install build-essential python3-dev libcairo2-dev libpango1.0-dev ffmpeg
sudo apt install build-essential python3-dev libcairo2-dev libpango1.0-dev

If you don't have python3-pip installed, install it via:

Expand Down Expand Up @@ -72,14 +71,6 @@ need the Python development headers:

sudo dnf install python3-devel

FFmpeg is only available via the RPMfusion repository which you have to
configure first – please consult https://rpmfusion.org/Configuration/ for
instructions. Then, install FFmpeg:

.. code-block:: bash

sudo dnf install ffmpeg

At this point you have all required dependencies and can install
Manim by running:

Expand All @@ -100,12 +91,12 @@ pacman – Arch / Manjaro

If you don't want to use the packaged version from AUR, here is what
you need to do manually: Update your package sources, then install
Cairo, Pango, and FFmpeg:
Cairo and Pango:

.. code-block:: bash

sudo pacman -Syu
sudo pacman -S cairo pango ffmpeg
sudo pacman -S cairo pango

If you don't have ``python-pip`` installed, get it by running:

Expand Down
4 changes: 2 additions & 2 deletions docs/source/installation/macos.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ follow `Homebrew's installation instructions <https://docs.brew.sh/Installation>
Required Dependencies
---------------------

To install all required dependencies for installing Manim (namely: ffmpeg, Python,
To install all required dependencies for installing Manim (namely: Python,
and some required Python packages), run:

.. code-block:: bash

brew install py3cairo ffmpeg
brew install py3cairo

On *Apple Silicon* based machines (i.e., devices with the M1 chip or similar; if
you are unsure which processor you have check by opening the Apple menu, select
Expand Down
86 changes: 11 additions & 75 deletions docs/source/installation/windows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ Windows

The easiest way of installing Manim and its dependencies is by using a
package manager like `Chocolatey <https://chocolatey.org/>`__
or `Scoop <https://scoop.sh>`__. If you are not afraid of editing
your System's ``PATH``, a manual installation is also possible.
In fact, if you already have an existing Python
installation (3.8 or above), it might be the easiest way to get
everything up and running.
or `Scoop <https://scoop.sh>`__, especially if you need optional dependencies
like LaTeX support.

If you choose to use one of the package managers, please follow
their installation instructions
Expand All @@ -19,7 +16,7 @@ to make one of them available on your system.
Required Dependencies
---------------------

Manim requires a recent version of Python (3.8 or above) and ``ffmpeg``
Manim requires a recent version of Python (3.9 or above)
in order to work.

Chocolatey
Expand All @@ -34,53 +31,11 @@ Manim can be installed via Chocolatey simply by running:
That's it, no further steps required. You can continue with installing
the :ref:`optional dependencies <win-optional-dependencies>` below.

Scoop
*****

While there is no recipe for installing Manim with Scoop directly,
you can install all requirements by running:

.. code-block:: powershell

scoop install python ffmpeg

and then Manim can be installed by running:

.. code-block:: powershell

python -m pip install manim

Manim should now be installed on your system. Continue reading
the :ref:`optional dependencies <win-optional-dependencies>` section
below.

Winget
******

While there is no recipe for installing Manim with Winget directly,
you can install all requirements by running:

.. code-block:: powershell

winget install python
winget install ffmpeg

and then Manim can be installed by running:

.. code-block:: powershell

python -m pip install manim

Manim should now be installed on your system. Continue reading
the :ref:`optional dependencies <win-optional-dependencies>` section
below.


Manual Installation
*******************
Pip
***

As mentioned above, Manim needs a reasonably recent version of
Python 3 (3.8 or above) and FFmpeg.
Python 3 (3.9 or above).

**Python:** Head over to https://www.python.org, download an installer
for a recent version of Python, and follow its instructions to get Python
Expand All @@ -94,35 +49,16 @@ installed on your system.
install Python directly from the
`official website <https://www.python.org>`__.

**FFmpeg:** In order to install FFmpeg, you can get a
pre-compiled and ready-to-use version from one of the resources
linked at https://ffmpeg.org/download.html#build-windows, such as
`the version available here
<https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.7z>`__
(recommended), or if you know exactly what you are doing
you can alternatively get the source code
from https://ffmpeg.org/download.html and compile it yourself.


After downloading the pre-compiled archive,
`unzip it <https://www.7-zip.org>`__ and, if you like, move the
extracted directory to some more permanent place (e.g.,
``C:\Program Files\``). Next, edit the ``PATH`` environment variable:
first, visit ``Control Panel`` > ``System`` > ``System settings`` >
``Environment Variables``, then add the full path to the ``bin``
directory inside of the (moved) ffmpeg directory to the
``PATH`` variable. Finally, save your changes and exit.

If you now open a new command line prompt (or PowerShell) and
run ``ffmpeg``, the command should be recognized.

At this point, you have all the required dependencies and can now
install Manim via
Then, Manim can be installed via Pip simply by running:

.. code-block:: powershell

python -m pip install manim

Manim should now be installed on your system. Continue reading
the :ref:`optional dependencies <win-optional-dependencies>` section
below.


.. _win-optional-dependencies:

Expand Down
2 changes: 0 additions & 2 deletions manim/_config/default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,6 @@ repr_number = green
# Uncomment the following line to manually set the loglevel for ffmpeg. See
# ffmpeg manpage for accepted values
loglevel = ERROR
# defaults to the one present in path
ffmpeg_executable = ffmpeg

[jupyter]
media_embed = False
Expand Down
4 changes: 4 additions & 0 deletions manim/_config/logger_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ def make_logger(
logger.addHandler(rich_handler)
logger.setLevel(verbosity)

if not (libav_logger := logging.getLogger()).hasHandlers():
libav_logger.addHandler(rich_handler)
libav_logger.setLevel(verbosity)

return logger, console, error_console


Expand Down
Loading
Loading