ffmpeg 不以任何方式识别使用过的编解码器

ffmpeg does not recognize used codec in any way

我正在使用 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-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 Alliance for Open Media AV1 (decoders: libdav1d libaom-av1 )

如果它丢失了,或者没有D,那么它将不起作用。

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


Consider increasing the value for the 'analyzeduration' and 'probesize' options

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