HDMI Output with ffplay

That’s my fault, I was the one who suggested to add the user to video to access /dev/fb0 because I figured this was a classic system not an ubuntu core box.

well, even on classic udev-acl should kick in i think…

Thanks for your replies. It is still the same problem (see my initial post). Even if I connect the framebuffer interface it just works when I execute the command with sudo.
Maybe you have some more ideas ;). Thanks

Any ideas? Would be great if you could give me some hints.
Thanks a lot

I tried it again but it is still the same behavior.
I connect the framebuffer interface but I can just run videos via hdmi on the raspberry pi when I execute the ffplay command with sudo.
Any hints? Any debugging I can do?

Would be great to get some support over here. Thanks.

On Ubuntu Core raspi2 here, /dev/fb0 has the following permissions:

$ getfacl /dev/fb0 
getfacl: Removing leading '/' from absolute path names
# file: dev/fb0
# owner: root
# group: video
user::rw-
group::rw-
other::---

The problem is that the user is not in the ‘video’ group and because /etc/group is read-only and the way extrausers database works, you can’t add the Ubuntu Core user to it. systemd’s uaccess (formerly udev’s udev-acls) is also used for permissions, but isn’t used with the framebuffer as seen here:

$ udevadm info /dev/fb0
...
E: DEVNAME=/dev/fb0
...
E: SUBSYSTEM=graphics
E: TAGS=:seat:master-of-seat:
...

The device is missing the ‘uaccess’ tag and so the user is not allowed to use it. All this is discussed extensively in use case 2 of Multiple users and groups in snaps. The proposed design will support having snapd manage groups and udev rules so that you can then add users to these snapd-managed groups.

Today, you can workaround the missing feature by:

  1. creating a group in the ‘extrausers’ db. Eg: sudo groupadd --extrausers --system my_fb
  2. create a udev rule in /etc/udev/rules.d/99-my_fb.rules: KERNEL=="fb[0-9]*", RUN+="/usr/bin/setfacl -m g:my_fb:rw $devnode"
  3. apply the rules: sudo udevadm control --reload-rules && sudo udevadm trigger /dev/fb0

(to remove the acl, use ‘sudo setfacl -x g:my_fb /dev/fb*’ and the rules file so it isn’t added back on reboot).

Now when you look at the acls, my_fb is listed:

$ getfacl /dev/fb0 
getfacl: Removing leading '/' from absolute path names
# file: dev/fb0
# owner: root
# group: video
user::rw-
group::rw-
group:my_fb:rw-
mask::rw-
other::---

While you should be able to now use ‘sudo adduser --extrausers <user> my_fb’ or ‘sudo usermod --extrausers -a -G my_db <user>’, neither of these work currently, but you can adjust /var/lib/extrausers/group to change this:

my_fb:x:999:

to:

my_fb:x:999:<your username>

Now logout and back in (or run sg my_fb) and you are a member of this group:

$ id
uid=1000(username) gid=1000(username) groups=1000(username),999(my_fb)

You will now be able to access the device. Eg, before all the above changes:

$ head -1 /dev/fb0
head: cannot open '/dev/fb0' for reading: Permission denied

and after:

$ head -1 /dev/fb0
<binary output>...
$

Good luck!

Thanks a lot for your help! This is fantastic and I was able to resolve the initial problem.

Sadly I am now running into another problem. When I execute ffplay I get the following:

Could not initialize SDL - Unable to open a console terminal
(Did you set the DISPLAY variable?)

Same as before: If I execute ffplay with sudo it is working.

I tried to connect process-control but this did not help. Also tried to set the display environment variable (e.g. to export DISPLAY=:0) but this had no effect as well.

Would be great if you could guide me here again ;).

Thanks a lot for your support!

I’m not sure what this is about (it may be SDL specific). DISPLAY is used with X11, I wonder if SDL is somehow trying to use X instead of the framebuffer. Do you have any security denials in journalctl at the time of the error?

Hi,
when I execute ffplay there is not really anything showing in the logs. I just get the error from above.

When installing the snap I get the following in syslog:

Jul  1 15:27:56 localhost systemd[1]: Mounted Mount unit for ffmpeg, revision x1.
Jul  1 15:27:57 localhost kernel: [ 5969.949822] audit: type=1400 audit(1530458877.165:133): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap-update-ns.ffmpeg" pid=22593 comm="apparmor_parser"
Jul  1 15:27:58 localhost kernel: [ 5970.890943] audit: type=1400 audit(1530458878.105:134): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.ffmpeg.ffmpeg" pid=22595 comm="apparmor_parser"
Jul  1 15:27:59 localhost kernel: [ 5971.827851] audit: type=1400 audit(1530458879.045:135): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.ffmpeg.ffplay" pid=22597 comm="apparmor_parser"
Jul  1 15:28:00 localhost kernel: [ 5972.826442] audit: type=1400 audit(1530458880.041:136): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap-update-ns.core" pid=22614 comm="apparmor_parser"
Jul  1 15:28:00 localhost kernel: [ 5972.857942] audit: type=1400 audit(1530458880.073:137): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.core.hook.configure" pid=22616 comm="apparmor_parser"
Jul  1 15:28:00 localhost kernel: [ 5973.048460] audit: type=1400 audit(1530458880.265:138): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap-update-ns.ffmpeg" pid=22623 comm="apparmor_parser"
Jul  1 15:28:00 localhost kernel: [ 5973.076105] audit: type=1400 audit(1530458880.293:139): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.ffmpeg.ffmpeg" pid=22625 comm="apparmor_parser"
Jul  1 15:28:01 localhost kernel: [ 5974.322232] audit: type=1400 audit(1530458881.537:140): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.ffmpeg.ffplay" pid=22627 comm="apparmor_parser"
Jul  1 15:28:01 localhost kernel: [ 5974.738742] audit: type=1400 audit(1530458881.953:141): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap-update-ns.core" pid=22644 comm="apparmor_parser"
Jul  1 15:28:01 localhost kernel: [ 5974.770661] audit: type=1400 audit(1530458881.985:142): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.core.hook.configure" pid=22646 comm="apparmor_parser"
Jul  1 15:28:03 localhost kernel: [ 5976.260681] audit_printk_skb: 3 callbacks suppressed
Jul  1 15:28:03 localhost kernel: [ 5976.260704] audit: type=1400 audit(1530458883.477:144): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.ffmpeg.ffmpeg" pid=22655 comm="apparmor_parser"
Jul  1 15:28:05 localhost kernel: [ 5977.857808] audit: type=1400 audit(1530458885.073:145): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.ffmpeg.ffplay" pid=22658 comm="apparmor_parser"
Jul  1 15:28:05 localhost systemd-udevd[531]: Network interface NamePolicy= disabled on kernel command line, ignoring.
Jul  1 15:28:05 localhost systemd-udevd[22678]: Process '/sbin/crda' failed with exit code 234.
''' Jul  1 15:27:56 localhost systemd[1]: Mounted Mount unit for ffmpeg, revision x1.
Jul  1 15:27:57 localhost kernel: [ 5969.949822] audit: type=1400 audit(1530458877.165:133): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap-update-ns.ffmpeg" pid=22593 comm="apparmor_parser"
Jul  1 15:27:58 localhost kernel: [ 5970.890943] audit: type=1400 audit(1530458878.105:134): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.ffmpeg.ffmpeg" pid=22595 comm="apparmor_parser"
Jul  1 15:27:59 localhost kernel: [ 5971.827851] audit: type=1400 audit(1530458879.045:135): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.ffmpeg.ffplay" pid=22597 comm="apparmor_parser"
Jul  1 15:28:00 localhost kernel: [ 5972.826442] audit: type=1400 audit(1530458880.041:136): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap-update-ns.core" pid=22614 comm="apparmor_parser"
Jul  1 15:28:00 localhost kernel: [ 5972.857942] audit: type=1400 audit(1530458880.073:137): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.core.hook.configure" pid=22616 comm="apparmor_parser"
Jul  1 15:28:00 localhost kernel: [ 5973.048460] audit: type=1400 audit(1530458880.265:138): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap-update-ns.ffmpeg" pid=22623 comm="apparmor_parser"
Jul  1 15:28:00 localhost kernel: [ 5973.076105] audit: type=1400 audit(1530458880.293:139): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.ffmpeg.ffmpeg" pid=22625 comm="apparmor_parser"
Jul  1 15:28:01 localhost kernel: [ 5974.322232] audit: type=1400 audit(1530458881.537:140): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.ffmpeg.ffplay" pid=22627 comm="apparmor_parser"
Jul  1 15:28:01 localhost kernel: [ 5974.738742] audit: type=1400 audit(1530458881.953:141): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap-update-ns.core" pid=22644 comm="apparmor_parser"
Jul  1 15:28:01 localhost kernel: [ 5974.770661] audit: type=1400 audit(1530458881.985:142): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.core.hook.configure" pid=22646 comm="apparmor_parser"
Jul  1 15:28:03 localhost kernel: [ 5976.260681] audit_printk_skb: 3 callbacks suppressed
Jul  1 15:28:03 localhost kernel: [ 5976.260704] audit: type=1400 audit(1530458883.477:144): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.ffmpeg.ffmpeg" pid=22655 comm="apparmor_parser"
Jul  1 15:28:05 localhost kernel: [ 5977.857808] audit: type=1400 audit(1530458885.073:145): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.ffmpeg.ffplay" pid=22658 comm="apparmor_parser"
Jul  1 15:28:05 localhost systemd-udevd[531]: Network interface NamePolicy= disabled on kernel command line, ignoring.
Jul  1 15:28:05 localhost systemd-udevd[22678]: Process '/sbin/crda' failed with exit code 234.

When I connect the framebuffer plug manually, this is shown:

Jul  1 15:29:41 localhost kernel: [ 6073.919814] audit: type=1400 audit(1530458981.136:146): apparmor="ALLOWED" operation="open" profile="snap.ffmpeg.ffplay" name="/dev/fb0" pid=22752 comm="ffplay" requested_mask="wr" denied_mask="wr" fsuid=1000 ouid=0
Jul  1 15:29:41 localhost kernel: [ 6073.920048] audit: type=1400 audit(1530458981.136:147): apparmor="ALLOWED" operation="open" profile="snap.ffmpeg.ffplay" name="/dev/fb0" pid=22752 comm="ffplay" requested_mask="wr" denied_mask="wr" fsuid=1000 ouid=0

If I run the command with sudo, then it is working fine. Anything else I should check?

Thanks,
Florian

This suggests the interface was not actually connected since if it was, this rule would be in the policy: /dev/fb[0-9]* rw, which would make the above policy violation go away.

I tried to use the snapcraft.yaml that you originally posted, but it fails to build (I tried on amd64). It also doesn’t list ‘framebuffer’ in any of the plugs. Perhaps you forgot to add it? If you provide a working snapcraft.yaml or an amd64 snap, I can look into this further.

Hi,
sorry for the late reply. Here is the snapcraft.yaml:

name: ffmpeg
version: 0.1.6
summary: ffmpeg test
description: ffmpeg test
grade: devel
confinement: devmode

apps:
  ffmpeg:
    command: bin/ffmpeg
    plugs: [home, opengl, framebuffer, process-control]

  ffplay:
    command: bin/ffplay
    plugs: [pulseaudio, x11, process-control, alsa, network, opengl, framebuffer]

parts:
  ffmpeg:
    source: git://source.ffmpeg.org/ffmpeg.git
    source-tag: n2.8.14
    plugin: autotools
    configflags:
      - --disable-ffprobe
      - --enable-gpl
      - --enable-libass
      - --enable-libfreetype
      - --enable-libmp3lame
      - --enable-libopus
      - --enable-libtheora
      - --enable-libvorbis
      - --enable-libvpx
      - --enable-libx264
      - --enable-libx265
      - --enable-nonfree
      - --enable-opengl
    build-packages:
      - autoconf
      - automake
      - build-essential
      - cmake
      - g++
      - git
      - libass-dev
      - libfreetype6-dev
      - libmp3lame-dev
      - libopus-dev
      - libsdl1.2-dev
      - libtheora-dev
      - libtool
      - libva-dev
      - libvdpau-dev
      - libvorbis-dev
      - libvpx-dev
      - libx264-dev
      - libx265-dev
      - libxcb-shm0-dev
      - libxcb-xfixes0-dev
      - libxcb1-dev
      - make
      - pkg-config
      - texinfo
      - yasm
      - zlib1g-dev
      - libsdl2-dev

  ffmpeg-launcher:
    plugin: dump
    source: ffmpeg/scripts
    organize:
      'ffplay': bin/
      'ffmpeg': bin/
    after: [ffmpeg]

The scripts are just like this:

#!/bin/bash

if [ "$SNAP_ARCH" == "amd64" ]; then
  ARCH="x86_64-linux-gnu"
elif [ "$SNAP_ARCH" == "armhf" ]; then
  ARCH="arm-linux-gnueabihf"
elif [ "$SNAP_ARCH" == "arm64" ]; then
  ARCH="aarch64-linux-gnu"
else
  ARCH="$SNAP_ARCH-linux-gnu"
fi

# Include architecture specific libraries
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SNAP/usr/lib/$ARCH

exec $SNAP/usr/local/bin/ffplay $@

The following logs I just get if I execute ffplay without connecting the framebuffer:

Jul  1 15:29:41 localhost kernel: [ 6073.919814] audit: type=1400 audit(1530458981.136:146): apparmor="ALLOWED" operation="open" profile="snap.ffmpeg.ffplay" name="/dev/fb0" pid=22752 comm="ffplay" requested_mask="wr" denied_mask="wr" fsuid=1000 ouid=0
Jul  1 15:29:41 localhost kernel: [ 6073.920048] audit: type=1400 audit(1530458981.136:147): apparmor="ALLOWED" operation="open" profile="snap.ffmpeg.ffplay" name="/dev/fb0" pid=22752 comm="ffplay" requested_mask="wr" denied_mask="wr" fsuid=1000 ouid=0

If I connect the framebuffer before and execute ffplay I do not see anything in the logs. Except for the error message being displayed directly with the ffplay command:

Could not initialize SDL - Unable to open a console terminal
(Did you set the DISPLAY variable?)

Thanks for helping

Now I thought ffplay might be hard to get working and it is not the best player anyway. So I tried to use the MPV player. I am successful in building the snap [1] but if I try to run it (after connecting the framebuffer plug) I run into the following problem:

mpv-casept.mpv TestVideoColorChange.mp4 --vo=opengl

Error:

Fontconfig error: Cannot load default config file
[osd/libass] No usable fontconfig configuration file found, using fallback.
Fontconfig error: Cannot load default config file
Playing: TestVideoColorChange.mp4
 (+) Video --vid=1 (*) (h264 1280x720 25.000fps)
[vo/opengl/x11] couldn't open the X11 display ()!
[vo/opengl/x11] couldn't open the X11 display ()!
[vo/opengl/x11] couldn't open the X11 display ()!
[vo/opengl/wayland] failed to connect to a wayland server: check if a wayland compositor is running
[vo/opengl] VT_GETMODE failed: Inappropriate ioctl for device
[vo/opengl] Failed to set up VT switcher. Terminal switching will be unavailable.
[vo/opengl] Cannot open card "0": No such file or directory.
[vo/opengl] Failed to create KMS.
[vo/opengl] 'drm-egl' is deprecated, use 'drm' instead.
[vo/opengl] Can't handle VT release - signal already used
[vo/opengl] Failed to set up VT switcher. Terminal switching will be unavailable.
[vo/opengl] Cannot open card "0": No such file or directory.
[vo/opengl] Failed to create KMS.
[vo/opengl/x11] couldn't open the X11 display ()!
Error opening/initializing the selected video_out (--vo) device.
Video: no video
No video or audio streams selected.


Exiting... (Errors when loading file)

Maybe you have any suggestions for this problem or my initial ffplay problem. Thanks a lot and best regards

[1]

name: mpv-casept
version: '0.27.0'
summary: a free, open source, and cross-platform media player. Unofficial snap.
description: |
  mpv is a media player based on MPlayer and mplayer2.
  It supports a wide variety of video file formats,
  audio and video codecs, and subtitle types.
grade: devel
confinement: devmode

apps:
  mpv:
    command: usr/local/bin/mpv
    plugs: [framebuffer, x11, opengl, unity7, pulseaudio, home, network, removable-media, optical-drive]

parts:
  mpv:
    source: ./mpv-0.27.0.tar.gz
    plugin: waf
    prepare: |
     ./bootstrap.py
    stage-packages:
      - libasound2
      - libass5
      - libatomic1
      - libbluray1
      - libc6
      - libcdio-cdda1
      - libcdio-paranoia1
      - libcdio13
      - libdrm2
      - libdvdnav4
      - libdvdread4
      - libegl1-mesa
      - libgbm1
      - libgl1-mesa-glx
      - libjack-jackd2-0
      - libjpeg8
      - liblcms2-2
      - liblua5.2-0
      - libpulse0
      - librubberband2v5
      - libsdl2-2.0-0
      - libsmbclient
      - libsndio6.1
      - libuchardet0
      - libv4l-0
      - libva-drm1
      - libva-wayland1
      - libva-x11-1
      - libva1
      - libvdpau1
      - libwayland-client0
      - libwayland-cursor0
      - libwayland-egl1-mesa
      - libx11-6
      - libxext6
      - libxinerama1
      - libxkbcommon0
      - libxrandr2
      - libxss1
      - libxv1
      - zlib1g
    build-packages:
      - build-essential
      - libasound2-dev
      - libass-dev
      - libbluray-dev
      - libcdio-paranoia-dev
      - libdvdnav-dev
      - libdvdread-dev
      - libegl1-mesa-dev
      - libenca-dev
      - libgbm-dev
      - libgl1-mesa-dev
      - libguess-dev
      - libjack-dev
      - libjpeg-dev
      - liblcms2-dev
      - liblua5.2-dev
      - libpulse-dev
      - librubberband-dev
      - libsdl2-dev
      - libsmbclient-dev
      - libsndio-dev
      - libswscale-dev
      - libuchardet-dev
      - libv4l-dev
      - libva-dev
      - libvdpau-dev
      - libwayland-dev
      - libx11-dev
      - libxinerama-dev
      - libxkbcommon-dev
      - libxrandr-dev
      - libxss-dev
      - libxv-dev
      - pkg-config
      - python
      - python-docutils
    after: [ffmpeg]
  ffmpeg:
    source: git://source.ffmpeg.org/ffmpeg.git
    source-tag: n3.2.4
    plugin: autotools
    configflags:
      - --disable-ffprobe
      - --enable-gpl
      - --enable-libass
      - --enable-libfreetype
      - --enable-libmp3lame
      - --enable-libopus
      - --enable-libtheora
      - --enable-libvorbis
      - --enable-libvpx
      - --enable-libx264
      - --enable-libx265
      - --enable-nonfree
      - --enable-opengl
      - --enable-static
      - --enable-omx
      - --enable-omx-rpi
      - --enable-libxcb
      - --enable-libfreetype
      - --enable-gnutls
      - --disable-opencl
    build-packages:
      - autoconf
      - automake
      - build-essential
      - cmake
      - g++
      - git
      - libass-dev
      - libfreetype6-dev
      - libmp3lame-dev
      - libopus-dev
      - libsdl2-dev
      - libtheora-dev
      - libtool
      - libva-dev
      - libvdpau-dev
      - libvorbis-dev
      - libvpx-dev
      - libx264-dev
      - libx265-dev
      - libxcb-shm0-dev
      - libxcb-xfixes0-dev
      - libxcb1-dev
      - make
      - pkg-config
      - texinfo
      - yasm
      - zlib1g-dev
      - libluajit-5.1-dev
      - libfontconfig1-dev
      - libfribidi-dev
      - python-docutils
      - libjpeg-dev
      - libgnutls28-dev
      - libomxil-bellagio-dev
    stage-packages:
      - libssl-dev
    organize:
      usr/local/bin: usr/bin

did you connect the opengl interface (looks like you didnt, else /dev/dri/card0 should have been accessible) …

Hi ogra,
thanks for your quick reply. The opengl plug is connected (I also connected the framebuffer plug).
Thanks

looks like you might need special build options for gles (though the bug only mentions intel)

you might also need libegl1-mesa-drivers in stage-packages since you do not have an X11 server or wayland compositor … alternatively you could install mir-kiosk alongside to get a wayland compositor/server to connect to and use the wayland-socket-dir and x11 plugs like in:

some more details are at:

and if you look for a completely quiet boot with splash screen there is:

EDIT: and i forgot to link the full tutorial (see step 12):

Sorry for the late reply. I was away for a while. Thanks for your support.

So I found out a few things but I am still having trouble:

  • I was using Ubuntu Core stable version which was the problem why I was not able to see anything on the screen. Seems that the edge version is required to get mir-kiosk and graphical snaps running.

  • I’ve installed mir-kiosk for wayland support and I can also see something on my screen when I try out mir-kiosk-apps

  • My mpv snap is here [1]

  • When executing the mpv snap “mpv-casept.mpv SampleVideo.mp4 --vo=wayland” I get the following message:
    [vo/wayland/wayland] failed to connect to a wayland server: check if a wayland compositor is running Error opening/initializing the selected video_out (--vo) device.

  • Executing the mpv snap with sudo gets me further and I see the first frame of the video on the screen. Afterwards no further frames are shown and in the logs the following is shown:
    [vo/wayland/wayland] can't draw, back buffer is busy

Some additional information:

  • I’ve tried to build mpv with the --enable-rpi flag but I am running into:
    You manually enabled the feature 'rpi', but the autodetection check failed. Failed to run './waf configure --enable-rpi' for 'mpv': Exited with code 1. Verify that the part is using the correct parameters and try again.

  • Do I need to follow the approach described in https://www.raspberrypi.org/forums/viewtopic.php?t=199775 and install the GLES and EGL files from the official raspberry pi github page + change the wscript file?

I am trying further to get mpv running on rpi with Ubuntu Core but maybe you have some advices for me. Thanks.

[1] MPV snap

name: mpv-casept
version: '0.27.0'
summary: a free, open source, and cross-platform media player. Unofficial snap.
description: |
  mpv is a media player based on MPlayer and mplayer2.
  It supports a wide variety of video file formats,
  audio and video codecs, and subtitle types.
grade: devel
confinement: devmode

apps:
  mpv:
    command: usr/local/bin/mpv
    environment:
      XDG_RUNTIME_DIR: $SNAP_DATA/wayland
      LIBGL_DRIVERS_PATH: $SNAP_DATA/usr/lib/arm-linux-gnueabihf/dri
      WAYLAND_SOCKET_DIR: $SNAP_DATA/wayland
    plugs: [framebuffer, x11, opengl, unity7, pulseaudio, home, network, removable-media, optical-drive, wayland, alsa]

plugs:
  wayland-socket-dir:
    content: wayland-socket-dir
    interface: content
    target: $SNAP_DATA/wayland
    default-provider: mir-kiosk:wayland-socket-dir

parts:
  mpv:
    source: https://github.com/mpv-player/mpv/archive/v0.27.0.tar.gz
    plugin: waf
    prepare: |
      ./bootstrap.py
    stage-packages:
      - libasound2
      - libass5
      - libatomic1
      - libbluray1
      - libc6
      - libcdio-cdda1
      - libcdio-paranoia1
      - libcdio13
      - libdrm2
      - libdvdnav4
      - libdvdread4
      - libegl1-mesa
      - libgbm1
      - libgl1-mesa-glx
      - libgles2-mesa-dev
      - libjack-jackd2-0
      - libjpeg8
      - liblcms2-2
      - liblua5.2-0
      - libpulse0
      - librubberband2v5
      - libsdl2-2.0-0
      - libsmbclient
      - libsndio6.1
      - libuchardet0
      - libv4l-0
      - libva-drm1
      - libva-wayland1
      - libva-x11-1
      - libva1
      - libvdpau1
      - libwayland-client0
      - libwayland-cursor0
     - libwayland-egl1-mesa
      - libx11-6
      - libxext6
      - libxinerama1
      - libxkbcommon0
      - libxrandr2
      - libxss1
      - libxv1
      - zlib1g
    build-packages:
      - build-essential
      - libasound2-dev
      - libass-dev
      - libbluray-dev
      - libcdio-paranoia-dev
      - libdvdnav-dev
      - libdvdread-dev
      - libegl1-mesa-dev
      - libenca-dev
      - libgbm-dev
      - libgl1-mesa-dev
      - libguess-dev
      - libjack-dev
      - libjpeg-dev
      - liblcms2-dev
      - liblua5.2-dev
      - libpulse-dev
      - librubberband-dev
      - libsdl2-dev
      - libsmbclient-dev
      - libsndio-dev
      - libswscale-dev
      - libuchardet-dev
      - libv4l-dev
      - libva-dev
      - libvdpau-dev
      - libwayland-dev
      - libx11-dev
      - libxinerama-dev
      - libxkbcommon-dev
      - libxrandr-dev
      - libxss-dev
      - libxv-dev
      - libgles2-mesa-dev
      - pkg-config
      - python
      - python-docutils
    after: [ffmpeg]
  ffmpeg:
    source: git://source.ffmpeg.org/ffmpeg.git
    source-tag: n3.2.4
    plugin: autotools
    configflags:
      - --disable-ffprobe
      - --enable-gpl
      - --enable-libass
      - --enable-libfreetype
      - --enable-libmp3lame
      - --enable-libopus
      - --enable-libtheora
      - --enable-libvorbis
      - --enable-libvpx
      - --enable-libx264
      - --enable-libx265
      - --enable-nonfree
      - --enable-opengl
      - --enable-static
      - --enable-omx
      - --enable-omx-rpi
      - --enable-libxcb
      - --enable-libfreetype
      - --enable-gnutls
      - --disable-opencl
    build-packages:
      - autoconf
      - automake
      - build-essential
      - cmake
      - g++
      - git
      - libass-dev
      - libfreetype6-dev
      - libmp3lame-dev
      - libopus-dev
      - libsdl2-dev
      - libtheora-dev
      - libtool
      - libva-dev
      - libvdpau-dev
      - libvorbis-dev
      - libvpx-dev
      - libx264-dev
      - libx265-dev
      - libxcb-shm0-dev
      - libxcb-xfixes0-dev
      - libxcb1-dev
      - make
      - pkg-config
      - texinfo
      - yasm
      - zlib1g-dev
      - libluajit-5.1-dev
      - libfontconfig1-dev
      - libfribidi-dev
      - python-docutils
      - libjpeg-dev
      - libgnutls28-dev
      - libomxil-bellagio-dev
    stage-packages:
      - libssl-dev
   organize:
      usr/local/bin: usr/bin

I am not sure if mir-kiosk actually allows apps that are not running as service (i assume you need write access to the socket, which likely is root owned), probably someone from the mir team can clearify this … @greyback @alan_g ?

The socket is owned by root, but the permissions allow any user to connect.

Hmm, then it should theoretically find the socket if the wayland-socket-dir interface has been properly connectded…

That ought to be easy to verify with:

snap run --shell mpv-casept

and

ls -hl $XDG_RUNTIME_DIR

@getty23 I can’t help much with RPi (don’t have one), but I understand there are some oddities with its graphics. It might be better to isolate those issues by getting this working on amd64 first. (Use the Ubuntu Core VM from https://community.ubuntu.com/t/snaps-to-develop-a-web-kiosk-on-ubuntu-core-using-wayland/).