Speichern Sie eine Animation in Python
423
Nausicaa
Ich versuche, eine einfache Animationshilfe mit einem Python-Code mithilfe der folgenden Befehle zu speichern:
anim = animation.FuncAnimation(fig, animate, init_func=init, frames = 100, interval = 20, blit = True) anim.save('basic_animation.mp4', fps=30, extra_args=['-vcodec', 'libx264'])
Aber Python kehrt zurück:
C:\Program Files\WinPython-64bit-3.6.1.0Qt5\python-3.6.1.amd64\lib\site-packages\matplotlib\animation.py:971: UserWarning: MovieWriter ffmpeg unavailable warnings.warn("MovieWriter %s unavailable" % writer) Traceback (most recent call last): File "<ipython-input-1-fd8a28a3225c>", line 1, in <module> runfile('D:/Documents/Informatique/Spyder/test_anim2d.py', wdir='D:/Documents/Informatique/Spyder') File "C:\Program Files\WinPython-64bit-3.6.1.0Qt5\python-3.6.1.amd64\lib\site-packages\spyder\utils\site\sitecustomize.py", line 880, in runfile execfile(filename, namespace) File "C:\Program Files\WinPython-64bit-3.6.1.0Qt5\python-3.6.1.amd64\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile exec(compile(f.read(), filename, 'exec'), namespace) File "D:/Documents/Informatique/Spyder/test_anim2d.py", line 34, in <module> anim.save('basic_animation.mp4', fps=30, extra_args=['-vcodec', 'libx264']) File "C:\Program Files\WinPython-64bit-3.6.1.0Qt5\python-3.6.1.amd64\lib\site-packages\matplotlib\animation.py", line 978, in save raise ValueError("Cannot save animation: no writers are " ValueError: Cannot save animation: no writers are available. Please install ffmpeg to save animations.
Ich habe jedoch ffmpeg installiert, damit ich keine Ahnung habe ...
Vielleicht liegt es im falschen Verzeichnis? Ich habe es in C: \ Programme \ WinPython-64bit-3.6.1.0Qt5 \ scripts installiert
Vielen Dank!
0 Antworten auf die Frage
Verwandte Probleme
-
2
Wie kann ich eine VRO-Datei in eine AVI-Datei kodieren?
-
3
Wie kann ich mit Python / AWK / SED ein Inhaltsverzeichnis für ein Markdown-Dokument erstellen?
-
1
Wie kann ich Probleme mit Interlaced-Video-Ruckeln / -Schnipsen bei der Wiedergabe auf DVD-Playern b...
-
1
So installieren Sie Markdowns Erweiterungen von Python
-
9
Ist Python nur für das Erstellen von Backends bei der Erstellung von Websites?
-
4
Um Python in einer HTML-Datei ähnlich wie PHP auszuführen
-
2
So installieren Sie Gaphor by Easy_install und seine Abhängigkeiten von MacPorts
-
2
Nokia E71 - USB-Modus und Linux und Python
-
1
So zeigen Sie veoh.com-Videos mit HT03-A Android an
-
9
Vim: Führe das Skript aus, an dem ich gerade arbeite, in einem geteilten Bildschirm