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

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

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]

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

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
    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]

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?

Thanks

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

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) …