ffmpeg.wasm-用节点JS检索视频元数据
我想使用FFMPEG Web组装软件包从转换的视频中检索元数据。 我尝试将metadata.txt
文件提取到我的当前目录,但在index.js file
中我的命令
任何返回。
const { createFFmpeg, fetchFile } = require('@ffmpeg/ffmpeg')
const ffmpeg = createFFmpeg({ log: true })
await ffmpeg.load()
await ffmpeg.run('-i', "myvideo.avi'", '-f', 'ffmetadata', 'metadata.txt')
中
没有 是空的,什么也没有编码。
此WASM软件包上可以使用此命令吗?发现与他们的文档没有任何相关性,我想避免全局FFMPEG安装
I want to retrieve metadata from a converted video using FFmpeg web assembly package.
I tried to extract a metadata.txt
file to my current directory but nothing was return from my command
in my index.js file
:
const { createFFmpeg, fetchFile } = require('@ffmpeg/ffmpeg')
const ffmpeg = createFFmpeg({ log: true })
await ffmpeg.load()
await ffmpeg.run('-i', "myvideo.avi'", '-f', 'ffmetadata', 'metadata.txt')
I got error :
Output file is empty, nothing was encoded.
Is this kind of command available on this wasm package? Found nothing relevant on their documentation and I want to avoid the global FFmpeg installation
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
WASM没有从文件系统中读取。您需要将文件复制到WASM虚拟文件系统中,以便能够引用文件。
Wasm doesn't read from the file system. You need to copy files into wasm virtual file system for it to be able to reference files.