Snapcrafters! MPV needs a snap

Calling all Snapcrafters! :mega:

Taking a quick look at Dustin Kirkland’s default application survey in the various places it exists you can easily see that people love MPV and the GTK+ frontend GNOME MPV.

It would be great to see some Snapcrafters step up and get both snapped to help bootstrap the upstreams in publishing snaps in the store so the latest versions are available to all :muscle:

Get started by forking the Snapcrafters template:

Feel free to reply to this topic to collaborate.

2 Likes

Hi Martin,

mpv is already available…

mpv-casept has been working quite well for me (although it is annoying that the confinement means that the file has to be in your home directory tree).

Cheers,
Alistair

The @casept packaged snap of mpv is in git over at https://github.com/casept/snap-mpv.

@casept would you consider doing the snapcrafter thing? i.e. change the snap name to plain mpv (the preferred upstream name), rebase your repository onto https://github.com/snapcrafters/fork-and-rename-me and start filling out the readme and following the checklist?

1 Like

@lucyllewy @Wimpress @evan @popey
I’ll do that.

Just one question, that repo’s README.md states that “snapcrafters are working to enable the author to publish authoritative releases.” Unfortunately, the author of mpv seems to have a bit of an elitist streak and has stated in this thread regarding universal packaging formats that people should “just use windows” in case they want an universal package. Should I leave that part in the README.md or should I remove it (because the upstream will likely be uncooperative)?

Also, how can I claim the mpv snap name? Should I just submit a request at https://dashboard.snapcraft.io/dev/snaps/register-name/?series=16&name=mpv with a link to this thread?

1 Like

@akgrant, the file can also be on external storage as long as you run

sudo snap connect mpv-casept:removable-media core:removable-media

after installation.

Hi @casept,

Thanks! I was aware of interfaces, but didn’t really understand them. Is there a way to also allow access to a NFS mounted drive?

Nothing stood out from listing the available core interfaces, i.e.:

$ snap interfaces core

Thanks again,
Alistair

There isn’t an ‘NFS interface’ because that is really a combination of the ‘network’ interface and a (potentially arbitrary) file location. You didn’t give detail on what you need,so I suggest taking a look at: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1662552

Hi @jdstrand,

This is in the context of accessing media files outside the user’s home directory. Actually, whether it’s an NFS mount or not is irrelevant, e.g. I’d like the mpv snap to be able to access /srv/media.

Thanks,
Alistair

in case /srv/media is a separate filesystem you could change it to mount under /media/mymediafiles (or some such) instead, then the removable-media interface will allow access …

You could try installing mpv with the --devmode flag, although it would make things insecure for obvious reasons.

Should I leave that part in the README.md or should I remove it (because the upstream will likely be uncooperative)?

I’d leave it unticked and put a line under it linking to that GitHub issue.

Also, how can I claim the mpv snap name? Should I just submit a request at https://dashboard.snapcraft.io/dev/snaps/register-name/?series=16&name=mpv1 with a link to this thread?

Approved your name registration. Thanks for picking this up! Excited.

2 Likes

Thanks, @ogra. That’s a good enough workaround for now, although it would be nice to allow snaps access to arbitrary portions of the disk system.

You could try installing mpv with the --devmode flag, although it would make things insecure for obvious reasons.

Yep, while I’m not too worried about mpv, I was trying to avoid this workaround in general.

For now, I’m using @ogra 's suggestion of mounting within the /media/user space.

Thanks again,
Alistair

I am trying to replace my mpv ppa for the snap version. However, apparently the snap doesn’t read config files from the path $HOME/.config/mpv.

I tried copying mpv.conf, input.conf, lua script folders etc. to any of these folders $HOME/snap/mpv{,current,common}, but cannot make the snap use my configuration.

How do I go about doing that?

1 Like

Does it work if you put the file in ~/snap/mpv/current/.config/mpv ? (or common/.config/mpv)

1 Like

@Ads20000
I started copying files, and then I noticed that there were many hidden folders inside ~/snap/mpv/current, one of which was in fact .config, with mpv subfolder in it.

After copying config files into that folder, everything seems to be working.

Thanks for Your help

1 Like