2024-09-25 08:40:27 发布
网友
我使用这个示例代码作为测试用例:https://matplotlib.org/examples/animation/moviewriter.html
在这段代码中,他们使用FFMPEG将matplotlib动画写入.mp4视频文件。是否可以写入.webm格式?在
但我不知道该怎么做。在
确保您的ffmpegcompiled与libvpx(不带参数运行ffmpeg,然后查看输出中是否有 enable-libvpx)。在
ffmpeg
libvpx
enable-libvpx
FFMpegWriter = manimation.writers['ffmpeg'] writer = FFMpegWriter(fps=15, codec='libvpx-vp9') # or libvpx-vp8 [...] with writer.saving(fig, "writer_test.webm", 100): [...]
确保您的
ffmpeg
compiled与libvpx
(不带参数运行ffmpeg
,然后查看输出中是否有enable-libvpx
)。在相关问题 更多 >
编程相关推荐