Hi I am Rupesh from India and I brought a new system with AMD Ryzen zen3 5500GT and Asus prime B450 motherboard. I failed compiling the source code of ffmpeg which is downloaded from git at the point of AMF in Linux Operating System.
I have installed the following Linux Operating Systems
Arch Linux
Debian Linux Trixie
Fedora 41
Gentoo Linux
I have downloaded and installed all the packages related to sound, video and images which are necessary to compile install and run ffmpeg properly.
From the past four months I am using ffmpeg along with the above Linux Operating Systems.
At the starting point of compilation I have invoked the configure script of ffmpeg git source code through the following command
./configure --enable-amf
The configuration succeeded so I have issued the following command
make -j9
After sometime I got errors containing the words "amf"
One month back I have downloaded ffmpeg source code from git and configured and compiled successfully using the same commands.
As I received errors while compiling new ffmpeg source code obtained from git I have deleted the source code and copied old source code of ffmpeg which was obtained from git.
I am able to compile old source code of ffmpeg but I can't compile the latest version of ffmpeg which is obtained from git.
I am providing the commands which I entered previously and now below.
git clone https://github.com/FFmpeg/FFmpeg ffmpeg
tar -czvf ffmpeg.tar.gz ffmpeg
cd ffmpeg/
./configure --arch=x86_64 --cpu=znver3 --prefix=/opt/ffmpeg --enable-gpl --disable-shared --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-librav1e --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg --enable-libfdk-aac --enable-nonfree --enable-vaapi --enable-vdpau --enable-opencl --enable-opengl --enable-hwaccels --enable-runtime-cpudetect --disable-cuda-sdk --enable-avfilter --enable-bzlib --enable-libdrm --enable-libjxl --enable-libopenjpeg --enable-libplacebo --enable-librsvg --enable-librubberband --enable-libzmq --enable-pthreads --enable-vulkan --enable-amf --disable-libmfx > ../ffmpeg_output.txt
make -j9
sudo make install
I am providing the configuration command which I entered previously and now below.
./configure --arch=x86_64 --cpu=znver3 --prefix=/opt/ffmpeg --enable-gpl --disable-shared --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-librav1e --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg --enable-libfdk-aac --enable-nonfree --enable-vaapi --enable-vdpau --enable-opencl --enable-opengl --enable-hwaccels --enable-runtime-cpudetect --disable-cuda-sdk --enable-avfilter --enable-bzlib --enable-libdrm --enable-libjxl --enable-libopenjpeg --enable-libplacebo --enable-librsvg --enable-librubberband --enable-libzmq --enable-pthreads --enable-vulkan --enable-amf --disable-libmfx > ../ffmpeg_output.txt
I am also providing the last few lines of the compilation output below.
CC libavcodec/acelp_filters.o
CC libavcodec/acelp_pitch_delay.o
CC libavcodec/acelp_vectors.o
CC libavcodec/adpcm.o
CC libavcodec/adpcm_data.o
CC libavcodec/adpcmenc.o
In file included from libavcodec/ac3dec_float.c:40:
In function ‘spx_strategy’,
inlined from ‘decode_audio_block’ at libavcodec/ac3dec.c:1144:24:
libavcodec/ac3dec.c:856:37: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
856 | s->channel_uses_spx[ch] = get_bits1(bc);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
In file included from libavcodec/ac3dec_float.c:34:
libavcodec/ac3dec.h: In function ‘decode_audio_block’:
libavcodec/ac3dec.h:144:13: note: at offset 7 into destination object ‘channel_uses_spx’ of size 7
144 | uint8_t channel_uses_spx[AC3_MAX_CHANNELS]; ///< channel uses spectral extension (chinspx)
| ^~~~~~~~~~~~~~~~
In file included from libavcodec/aacsbr.c:383:
libavcodec/aacsbr_template.c: In function ‘read_sbr_grid’:
libavcodec/aacsbr_template.c:729:57: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
729 | ch_data->t_env[ch_data->bs_num_env - 1 - i] =
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
730 | ch_data->t_env[ch_data->bs_num_env - i] - 2 * get_bits(gb, 2) - 2;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libavcodec/aacsbr.c:31:
libavcodec/sbr.h:106:24: note: at offset [2147483649, 4294967295] into destination object ‘t_env’ of size 9
106 | uint8_t t_env[9];
| ^~~~~
libavcodec/aacsbr_template.c:729:57: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
729 | ch_data->t_env[ch_data->bs_num_env - 1 - i] =
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
730 | ch_data->t_env[ch_data->bs_num_env - i] - 2 * get_bits(gb, 2) - 2;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/sbr.h:106:24: note: at offset [2147483649, 4294967294] into destination object ‘t_env’ of size 9
106 | uint8_t t_env[9];
| ^~~~~
libavcodec/aacsbr_template.c:729:57: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
729 | ch_data->t_env[ch_data->bs_num_env - 1 - i] =
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
730 | ch_data->t_env[ch_data->bs_num_env - i] - 2 * get_bits(gb, 2) - 2;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/sbr.h:106:24: note: at offset [2147483649, 4294967293] into destination object ‘t_env’ of size 9
106 | uint8_t t_env[9];
| ^~~~~
libavcodec/aacsbr_template.c:729:57: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
729 | ch_data->t_env[ch_data->bs_num_env - 1 - i] =
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
730 | ch_data->t_env[ch_data->bs_num_env - i] - 2 * get_bits(gb, 2) - 2;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/sbr.h:106:24: note: at offset [2147483649, 4294967292] into destination object ‘t_env’ of size 9
106 | uint8_t t_env[9];
| ^~~~~
In file included from libavcodec/ac3dec_fixed.c:159:
In function ‘spx_strategy’,
inlined from ‘decode_audio_block’ at libavcodec/ac3dec.c:1144:24:
libavcodec/ac3dec.c:856:37: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
856 | s->channel_uses_spx[ch] = get_bits1(bc);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
In file included from libavcodec/ac3dec_fixed.c:52:
libavcodec/ac3dec.h: In function ‘decode_audio_block’:
libavcodec/ac3dec.h:144:13: note: at offset 7 into destination object ‘channel_uses_spx’ of size 7
144 | uint8_t channel_uses_spx[AC3_MAX_CHANNELS]; ///< channel uses spectral extension (chinspx)
| ^~~~~~~~~~~~~~~~
CC libavcodec/adts_header.o
CC libavcodec/adts_parser.o
CC libavcodec/adx.o
CC libavcodec/adx_parser.o
In file included from libavcodec/aacsbr_fixed.c:610:
libavcodec/aacsbr_template.c: In function ‘read_sbr_grid’:
libavcodec/aacsbr_template.c:729:57: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
729 | ch_data->t_env[ch_data->bs_num_env - 1 - i] =
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
730 | ch_data->t_env[ch_data->bs_num_env - i] - 2 * get_bits(gb, 2) - 2;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from libavcodec/aacsbr_fixed.c:60:
libavcodec/sbr.h:106:24: note: at offset [-2147483647, -1] into destination object ‘t_env’ of size 9
106 | uint8_t t_env[9];
| ^~~~~
libavcodec/aacsbr_template.c:729:57: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
729 | ch_data->t_env[ch_data->bs_num_env - 1 - i] =
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
730 | ch_data->t_env[ch_data->bs_num_env - i] - 2 * get_bits(gb, 2) - 2;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/sbr.h:106:24: note: at offset [-2147483647, -2] into destination object ‘t_env’ of size 9
106 | uint8_t t_env[9];
| ^~~~~
libavcodec/aacsbr_template.c:729:57: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
729 | ch_data->t_env[ch_data->bs_num_env - 1 - i] =
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
730 | ch_data->t_env[ch_data->bs_num_env - i] - 2 * get_bits(gb, 2) - 2;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/sbr.h:106:24: note: at offset [-2147483647, -3] into destination object ‘t_env’ of size 9
106 | uint8_t t_env[9];
| ^~~~~
libavcodec/aacsbr_template.c:729:57: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
729 | ch_data->t_env[ch_data->bs_num_env - 1 - i] =
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
730 | ch_data->t_env[ch_data->bs_num_env - i] - 2 * get_bits(gb, 2) - 2;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/sbr.h:106:24: note: at offset [-2147483647, -4] into destination object ‘t_env’ of size 9
106 | uint8_t t_env[9];
| ^~~~~
CC libavcodec/adxdec.o
CC libavcodec/adxenc.o
CC libavcodec/agm.o
CC libavcodec/aic.o
CC libavcodec/alac.o
CC libavcodec/alac_data.o
CC libavcodec/alacdsp.o
CC libavcodec/alacenc.o
CC libavcodec/aliaspixdec.o
CC libavcodec/aliaspixenc.o
CC libavcodec/allcodecs.o
CC libavcodec/alsdec.o
CC libavcodec/amfenc.o
CC libavcodec/amfenc_av1.o
CC libavcodec/amfenc_h264.o
In file included from /usr/include/AMF/core/Data.h:37,
from /usr/include/AMF/core/Buffer.h:37,
from /usr/include/AMF/core/Context.h:37,
from /usr/include/AMF/core/Factory.h:40,
from libavcodec/amfenc.h:22,
from libavcodec/amfenc_av1.c:23:
libavcodec/amfenc_av1.c: In function ‘amf_encode_init_av1’:
libavcodec/amfenc_av1.c:467:57: error: ‘AMF_VIDEO_ENCODER_AV1_ADAPTIVE_MINIGOP’ undeclared (first use in this function); did you mean ‘AMF_VIDEO_ENCODER_ADAPTIVE_MINIGOP’?
467 | AMF_ASSIGN_PROPERTY_BOOL(res, ctx->encoder, AMF_VIDEO_ENCODER_AV1_ADAPTIVE_MINIGOP, ((ctx->pa_adaptive_mini_gop == 0) ? false : true));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/amfenc_av1.c:467:57: note: each undeclared identifier is reported only once for each function it appears in
libavcodec/amfenc_av1.c:481:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
481 | AMFVariantStruct is_adaptive_b_frames = { 0 };
| ^~~~~~~~~~~~~~~~
libavcodec/amfenc_av1.c:490:66: error: ‘AMF_VIDEO_ENCODER_AV1_CAP_BFRAMES’ undeclared (first use in this function); did you mean ‘AMF_VIDEO_ENCODER_CAP_BFRAMES’?
490 | res = encoder_caps->pVtbl->GetProperty(encoder_caps, AMF_VIDEO_ENCODER_AV1_CAP_BFRAMES, &var);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| AMF_VIDEO_ENCODER_CAP_BFRAMES
libavcodec/amfenc_av1.c:499:70: error: ‘AMF_VIDEO_ENCODER_AV1_MAX_CONSECUTIVE_BPICTURES’ undeclared (first use in this function); did you mean ‘AMF_VIDEO_ENCODER_MAX_CONSECUTIVE_BPICTURES’?
499 | AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_AV1_MAX_CONSECUTIVE_BPICTURES, 3);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/amfenc_av1.c:510:74: error: ‘AMF_VIDEO_ENCODER_AV1_B_PIC_PATTERN’ undeclared (first use in this function); did you mean ‘AMF_VIDEO_ENCODER_B_PIC_PATTERN’?
510 | AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_AV1_B_PIC_PATTERN, ctx->max_b_frames);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [ffbuild/common.mak:81: libavcodec/amfenc_av1.o] Error 1
make: *** Waiting for unfinished jobs....
build@Rupesh:~/soft/temp/ffmpeg$
Kindly try to suggest what's wrong and how to compile the source code of the latest version of ffmpeg which is obtained from git.
Regards,
Rupesh.