I made a snap ( for Streamlink to see what is involved. It was to try issue 3010.
So the question about classic confinement brought me here to ask for help. Is that (classic) the recommended option to allow the Streamlink tool to launch players like VLC, mpv, and ffplay?

VLC is installed via snappy, but mpv and ffplay were installed with apt-get.

A new question just occurred, should the Streamlink issue 3010 just be converted into a request here? to be handled by snapcrafters builders.
This is the snapcraft.yaml:

name: test-streamlink
base: core18
summary: test-Streamlink
description: |
  Streamlink is a CLI utility which pipes video streams from various 
  services into a video player
confinement: strict
adopt-info: slink-build
    command: bin/streamlink
    plugs: [network]
    plugin: python
    source: .
      - python-future
      - python-requests
      - python-singledispatch
      - python-pycryptodome
      - python-iso3166
      - python-isodate
      - python-websocket
      - python-backports-shutil-get-terminal-size
    override-pull: |
        snapcraftctl pull
        version="$(git describe --tags --long)"
        snapcraftctl set-version "$version"
        snapcraftctl set-grade stable

Here is what I would do. Open streams in ffplay and in you want to use specific media player pipe to that media player with --stdout. And I would also include LiveProxy because it makes Streamlink much more usable by allowing use of playlists in any player.

name: streamlink
summary: Streamlink and LiveProxy in one package
description: |
  Streamlink is a CLI utility which pipes video streams from various services into a video player, such as VLC.

      streamlink <URL> 720p
      streamlink <URL> 720p --stdout | vlc -

  LiveProxy is a local proxy server for Streamlink.


version: '1.4.1'
base: core18
grade: stable
confinement: strict

  # required for sound to work with ffplay
    bind: $SNAP/usr/share/alsa

    command: bin/streamlink --player="$SNAP/usr/bin/ffplay -window_title Streamlink"
      # Some of these might not be needed
      - home
      - network
      - desktop
      - desktop-legacy
      - wayland
      - x11
      - opengl
      - audio-playback
    command: bin/liveproxy
    daemon: simple
      - network
      - network-bind

    plugin: python
    python-version: python3
    source-tag: 1.4.1
      # Some of these might not be needed
      - ffmpeg
      - libglu1-mesa
      - freeglut3
      - libslang2
      - libpulse0
      - gstreamer1.0-plugins-good
      - gstreamer1.0-plugins-bad
      - gstreamer1.0-plugins-ugly
      - libgpm2

    plugin: python
    python-version: python3
    source-tag: 1.0.0
      - streamlink

Thanks, this is very helpful. I will give it a try!

What about a snap with Twitch-GUI in Streamlink? Could it be possible?

Streamlink Twitch GUI is a multi platform browser for Streamlink to browse and watch streams in your video player of choice.

A graphical user interface (GUI) on top of the Streamlink command line interface (CLI).

Built with NW.js, a web application platform written in JavaScript (EmberJS), HTML (Handlebars), and CSS (LessCSS). Powered by Chromium and Node.js.

Yes please, could we have this? Is it possible nowadays? Streamlink-Twitch-GUI can’t be gotten going because the repositories (apt install streamlink) version is too old and at least a Streamlink 6.0 is required :confused: