简体   繁体   English

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

[英]ffmpeg does not recognize used codec in any way

I am using ffmpeg-python to combine video and audio in my program but for one video file I constantly get this error:我正在使用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)

It just doesn't recognize it.它只是不认识它。 I know that the codec is av01 I have tried passing it in as the vcodec keyword but nothing would work.我知道编解码器是av01我尝试将它作为vcodec关键字传递,但没有任何效果。 I tried going to cmd directly and adding to the 'analyzeduration' and 'probsize' but nothing seems to work.我尝试直接转到 cmd 并添加到“分析时间”和“概率大小”,但似乎没有任何效果。 How can I fix this?我怎样才能解决这个问题? My code:我的代码:

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)

It looks like your ffmpeg was not built with AV1 support.看起来您的ffmpeg没有使用 AV1 支持构建。 Neither --enable-libdav1d nor --enable-libaom appear in the configuration. --enable-libdav1d--enable-libaom都没有出现在配置中。 It's also really old (a 2.0 dev build from 2013).它也很旧(2013 年的 2.0 开发版本)。

You can confirm with the ffmpeg -codecs command, and look for a line like this您可以使用ffmpeg -codecs命令进行确认,然后查找这样的行

DEV.L.开发者av1 Alliance for Open Media AV1 (decoders: libdav1d libaom-av1 ) av1 Alliance for Open Media AV1(解码器:libdav1d libaom-av1)

If it's missing, or there's no D , then it will not work.如果它丢失了,或者没有D ,那么它将不起作用。

Note that you have a shared build ( --disable-static --enable-shared ), so you'll also need to have the libraries installed separately, even if they were enabled.请注意,您有一个共享构建( --disable-static --enable-shared ),因此您还需要单独安装这些库,即使它们已启用。


Consider increasing the value for the 'analyzeduration' and 'probesize' options考虑增加“analyzeduration”和“probesize”选项的值

This won't work in this case.这在这种情况下不起作用。 It's already found the parameters – (av01 / 0x31307661), 2560x1440, 5427 kb/s – but doesn't know what to do with them.它已经找到了参数—— (av01 / 0x31307661), 2560x1440, 5427 kb/s但不知道如何处理它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM