【问题标题】:Failed to convert webm audio file to mp4 using FFMPEG使用 FFMPEG 将 webm 音频文件转换为 mp4 失败
【发布时间】:2020-02-18 14:15:28
【问题描述】:

我有一个 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】:

    您的ffmpeg 太旧了

    更新您的ffmpeg

    这是票#4641: Error decoding SILK frame。该修复比最新的发布分支(撰写本文时为 FFmpeg 4.3)更新,因此您必须从 git master 分支获取构建(上面的链接都可以),或者等待 FFmpeg 4.4。

    如果无法更新

    如果您无法更新您的ffmpeg,旧的解决方法是使用 libopus 进行解码:

    ffmpeg -c:a libopus -i input ...
    

    【讨论】:

    • 它不工作,我知道它使用 ffmpeg -acodec libopus -i 54ebe077-96fc-4ace-9a38-f13c58807322.webm -max_muxing_queue_size 9999 -strict experimental -movflags faststart foo.mp4 工作
    • 不需要-strict experimental。当您尝试我的示例时,您遇到了什么错误? “不工作”不是描述性的。
    猜你喜欢
    • 2022-09-27
    • 2017-12-07
    • 2020-08-01
    • 2017-09-22
    • 2018-05-10
    • 2015-10-27
    • 2016-09-23
    • 2021-12-23
    • 2012-01-29
    相关资源
    最近更新 更多