One of those conflicts is an i686 package.
Yes you can remove libavcodec-free
I would recommend that you remove libavcodec-free (provided from fedora & codec limited) and replace it with libavcodec-freeworld (provided from rpmfusion & with almost all av codecs available)
ffmpeg-libs is also from rpmfusion. dnf swap libavcodec-free libavcodec-freeworld --allowerasing should manage that.
libavcodec is a library providing audio & visual codecs for encoding and decoding av files. Libavcodec-free has only part of the available codecs due to the restriction within fedora about distributing software with copyright, patent, or licensing restrictions. The one from rpmfusion does not have those limitations.
This one doesn’t work because libavcodec-free is not a layered package:
[michael@fedora ~]$ rpm-ostree upgrade --install ffmpeg-libs --uninstall libavcodec-free
error: Package/capability 'libavcodec-free' is not currently requested
This one unfortunately results in two package conflicts:
That might be why installing libavcodec-freeworld doesn’t solve the issue. Version 112 of Firefox will have ffmpeg 6.0 support, so I’ll check whether video playback works once it’s available for Fedora 38.
EDIT: I just tried out Firefox beta 112 using Flatpak, and I can confirm that H.264 works after installing libavcodec-freeworld.
More for reference at this point: rpm-ostree override remove libavcodec-free libavfilter-free libavformat-free libavutil-free libpostproc-free libswresample-free libswscale-free --install ffmpeg