Andrea, that is much further then I got so I can not say if this is a workaround but if you have the time, could you look into this:
In the file cinelerra-gg-qt6/cinelerra-5.1/build/CMakeCache.txt around line 297 is the following:
FFMPEG_INCLUDE_DIR:PATH=/usr/include/ffmpeg
check if this is the correct location for your Arch system; for my Fedora 44 this is where the 7 libraries reside (libavcodec, libavdevice, libavfilter, libavformat, libavutil, libswresample, libswscale). BUT I do not know for sure if that is what is expected to be there. If your PATH is different, edit the CMakeCache.txt to correct it for your system as a workaround for now.