PR

MovieWriter ffmpeg unavailable; using Pillow instead

「MovieWriter ffmpeg unavailable; using Pillow instead.」に対する対処法の紹介

スポンサーリンク

エラー

Ubuntuでとあるプログラムを実行しようとしたらこんなエラーが出た

MovieWriter ffmpeg unavailable; using Pillow instead.
Traceback (most recent call last):
  File "/mnt/c/Users/mtkbirdman/Desktop/CMPLXFOIL/CMPLXFOIL-main/CMPLXFOIL-main/examples/single_point.py", line 231, in <module>
    AnimateAirfoilOpt(outputDir, "fc").animate(
  File "/mnt/c/Users/mtkbirdman/Desktop/CMPLXFOIL/.py310venv/lib/python3.10/site-packages/cmplxfoil/postprocess.py", line 122, in animate
    anim.save(outputFileName + "." + ext, **animKwargs)
  File "/mnt/c/Users/mtkbirdman/Desktop/CMPLXFOIL/.py310venv/lib/python3.10/site-packages/matplotlib/animation.py", line 1041, in save
    writer = writer_cls(fps, **writer_kwargs)
TypeError: AbstractMovieWriter.__init__() got an unexpected keyword argument 'extra_args'

原因

ffmpegがインストールされていない

対処法

ffmpegをインストールする

sudo apt update
sudo apt -y install ffmpeg
:~$ sudo apt update
[sudo] password for mtkbirdman:
Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Get:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Get:5 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [1818 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [2191 kB]
Get:7 http://security.ubuntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [11.2 kB]
Get:8 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [16.0 kB]
Fetched 4373 kB in 8s (549 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
137 packages can be upgraded. Run 'apt list --upgradable' to see them.
:~$ sudo apt -y install ffmpeg
Reading package lists... Done
Building dependency tree
Reading state information... Done
	:
Setting up ffmpeg (7:4.2.7-0ubuntu0.1) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.7) ...
Processing triggers for libgdk-pixbuf2.0-0:amd64 (2.40.0+dfsg-3ubuntu0.4) ...

以上

バグレポート
質問・感想・意見などあれば気軽にTwitterのDMかコメントお願いします!
スポンサーリンク
mtk_birdman's blog

コメント