gpt4 book ai didi

ffmpeg - 错误 : opus in MP4 support is experimental, 如果要使用,请添加 '-strict -2'

转载 作者:行者123 更新时间:2023-12-04 11:51:14 36 4
gpt4 key购买 nike

我正在尝试使用 ffmpeg 将一些 MKV 转换为 MP4,并且我不断收到以下错误。有什么想法吗?
我已经安装了ffmpeg并安装了:

sudo apt install -y libopus-dev libmp3lame-dev libfdk-aac-dev libvpx-dev libx264-dev yasm libass-dev libtheora-dev libvorbis-dev mercurial cmake
我用输出运行的命令:
ffmpeg -i 'video.mkv' -codec copy 'video.mp4' -strict -2 -y
ffmpeg version 4.0.2-2 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 8 (Ubuntu 8.2.0-7ubuntu1)
configuration: --prefix=/usr --extra-version=2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared

[mp4 @ 0x560e85326100] track 1: codec frame size is not set
[mp4 @ 0x560e85326100] opus in MP4 support is experimental, add '-strict -2' if you want to use it.
Could not write header for output file #0 (incorrect codec parameters ?): Experimental feature
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Last message repeated 1 times
我还尝试添加 -strict -2无济于事。

最佳答案

order of options很重要:

ffmpeg [global options] [input options] -i input [output options] output

您的示例具有经常被忽略的尾随选项。

在您的情况下,您正在尝试将 Opus 音频混合到 MP4 容器中,但 ffmpeg 的版本已过时。认为这是实验性的。所以你必须添加 -strict experimental-strict -2 .利用:
ffmpeg -y -i 'video.mkv' -codec copy -strict -2 'video.mp4'

最新版本(FFmpeg 4.3 和更新版本以及 git master 分支) no longer need -strict -2/ -strict experimental将 Opus 混合到 MP4 中:
ffmpeg -y -i 'video.mkv' -codec copy 'video.mp4'

关于ffmpeg - 错误 : opus in MP4 support is experimental, 如果要使用,请添加 '-strict -2',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54192916/

36 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com