Skip to content
Advertisement

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 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:UsersFamilyPycharmProjects8-bit Downloadervenvlibsite-packagesffmpeg_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. I tried going to cmd directly and adding to the ‘analyzeduration’ and ‘probsize’ but nothing seems to work. 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)

Advertisement

Answer

It looks like your ffmpeg was not built with AV1 support. Neither --enable-libdav1d nor --enable-libaom appear in the configuration. It’s also really old (a 2.0 dev build from 2013).

You can confirm with the ffmpeg -codecs command, and look for a line like this

DEV.L. av1 Alliance for Open Media AV1 (decoders: libdav1d libaom-av1 )

If it’s missing, or there’s no D, then it will not work.

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.


Consider increasing the value for the ‘analyzeduration’ and ‘probesize’ options

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.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement