MiczFlor / RPi-Jukebox-RFID

A Raspberry Pi jukebox, playing local music, podcasts, web radio and streams triggered by RFID cards, web app or home automation. All plug and play via USB. GPIO scripts available.
http://phoniebox.de
MIT License
1.33k stars 395 forks source link

php5 -> php7 #19

Closed sigmaeo closed 6 years ago

sigmaeo commented 6 years ago

Great work! :-) With actual raspbian stretch this line from installation manual doesn't work anymore: sudo apt-get install php5-common php5-cgi php5

PHP5 isn't available anymore as installation package.

It should be substituted simply with: sudo apt-get install php-common php-cgi php

This installs PHP7 and everything works as it should.

hailogugo commented 6 years ago

Can you use the playbutton for each dictornery on the Webinterface?

The play button in the webinterface at the folders do not work. Have anybody a solution for me?

sigmaeo commented 6 years ago

The same here. I can't use them. Never tried it before.

sigmaeo commented 6 years ago

I looked into it. Maybe it's only a typo. In this button there is in htdocs/index.php written /usr/bin/cvlc instead of /usr/bin/vlc: I will try it tomorrow - if this will fix this issue.

$exec = "/usr/bin/sudo /usr/bin/cvlc -I rc --rc-host localhost:4212 ".$urlparams['play']." > /dev/null 2>/dev/null &";

MiczFlor commented 6 years ago

cvlc is the original command line interface for vlc. Not sure if the c is still needed today. I am planning to add the --no-video option to the script, just to be sure this will only play sound. https://wiki.videolan.org/Video_Output/

sigmaeo commented 6 years ago

Yes, you are right of course. I changed the 2>/dev/null part of the cvlc play command to a logfile and got the following output:

[01355ef0] pulse audio output error: PulseAudio server connection failure: Connection refused
[0136eb40] core interface error: no suitable interface module
[012bd0f0] core libvlc error: interface "globalhotkeys,none" initialization failed
[0136eb40] dbus interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[0136eb40] core interface error: no suitable interface module
[012bd0f0] core libvlc error: interface "dbus,none" initialization failed
libdvdnav: Using dvdnav version 5.0.3
[0136eb40] [cli] lua interface: Listening on host "localhost:4212".
libdvdread: Encrypted DVD support unavailable.
************************************************
**                                            **
**  No css library available. See             **
**  /usr/share/doc/libdvdread4/README.css     **
**  for more information.                     **
**                                            **
************************************************
libdvdread: Couldn't find device name.
libdvdread:DVDOpenFilePath:findDVDFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFilePath:findDVDFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[0136eb40] [cli] lua interface error: Error loading script /usr/lib/arm-linux-gnueabihf/vlc/lua/intf/cli.luac: lua/intf/modules/host.lua:279: Interrupted.
sigmaeo commented 6 years ago

I don't understand where the "piping the playlist to vlc" takes place?

The following command started manually as user pi works (without --no-video and with):

/usr/bin/sudo /usr/bin/cvlc  -I rc --rc-host localhost:4212 file:///home/pi/RPi-Jukebox-RFID/playlists/mycd.m3u

Here I don't get the messages with DVD things. The lua interface message comes when I stop the audio with Ctrl-C. I got this:

pi@rpi2ccu:~/RPi-Jukebox-RFID/htdocs $ /usr/bin/sudo /usr/bin/cvlc  -I rc --rc-host localhost:4212 file:///home/pi/RPi-Jukebox-RFID/playlists/mycd.m3u
VLC media player 2.2.6 Umbrella (revision 2.2.6-0-g1aae78981c)
[00206f10] pulse audio output error: PulseAudio server connection failure: Connection refused
[00217018] core interface error: no suitable interface module
[00159918] core libvlc error: interface "globalhotkeys,none" initialization failed
[00217080] dbus interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[00217080] core interface error: no suitable interface module
[00159918] core libvlc error: interface "dbus,none" initialization failed
[00217058] [cli] lua interface: Listening on host "localhost:4212".
[001ffcc8] core playlist: stopping playback
^C[00217058] [cli] lua interface error: Error loading script /usr/lib/arm-linux-gnueabihf/vlc/lua/intf/cli.luac: lua/intf/modules/host.lua:279: Interrupted.
hailogugo commented 6 years ago

It will be same command, if we use a RFID card. I am not a programmer but my thinking is: kill cvlc play folder which is mark

sigmaeo commented 6 years ago

Sorry, I made yesterday a mistake in testing your suggestion with the "--no-video" option. I checked it again today and now everything works (with this additional option and not without)! :-) It seems that this option is needed. I made a fork, add it and changed the thing with the php-installation and do a pull request with this.