无法使用FFMPEG将webm音频文件转换为mp4

问题描述 投票:0回答:1

我有一个webm音频文件,我正在尝试使用ffmpeg将其转换为mp4。但是创建mp4失败。有关文件的信息如下。

fmpeg -i 54ebe077-96fc-4ace-9a38-f13c58807322.webm -hide_banner

Input #0, matroska,webm, from '54ebe077-96fc-4ace-9a38-f13c58807322.webm':
  Metadata:
    encoder         : Lavf56.40.101
    creation_time   : 2019-10-22T11:19:12.000000Z
  Duration: 00:00:24.16, start: 0.000000, bitrate: 41 kb/s
    Stream #0:0: Video: vp8, yuv420p, 640x480, SAR 1:1 DAR 4:3, 30 fps, 30 tbr, 1k tbn, 1k tbc (default)
    Stream #0:1: Audio: opus, 48000 Hz, mono, fltp (default)
At least one output file must be specifiedffmpeg -i  54ebe077-96fc-4ace-9a38-f13c58807322.webm -qscale 0 out.mp4

我曾尝试使用以下命令进行转换

ffmpeg -i  54ebe077-96fc-4ace-9a38-f13c58807322.webm -qscale 0 out.mp4

引发错误

[opus @ 0x56489c7f9840] LBRR frames is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[opus @ 0x56489c7f9840] Error decoding a SILK frame.
[opus @ 0x56489c7f9840] Error decoding an Opus frame.
Too many packets buffered for output stream 0:1.
[aac @ 0x56489c82d640] Qavg: 59180.625
[aac @ 0x56489c82d640] 2 frames left in the queue on closing
Conversion failed!

如何解决此问题?我已经在VLC中播放了文件,并且可以听到源文件中的声音。但是转换失败

ffmpeg mp4 webm
1个回答
0
投票

使用libopus解码音频:

ffmpeg -c:a libopus -i 54ebe077-96fc-4ace-9a38-f13c58807322.webm out.mp4
  • 您使用了-hide_banner隐藏了重要信息,所以我假设您的ffmpeg已配置为--enable-libopus
  • -qscale被libx264忽略(假设这是您正在使用的编码器)。请改用-crf
  • 由于-crf和不完整的日志输出,我无法确定您使用的是哪个版本。您可以查看git master分支中的最新-hide_banner版本是否支持LBRR帧。 (我没有示例文件,也没有查看源代码或git日志进行验证。)有关最新版本或编译的链接,请参见ffmpeg
© www.soinside.com 2019 - 2024. All rights reserved.