python - 如何使用 ffmpeg-python 创建 Webm 动画图像
问题描述
我使用以下代码和 ffmpeg 成功地从视频文件创建了一个 3 秒长/每秒 6 帧的动画图像文件:
ffmpeg.input(video_url, ss=0).filter('scale', motion_width, -1)
.filter('fps', fps=6, round='up')
.output(out_filesystem_motion_filename, vframes=18, loop=0)
.overwrite_output().run()
当我将输出文件名提供为 gif 时,这很好用:“thumbnail.gif”,但是当我将输出文件名提供为 webm 文件“thumbnail.webm”时,chrome 将输出文件作为视频而不是动画图像文件播放。
如何让 Chrome 将 webm 文件显示为动画图像?
解决方案
推荐阅读
- node.js - 在 mongoDb 中查找 -> 查找行为奇怪
- angularjs - Angular 1.x:OrderBy 没有对日期进行排序
- firebase - 如何使用 javascript 客户端从 firestore 获取 64 位整数而不丢失精度?
- java - 使用 ansible 安装 Java JDK 时出现 404 错误
- spring - 如何在 oracle mybatis sql 中将一个字符串添加到另一个字符串的末尾?
- javascript - 尝试在javascript中解析值
- google-cloud-platform - 如何使用快照备份
- javascript - 如何在 0(零)处启动 javascript 'for of' 循环?
- java - 如何使用spring boot jpa在这两个类之间建立一对一的关系?另外,我如何保存实体?
- javascript - 如何在javascript中一直到最后一个孩子的父路径