FFMPEG 4.0 Opus 编解码器未启用?

FFMPEG 4.0 Opus 编解码器未启用?

我刚刚ffmpeg-4.0在 Kubunut 17.10 笔记本电脑上编译并安装,当我尝试使用 opus 组件进行转换时,出现了错误。似乎 opus 未启用,我收到此错误:[opus @ 0x55b30ae65fc0] The encoder 'opus' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it.-strict -2向命令添加了:ffmpeg -strict -2 -y -i 40.mp4 40.opus,但这似乎没有帮助。

我看到很多人说现在默认包含 opus,还有人说我需要--enable-libopus在编译时启用它。但每次我尝试这样做时,似乎都不起作用。我试过./configure --enable-libopusmake --enable-libopus,但子程序只是表现得混乱。

完整输出:

ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 7 (Ubuntu 7.2.0-8ubuntu3.2) configuration: libavutil 56. 14.100 / 56. 14.100 libavcodec 58. 18.100 / 58. 18.100 libavformat 58. 12.100 / 58. 12.100 libavdevice 58. 3.100 / 58. 3.100 libavfilter 7. 16.100 / 7. 16.100 libswscale 5. 1.100 / 5. 1.100 libswresample 3. 1.100 / 3. 1.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '40.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 2014-02-10T22:28:37.000000Z Duration: 00:01:56.77, start: 0.000000, bitrate: 310 kb/s Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 480x360 [SAR 1:1 DAR 4:3], 211 kb/s, 25 fps, 25 tbr, 50 tbn, 50 tbc (default) Metadata: handler_name : VideoHandler Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 95 kb/s (default) Metadata: creation_time : 2014-02-10T22:28:37.000000Z handler_name : IsoMedia File Produced by Google, 5-11-2011 Stream mapping: Stream #0:1 -> #0:0 (aac (native) -> opus (native)) Press [q] to stop, [?] for help [opus @ 0x55dbad5801c0] The encoder 'opus' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it. Average Intensity Stereo band: 0.0 Dual Stereo used: -nan% Conversion failed!

答案1

由于您尝试启用实验性编码器,因此必须在输出上设置合规级别。

ffmpeg -y -i 40.mp4 -strict -2 40.opus

答案2

FFmpeg 支持两种 Opus 编码器:

  • 实验性内置编码器名为opus
  • libopus依赖于外部库并需要您ffmpeg使用它来构建--enable-libopus

本机编码器opus目前被认为是实验性的,因此它需要输出选项-strict experimental(或别名-strict -2)。

libopus是一款非常出色的编码器。考虑到 的当前实验状态opus,请考虑使用它,除非它听起来opus足以满足您的需求。(免责声明:我还没有尝试过opus。在嘈杂的环境中撰写本文,因此我无法进行听力测试……)

相关内容