Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flatpak MPV override #359

Open
lamyergeier opened this issue Dec 30, 2023 · 3 comments
Open

Flatpak MPV override #359

lamyergeier opened this issue Dec 30, 2023 · 3 comments

Comments

@lamyergeier
Copy link

On mpv Flathub it is mentioned that

Flatpak: mpv scripts needs write access. Use flatseal app to set home or host write permission

Does this mean

			FlatpakId="io.mpv.Mpv"
			flatpak override "${FlatpakId}" --filesystem=host

How to use the configuration stored at ~/.config/mpv with flatpak? What flatpak settings do I need to override?

@fastrizwaan
Copy link
Collaborator

Yes, if you need to encode video in different directories using ffmpeg flatpak run --command=ffmpeg io.mpv.Mpv then you may use flatpak override --user --filesystem=host io.mpv.Mpv

~/.config/mpv is incompatible and io.mpv.Mpv is sandboxed, it should not touch ~/.config/mpv.

@lamyergeier
Copy link
Author

@fastrizwaan

Yes, if you need to encode video in different directories using ffmpeg flatpak run --command=ffmpeg io.mpv.Mpv then you may use flatpak override --user --filesystem=host io.mpv.Mpv

I want to use it because I want to use scripts ( mpv addons)

~/.config/mpv is incompatible and io.mpv.Mpv is sandboxed, it should not touch ~/.config/mpv.

Could you please elaborate what particular config settings are incompatible? Can I do the following (create symlink to ~/.config/mpv)

		cd ~/.var/app/io.mpv.Mpv/config || exit
		rm -rf mpv
		ln -s -f ~/.config/mpv .

@fastrizwaan
Copy link
Collaborator

We need to change 3 things for scripts to work with io.mpv.Mpv. 1. config file paths, 2. binary paths, 3. filesystem access.

The scripts and other conf files at /.config/ usually use the path "/.config/mpv" in them. Also, they try to access ffmpeg other other tools/commands from system i.e., /usr/bin (e.g., /usr/bin/ffmpeg) so, we need to give access to system's binaries using flatpak spawn --host <system binary> inside scripts of io.mpv.Mpv you need to change the paths accordingly see #345 and finally filesystem write access may be required to allow the scripts to write data on different directories (flatpak override --user --filesystem=host io.mpv.Mpv)

E.g., here's mpv-video-cutter-linux extension, which needed changes to work with io.mpv.Mpv

I'd suggest that you do not use ~/.config.mpv with flatpak mpv, because of the above 3 things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants