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
Snap package #3010
Comments
Hello, I'm interested in helping on a snap package. I made a trial run to check and the Snapcraft auto-build pipeline seems to have mature support for Python projects. If I can help, there is one shortcoming in that I don't have a rich test/QA environment. I have one Raspi Ubuntu server for my snaps so I would need others' help to verify the snap output across the different targets (amd64, i386, ppc64, etc). |
snaps are pretty annoying in terms of file permissions,
|
Tell me how did you install your mpv (with snap or without snap) Here is how I installed my mpv on ubuntu 20.04: sudo add-apt-repository ppa:mc3man/mpv-tests
VLC is default streamlink's player. This is how it looks like with ubuntu: https://www.videolan.org/vlc/download-ubuntu.html sudo snap install vlc
It is version 3.0.9.2 forever with apt, version 3.0.11 today with snap.
|
If you install chromium on ubuntu with apt, snap appears to be unavoidable.
|
streamlink with snap https://snapcraft.io/test-streamlink but it can't open mpv from apt installed |
https://snapcraft.io/install/test-streamlink/ubuntu sudo snap install test-streamlink --edge There is more than one problem with this test-streamlink.
ffplay is installed and working, it commes installed by default on ubuntu.
vlc is installed, by "snap".
They messed up so badly, I can't copy custom plugins to plugins directory as root ???
|
@back-to, thank you for creating that test snap. I just did a couple tests on my system (Ubuntu 20.04, VLC installed via snap) and have the following to report: Default Install Install with classic confinement Install with 'devmode' confinement Although, I attempted to install with classic confinement in my second test, I think the classic confinement also needs to be specified by the snap itself (I might be totally wrong about that but I can't find external confirmation one way or the other right now), or else the command line switch has no effect. If, after changing the snap confinement to classic, streamlink works with the player path manually being specified, then I think the only change required would be to update the streamlink code to detect if it's running in a snap and have it search Thanks again for creating that snap @back-to. :-) |
That is not min, it is from @patterns |
My mistake. Thank you, @patterns, for the work you put into that snap! 😄 |
Snap in strict confinement does not see other installed binaries and can't start them. This is by design for security reasons. Classic confinement is for build tools and trusted developer teams so I wouldn't bet on being granted that. The only way to use
This works with
Another way to snap it, is with a simple or stripped down media player and always use this player to play streams. Or even better, to include LiveProxy in snap running as a daemon. |
Thanks @predr I used your snapcraft.yaml to add LiveProxy. I also included the stage-packages list (from the ffmpeg yaml) to cover all the bases. If anyone has the snap and it refreshes, it will be necessary to assign the player: |
@patterns Nice work! I like the configuration for
In future releases try trimming it down to absolutely necessary stuff.
Never ask users to do something before it works. I tried it without setting I tried it with
But why include |
Great points. Added the proxy restart to the configure hook. Removed mpv. It was to learn about the two (ffplay and mpv) because I didn't know about them until this ticket. Also made it print message when --player is an argument; it is when the snap setting for player is empty. |
Well I think it's good enough for first stable release under proper name. Search and ask in the snapcraft forum, someone should know what is bare minimum for hardware accelerated video encoding/decoding. Use
Also you can limit build system architectures in
|
@predr and @patterns, it seems that if streamlink won't get permission to install in classic confinement, maybe my request for snap packaging of streamlink wasn't a good idea? Might it be worth considering an AppImage package instead? That way no changes need to be made to streamlink and no extra packages (LiveProxy, ffplay, etc.) would need to be added to it. Thoughts? |
It shouldn't get classic confinement! Classic is for system packages and developer tools, stuff you can trust. Strict is for everything else and especially for apps you don't trust 100% but still want to use. Confinement (isolation from system) is a feature not a bug.
Yes, there should be other packages. Each package has trade-offs and everyone has different values.
ffplay is part of ffmpeg which is needed for Twitch to work (I guess streamlink is doing some processing there) so why not use it as default Here is example
|
With some advice on snapcraft forum, the ffplay dependencies list are now down to 13. Also included the filtering of the man pages and docs files. I didn't have much luck with the architectures, yet. A config file, streamlinkrc, is editable so that the user has more control because $SNAP_DATA (/var/snap/test-streamlink/current) can be accessed by root. I think it can choose the location of plugins (commented example in file). AppImage sounds interesting, but I haven't built one before. The confinement feels like a hurdle at times, but that trade-off is to add protection. Like in a landscape where user does not know the app, the trust just needs to be in Snapcraft store and the Snap virtualization/container. |
Feature Request
Description
Hi there. I couldn't an existing feature request for this, so I'd like to suggest a 'Snap' (https://snapcraft.io/) package of streamlink. If a Snap package existed, Linux users could install streamlink on their computer with a simple command:
Or through the snap GUI of their distro. Users would get the benefit of an easy installation that always stays up-to-date. The current package maintainers would experience less work, because this single snap package would work across all distributions.
Thanks for your consideration and this excellent app! 😄
Expected / Actual behavior
Linux users would be able to install streamlink from the command line by typing
Additional comments, screenshots, etc.
Instructions for creating a snap of a python application:
https://snapcraft.io/#python
The text was updated successfully, but these errors were encountered: