1

I have keyboard and screen connected to my raspberry pi. I want to try running a video on a loop on startup (I do not want to install desktop environment to do so). In the past I have successfully used omxplayer. However omxplayer is deprecated. I went to their github trying to compile it, but even that failed, so I guess omxplayer is truly dead.

Thus I tried to switch to vlc... what a nightmare it is proving to be. So I got a brand new installation of raspberry pi.

This is what I run (dump from my history)

1  sudo apt-get update
2  sudo apt-get upgrade
3  sudo apt-get dist-upgrade
4  sudo apt-get install vlc
   VLC tells me it is missing stuff, so I fix it
5  sudo apt-get install vlc --fix-missing
6  sudo mkdir /mnt/usb
7  sudo mount /dev/sda1 /mnt/usb
8  cvlc -L /mnt/usb/demo.mp4

And as soon as I run it I get this

VLC media player 3.0.17.4 Vetinari (revision 3.0.13-8-g41878ff4f2)
[0082c1b0] vlcpulse audio output error: PulseAudio server connection failure: Connection refused
[00841f48] dbus interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[00841f48] main interface error: no suitable interface module
[007cbb98] main libvlc error: interface "dbus,none" initialization failed
[0083acd8] main interface error: no suitable interface module
[007cbb98] main libvlc error: interface "globalhotkeys,none" initialization failed
[0083acd8] dummy interface: using the dummy interface module...
error: XDG_RUNTIME_DIR not set in the environment.
error: XDG_RUNTIME_DIR not set in the environment.
[67a01460] gles2 generic error: parent window not available
[67a00ce0] mmal_xsplitter vout display error: Failed to open Xsplitter:opengles2 module
[67a01460] xcb generic error: window not available
[67a00ce0] mmal_xsplitter vout display error: Failed to open Xsplitter:xcb_x11 module
[67a00ce0] mmal_xsplitter vout display error: Failed to open Xsplitter:mmal_vout module
[67a00ce0] mmal_xsplitter vout display: Try drm
[67a01460] drm_vout generic: <<< OpenDrmVout: Fmt=DPS3
[67a01460] drm_vout generic error: Failed to get xlease
[67a13c28] chain filter error: Too high level of recursion (3)
[67a136c0] main filter error: Failed to create video converter
[72b0eb80] avcodec decoder: Using DRM Video Accel for hardware decoding
[hevc @ 0x72b1baf0] Failed setup for format drm_prime: hwaccel initialisation returned error.
[72b0eb80] avcodec decoder error: existing hardware acceleration cannot be reused
[67a01460] gles2 generic error: parent window not available
[67a00ce0] mmal_xsplitter vout display error: Failed to open Xsplitter:opengles2 module
[67a01460] xcb generic error: window not available
[67a00ce0] mmal_xsplitter vout display error: Failed to open Xsplitter:xcb_x11 module
[67a00ce0] mmal_xsplitter vout display error: Failed to open Xsplitter:mmal_vout module
[67a00ce0] mmal_xsplitter vout display: Try drm
[67a01460] drm_vout generic: <<< OpenDrmVout: Fmt=I0AL
[67a01460] drm_vout generic error: Failed to get xlease
^C[67a01460] drm_vout generic error: AddFB2 failed: Invalid argument
[67a01460] drm_vout generic error: Failed to create frme buffer from pic
[67a01460] drm_vout generic error: AddFB2 failed: Invalid argument
[67a01460] drm_vout generic error: Failed to create frme buffer from pic

Then I thought it would be great idea to make vlc runnable as root so I do

9  sudo sed -i 's/geteuid/getppid/' /usr/bin/vlc
10  sudo cvlc -L /mnt/usb/demo.mp4

And it still gives same errors.

All I want to do is to boot up my raspberry pi and have it play a video on boot from the usb stick named demo.mp4

On omxplayer it was so easy. How do I do same with vlc? Do I absolutely have to install desktop environment?

I understand that giving up after only running 10 commands on the command line is lame. But I think I am out of options. I never had anything like this happen to me before, but then I am a young linux person.

Quillion
  • 111
  • 3
  • Try sudo apt install vlc-plugin-base . Note apt-get is deprecated so use apt in the future. – MatsK Nov 24 '22 at 20:24
  • @MatsK I just did that and got vlc-plugin-base is already the newest version (3.0.17.4-0+deb11u1+rpi1+rpt4) Thanks for telling me to use apt next time in the future, will do! – Quillion Nov 24 '22 at 21:59
  • "Do I absolutely have to install desktop environment?" -> There are number of layers between "no GUI what-so-ever" and "desktop environment"; the latter has a fairly specific meaning in a linux context: https://raspberrypi.stackexchange.com/a/26838/5538 Most GUI apps can be used without a DE or WM as long as you are okay with running them full-screen with no other apps and minimal functionality (which is what you want anyway, I think). – goldilocks Nov 24 '22 at 22:27
  • @goldilocks I would love to run nothing else other than vlc full screen playing same clip over and over again since this is for demo purposes of something I am making. What would be command to just install vlc UI without any other DE or WM and then launch that UI on startup? – Quillion Nov 25 '22 at 02:50
  • More conventionally, I think people do use a lightweight, standalone window manager like openbox here. The most complicated part is I think autologin, which is still simpler than trying to run this as a pure system service simply because there are a lot more examples around. Autologin is normally done through lightdm, the default display manager, I believe it is possible to do that and then start something minimal like you want instead of a DE. Another alternative is nodm; read https://raspberrypi.stackexchange.com/a/83715/5538 and https://raspberrypi.stackexchange.com/a/57560/5538. – goldilocks Nov 25 '22 at 15:09
  • You might also have a browse through questions tagged with 'kiosk' (you can search through specific tags by square bracketing the tag, eg. [kiosk] autologin). If I find time in the next few days, I might try and do this without a DM (and WM maybe) and post an answer here, but I think you have a good chance of finding something satisfactory in all the stuff above. If there's something in there you don't understand or that doesn't work the way you think it should, please ask another question specifically about that. – goldilocks Nov 25 '22 at 15:12
  • @goldilocks I spent three days digging, and unfortunately I struggled to find a solution without using DM – Quillion Nov 28 '22 at 22:11
  • Sorry, fell behind with some other things and did not get time to try this until now. I did manage to get a boot service to run X with a single application, but only as root -- which is a security issue in itself (depending on the context), which vlc compounds by not allowing execution as root. I got around that by launching it as an unprivileged user inside the X session (surprised that's possible), but there are complications (eg. with the sound system, if you need that). I think it is much wiser to do this with a DM and WM geared to the task; nodm was not created for nothing. – goldilocks Dec 03 '22 at 22:05
  • @goldilocks thanks for trying it out! It is sad and unfortunate, but I guess using DM and WM is the way to go! I miss omxplayer so much, it was so easy to setup kiosk in the past. Wish there was a way for me to get old instance of raspberry pi with working omxplayer. – Quillion Dec 15 '22 at 22:30

1 Answers1

0

I have a terrible solution and hope someone will suggest a better one. I enabled auto-login and added vlc --loop {file_name} to .profile file. You can't even run it in the background.