I have no troubles with youtube videos when using the rpm versions of firefox and with ffmpeg from rpmfusion. Ffmpeg-free from the fedora repo is limited in what codecs it can process because of the licensing & patent/copywrite issues. Ffmpeg and ffmpeg-libs from rpmfusion do not have that limitation.
I have trouble understanding why users seem dedicated to running flatpak versions of apps that are freely available as rpms from the fedora and associated repos, and are fully tested to run problem free on fedora.
Of course silverblue pushes users in that direction, but packages can be installed from the normal repos with rpm-ostree.
Thanks for your input. The reason I wanted to use the Flatpak version of ffmpeg is, according to this Linux Weekly News article, Fedora prefers for legal reasons that non-free packages are sourced there.
It turns out I got mixed up and was running the rpm version of Firefox. Oops. Using the Flatpak version of Firefox my video plays fine. I guess whatever the limitations of the Flatpak version of ffmpeg, it does have the codec for YouTube (H264 ?).