【问题标题】:ffmpeg codec conversion; can't configure encoderffmpeg 编解码转换;无法配置编码器
【发布时间】:2019-07-30 02:25:47
【问题描述】:

我只是想将我拥有的 vp9 webm 转换为 vp8 webm。这是我正在使用的命令。

ffmpeg -i in.webm -c:v vp8 out.webm

vp8 编码器返回一个奇怪的错误

Input #0, matroska,webm, from 'in.webm':
  Metadata:
    encoder         : google
  Duration: 00:02:34.60, start: 0.000000, bitrate: 404 kb/s
    Stream #0:0(eng): Video: vp9 (Profile 0), yuv420p(tv, bt709/unknown/unknown), 640x360, SAR 1:1 DAR 16:9, 30 fps, 30 tbr, 1k tbn, 1k tbc (default)
Stream mapping:
  Stream #0:0 -> #0:0 (vp9 (native) -> vp8 (vp8_v4l2m2m))
Press [q] to stop, [?] for help
[vp8_v4l2m2m @ 0x56195db9f9f0] Could not find a valid device
[vp8_v4l2m2m @ 0x56195db9f9f0] can't configure encoder
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!

如果我有任何关于我是否安装了正确的编码器和解码器的问题,这里是ffmpeg -codecs | grep "vp[8-9]" 的输出:

 DEV.L. vp8                  On2 VP8 (decoders: vp8 vp8_v4l2m2m vp8_cuvid ) (encoders: vp8_v4l2m2m )
 D.V.L. vp9                  Google VP9 (decoders: vp9 vp9_v4l2m2m vp9_cuvid )

【问题讨论】:

    标签: ffmpeg webm vp8 libvpx vp9


    【解决方案1】:

    您的 ffmpeg 版本有一个可用于硬件 VP8 编码器的 Video4Linux 包装器,但没有可用的实际硬件 VP8 编码器。

    对于 VP8/VP9 的软件编码,您需要启用并链接 libvpx。你可以从https://johnvansickle.com/ffmpeg/得到一个静态的git二进制文件

    【讨论】:

    • 不要相信在你的机器上运行的第三方二进制文件。使用ffmpeg的实际github镜像,自己构建:github.com/FFmpeg/FFmpeg
    • 您可以信任来自ffmpeg.org/download.html 列出的来源的二进制文件,其中 johnvansickle.com 就是其中之一。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-04
    • 2020-10-13
    • 2013-11-12
    • 1970-01-01
    • 2016-10-03
    • 1970-01-01
    相关资源
    最近更新 更多