libx264 does not exist in the repositories
libx264 is not a fedora package. I believe you want the x264 and x264-libs packages, both of which are in the rpmfusion-free repo.
Enable both the rpmfusion-free and rpmfusion-nonfree repos by following the instructions at
https://rpmfusion.org/Configuration
then install the multimedia packages from there.
The multimedia packages I have are
fmpeg.x86_64 7.0.2-4.fc41 rpmfusion-free
ffmpeg-devel.x86_64 7.0.2-4.fc41 rpmfusion-free
ffmpeg-libs.x86_64 7.0.2-4.fc41 rpmfusion-free
gstreamer1-plugins-bad-freeworld.x86_64 1:1.24.11-1.fc41 rpmfusion-free-updates
gstreamer1-plugins-ugly.x86_64 1:1.24.11-1.fc41 rpmfusion-free-updates
libavcodec-freeworld.x86_64 7.0.2-4.fc41 rpmfusion-free
libavdevice.x86_64 7.0.2-4.fc41 rpmfusion-free
libde265.x86_64 1.0.15-4.fc41 rpmfusion-free
libheif-freeworld.x86_64 1.17.6-4.fc41 rpmfusion-free
mjpegtools-libs.x86_64 2.2.1-7.fc41 rpmfusion-free
pipewire-codec-aptx.x86_64 1.2.6-1.fc41 rpmfusion-free-updates
svt-hevc-libs.x86_64 1.5.1-7.fc41 rpmfusion-free
vlc-plugins-freeworld.x86_64 3.0.21-2.fc41 rpmfusion-free
x264.x86_64 0.164-15.20231001git31e19f92.fc41 rpmfusion-free
x264-libs.x86_64 0.164-15.20231001git31e19f92.fc41 rpmfusion-free
x265.x86_64 3.6-3.fc41 rpmfusion-free
x265-libs.x86_64 3.6-3.fc41 rpmfusion-free
All those come from the rpmfusion repos and probably will require the --allowerasing
option to replace some of the fedora packages that conflict.