ManimCommunity / ManimCommunity/manim
Video format ignored when set through global `config` object
- Dominant language
- Python
- Stars
- 40.9k
- Forks
- 3.1k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 25
Description
## Description of bug / unexpected behavior
It seems the video format value is being ignored when I [set it programmatically](https://docs.manim.community/en/stable/guides/configuration.html#the-manimconfig-class) through the global `config` object and generate the video through `render()`. For example, setting it to `mov` using the below example code outputs an `mp4` video.
## Expected behavior
When setting `config.format = 'mov'` I expect a `.mov` file output.
## Minimal example
```py
from manim import Scene, Circle, PINK, Create, config
class CreateCircle(Scene):
def construct(self):
circle = Circle()
circle.set_fill(PINK, opacity=0.5)
self.play(Create(circle))
if __name__ == '__main__':
config.format = 'mov'
CreateCircle().render()
```
## System specifications
System Details
- OS: macOS 12.5 (Monterey)
- Python version: 3.10.6
- Installed modules (output from `poetry show`):
```
certifi 2022.6.15
charset-normalizer 2.1.0
click 8.1.3
click-default-group 1.2.2
cloup 0.13.1
colour 0.1.5
commonmark 0.9.1
cython 0.29.32
decorator 5.1.1
glcontext 2.3.6
idna 3.3
isosurfaces 0.1.0
manim 0.16.0.post0
manimpango 0.4.1
mapbox-earcut 0.12.11
moderngl 5.6.4
moderngl-window 2.4.1
multipledispatch 0.6.0
networkx 2.8.5
numpy 1.23.2
pillow 9.2.0
pycairo 1.21.0
pydub 0.25.1
pyglet 1.5.26
pygments 2.13.0
pyobjc-core 8.5
pyobjc-framework-cocoa 8.5
pyrr 0.10.3
requests 2.28.1
rich 12.5.1
scipy 1.9.0
screeninfo 0.8
six 1.16.0
skia-pathops 0.7.2
srt 3.5.2
tqdm 4.64.0
urllib3 1.26.11
watchdog 2.1.9
```
FFMPEG
Output of `ffmpeg -version`:
```
ffmpeg version 5.1 Copyright (c) 2000-2022 the FFmpeg developers
built with Apple clang version 13.1.6 (clang-1316.0.21.2.5)
configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/5.1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-neon
libavutil 57. 28.100 / 57. 28.100
libavcodec 59. 37.100 / 59. 37.100
libavformat 59. 27.100 / 59. 27.100
libavdevice 59. 7.100 / 59. 7.100
libavfilter 8. 44.100 / 8. 44.100
libswscale 6. 7.100 / 6. 7.100
libswresample 4. 7.100 / 4. 7.100
libpostproc 56. 6.100 / 56. 6.100
```
Contributor guide
Research direction
Start by tracing how the global config.format value is consumed when Scene.render() writes video output, then reproduce the provided example with format set to mov. Done means the program produces a .mov file rather than an .mp4, with a regression test covering programmatic configuration if the existing test structure supports it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100