微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

ffmpeg 无法以任何方式识别使用的编解码器

如何解决ffmpeg 无法以任何方式识别使用的编解码器

我正在使用 ffmpeg-python 在我的程序中组合视频和音频,但对于一个视频文件,我经常收到此错误

ffmpeg version N-55702-g920046a copyright (c) 2000-2013 the FFmpeg developers
built on Aug 21 2013 18:10:00 with gcc 4.7.3 (GCC)
configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil      52. 42.100 / 52. 42.100
libavcodec     55. 29.100 / 55. 29.100
libavformat    55. 14.101 / 55. 14.101
libavdevice    55.  3.100 / 55.  3.100
libavfilter     3. 82.100 /  3. 82.100
libswscale      2.  5.100 /  2.  5.100
libswresample   0. 17.103 /  0. 17.103
libpostproc    52.  3.100 / 52.  3.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 000000000073cb40] Could not find codec parameters for stream 0 (Video: none (av01 / 0x31307661),2560x1440,5427 kb/s): unkNown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
temp/Above NYC - Filmed in 12K.mp4: Could not find codec parameters
Traceback (most recent call last):
  File "C:/Users/Family/PycharmProjects/8-bit Downloader/class_8_bit.py",line 4,in <module>
    ffmpeg.output(v,"temp/hello.mp4").run()
  File "C:\Users\Family\PycharmProjects\8-bit Downloader\venv\lib\site-packages\ffmpeg\_run.py",line 325,in run
    raise Error('ffmpeg',out,err)
ffmpeg._run.Error: ffmpeg error (see stderr output for detail)

它只是不认识它。我知道编解码器是 av01 我曾尝试将它作为 vcodec 关键字传入,但没有任何效果。我尝试直接转到 cmd 并添加到“analyzeduration”和“probsize”,但似乎没有任何效果。我怎样才能解决这个问题?我的代码

import ffmpeg

# I have tried passing absolute paths instead of relative ones too,still not working
input_video = ffmpeg.input("temp/Above NYC - Filmed in 12K.mp4")
input_audio = ffmpeg.input("temp/audio_temp 1.webm")
full_path = "temp/New.mp4"
out = ffmpeg.output(input_video,input_audio,full_path,vcodec='copy',acodec='aac',strict='experimental')
out.run(overwrite_output=True)

解决方法

您的 ffmpeg 似乎不是在构建时支持 AV1。 --enable-libdav1d--enable-libaom 均未出现在配置中。它也很旧(2013 年的 2.0 开发版本)。

你可以用ffmpeg -codecs命令确认,并寻找这样的一行

DEV.L. av1 开放媒体联盟 AV1(解码器:libdav1d libaom-av1)

如果它丢失了,或者没有 D,那么它将无法工作。

请注意,您有一个共享版本 (--disable-static --enable-shared),因此您还需要单独安装这些库,即使它们已启用。


考虑增加 'analyzeduration' 和 'probesize' 选项的值

这在这种情况下不起作用。它已经找到参数 - (av01 / 0x31307661),2560x1440,5427 kb/s - 但不知道如何处理它们。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。