HDMI Output with ffplay


Hello everyone,

I am currently having trouble in getting ffplay running with Ubuntu Core and my Raspberry Pi.
I get my snap compiled and ffplay is running but it does not output the video to hdmi (just shows the video in the console).
I’ve attached by snapcraft.yaml and it would be fantastic if you could advice me in what I need to configure in order to get ffplay to output to hdmi.

Thanks a lot

snap 2.32.8
snapd 2.32.8
series 16
kernel 4.4.0-1090-raspi2


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

    command: bin/ffmpeg
    plugs: [home]

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

    source: git://source.ffmpeg.org/ffmpeg.git
    source-tag: n2.8.14
    plugin: autotools
      - --disable-ffprobe
      - --enable-gpl
      - --enable-libass
      - --enable-libfreetype
      - --enable-libmp3lame
      - --enable-libopus
      - --enable-libtheora
      - --enable-libvorbis
      - --enable-libvpx
      - --enable-libx264
      - --enable-libx265
      - --enable-nonfree
      - 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

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


While i’m not actually certain this will help, i’d start with trying to add the opengl interface and ship the right gallum mesa drivers … (not sure if the latter one would really be required, but the first one definitely gives you access to /dev/dri/card0 for graphical output)


Thanks for the hint.
I added the opengl plug but this did not help.
When I was checking ffmpeg -sources, I get the following:

Could not open framebuffer device '/dev/fb0': Permission denied

So I thought lets add the framebuffer plug as well. But this does not work and I still see the framebuffer permission denied.
It is interesting that if I run my ffmpeg.ffplay snap with sudo rights, then it is working fine and I see the video on my hdmi device.

Any idea what the problem might be over here?



If it works with sudo then it’s just a standard permissions problem. Check that your user account is in the relevant groups for access to the devices in /dev, e.g. added to the video group for /dev/fb0.


also, add the framebuffer plug and connect it :wink:


Thanks a lot for your advice.
I have connected the framebuffer plug :wink: but I am having trouble with the users:

“sudo adduser getty23 video” does not work from my getty23 account:
gpasswd: cannot lock /etc/group; try again later.
adduser: `/usr/bin/gpasswd -a getty23 video’ returned error code 1. Exiting

I tried editing the group file manually but obviously this does not work either.

If I do the same thing via sudo classic mode, it works but no effect to my problem and to the groups file in the getty23 profile.

I tried to follow “https://askubuntu.com/questions/872621/how-do-you-modify-group-membership-in-ubuntu-core” to edit the group file in extrausers with “video:x:44:getty23”. This worked but there was no effect. Still no permission.

Would be great if you could help me further on my little problem ;).

Thanks a lot


Groups are shallow with snaps, snaps use udev-acl to allow users to access devices (@jdstrand may correct me here) , you should not need to add your user to a group to access anything, the interface should be all that is needed.

what exactly is the remaining issue you want to fix by adding the user to the group ?


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