I think you should change the provides array from 'ffmpeg' to "ffmpeg=${pkgver}" as recommended in the note on the wiki.
At least for me, this fixed yay constantly wanting to install the official ffmpeg package and building of aur packages like obs-studio-liberty that specify a version of ffmpeg > 8 which would complain about the ffmpeg not being the correct version.
Pinned Comments
dbermond commented on 2024-06-24 15:59 (UTC)
@LordSIGSEGV avoid creating files not tracked by pacman in the system reserved directories, specially symlinks to shared libraries, as this have the potential to completely break your system. I have already notified the quirc maintainer in the aur web page of the package in April-2024. While this issue is not solved in quirc, I recommend to use quirc-git, which currently has a better packaging and does not suffer from this problem.