Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7403

Graphics, sound and multimedia • Video player with web interface.

$
0
0
Hi,

I am way past the limit of my linux knowledge and am reaching out for help...

I have a Pi2 which I have running Buster. It is connected to a TV and has a couple of mp4 videos that are launched using omxplayer via bash scripts at various times using crontab.

I also have apache running and have a simple php page which uses shell_exec() to launch the same bash files and switch videos whenever the user wants to.

This is all working fine.

But I can't help but tinker... I want to upgrade, Buster is no longer supported, so I thought, get a Pi4, install bookworm & apache and set everything up the same. Obviously omxplayer is no longer available, so I would switch to vlc.

Ready?

Well, launching vlc is easy enough using autostart to get the first video playing. When using crontab I found I had to add DISPLAY=:0.0 to the start of the line in the bash script, so that is now working...

But for the life of me I cannot get the videos to play via the web page.

I have done the setup I previously did (installed apache2, php & libapache2-mod-php), added www-data to etc/sudoers to give it permissions to launch bash files (I had to do this on Buster, presume it is the same on Bookworm, but shouldn't stop anything from working). I have also added www-data to the video group, though not sure this is 100% needed either.

The result is that the php page loads and executes fine, the bash script definitely launches (it initially kills vlc, and that happens), but the new instance of vlc does not launch. I checked the error logs:

Code:

[000000558fe25da0] vlcpulse audio output error: PulseAudio server connection failure: Connection refused[000000558fe3d570] dbus interface error: Failed to connect to the D-Bus session daemon: /usr/bin/dbus-launch terminated abnormally with the following error: Authorization required, but no >Autolaunch error: X11 initialization failed.[000000558fe3d570] main interface error: no suitable interface module[000000558fd54440] main libvlc error: interface "dbus,none" initialization failedAuthorization required, but no authorization protocol specified
Note that the videos are silent, so I'm not bothered about audio output.

I've searched 100 posts of people using vlc to stream music, launch baby cam streams and capture video, none of these are the same as my (fairly simple I would have thought) play a video on the local desktop, so none of the solutions I have looked at seem to have any effect on my setup.

Pretty sure I now have so many attempted fixes that the whole install is messed up, so I'll do a fresh re-install, but can anyone point me in the right direction?

Statistics: Posted by salawinder — Sat May 24, 2025 1:37 pm — Replies 5 — Views 83



Viewing all articles
Browse latest Browse all 7403

Trending Articles