Import FindFFmpeg from kfilemetadata
...instead of relying on pkg-config directly. That way you can pass
-DCMAKE_DISABLE_FIND_PACKAGE_FFmpeg and it'll also work on windows
where there's no pkg-conf IIRC.
It may be a candidate for inclusion into extra-cmake-modules because
it's also used by KDE Applications and Frameworks, but that'll need
some work and would require depending on a new, unreleased ecm.