Add dependencies to your flatpak

Hello.

I currently have a flatpak for my app but it depends on mpv and ffmpeg at runtime and so far the only way I could think of making it work was to put binaries of those two apps and their libs inside my flatpak.

However, I’d like to possibly run the io.mpv.Mpv flatpak instead of my bundled mpv. I can do so by running flatpak run io.mpv.Mpv from my app and that’s fine, but I don’t see a way in my manifest to tell that the mpv flatpak needs to be installed first for my app to run.

For ffmpeg I see there’s a runtime extension but I don’t quite understand how I can add it to my manifest as well? platform-extension doesn’t seem to help.

Am I understanding flatpak wrong? Did someone run into the same issue before?

Thanks in advance.