PeteManchester / MediaPlayer

61 stars 20 forks source link

Version 0016b2 issues #106

Closed andrum993 closed 3 months ago

andrum993 commented 3 months ago

Firstly, thank you for providing this software - it's really the best music player out there for Pi, at least for my use.

This is just a quick note to say that Java 17 support is not quite there yet. My mediaplayer.log is attached. mediaplayer.log

Let me know if you need any more information. I've downgraded to Java 11 in the meantime, but I have a spare Pi I can try this on as well.

andrum993 commented 3 months ago

Sorry scrub that - it's not working on Java 11 either. My bad.

PeteManchester commented 3 months ago

Hi,

Thanks!!

From your logs it looks like you are using a different OS than Bob is..

In Java 17 they removed the ability to dynamically set the path environment variable, so now I have to set that path in the start up scripts. However because you are using a different OS the path needs to be slightly different.

From your log file the path to the Openhome libraries should be:

2024-03-19 19:38:33,417 [main] DEBUG [org.rpi.os.OSManager] OS is Linux, and arch is AARCH64. Version is: 6.6.20+rpt-rpi-2712 2024-03-19 19:38:33,417 [main] WARN [org.rpi.os.OSManager] Using full_path /home/andrew/mediaplayer/mediaplayer_lib/ohNet/linux/aarch64

At the moment the run.sh and run_systemmd.sh are set to the path 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SCRIPTPATH/mediaplayer_lib/ohNet/linux/ armv6hf'

So you need to edit run.sh and run_systemmd.sh to be:

'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SCRIPTPATH/mediaplayer_lib/ohNet/ linux/ aarch64 '

Let me know how that goes,

Pete.

On Tue, 19 Mar 2024 at 19:44, andrum993 @.***> wrote:

Firstly, thank you for providing this software - it's really the best music player out there for Pi, at least for my use.

This is just a quick note to say that Java 17 support is not quite there yet. My mediaplayer.log is attached. mediaplayer.log https://github.com/PeteManchester/MediaPlayer/files/14655530/mediaplayer.log

Let me know if you need any more information. I've downgraded to Java 11 in the meantime, but I have a spare Pi I can try this on as well.

— Reply to this email directly, view it on GitHub https://github.com/PeteManchester/MediaPlayer/issues/106, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5RVJYLDCWQKB4TEZ3UYS3YZCIRBAVCNFSM6AAAAABE6GYHLWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE4TKOBUG43TGOI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

andrum993 commented 3 months ago

Thanks I will give that a try. I installed an older build on that machine, but will give the new version a spin on my spare and let you know how I get on.

andrum993 commented 3 months ago

OK, I've reopened this and renamed it to better reflect what's happening.

After editing those two files as you suggested, I can get version 0016b2 running, but mpd fails as follows:

andrew@pi4b:/var/log/mpd $ systemctl status mpd
● mpd.service - Music Player Daemon
     Loaded: loaded (/lib/systemd/system/mpd.service; disabled; preset: enabled)
     Active: active (running) since Wed 2024-03-20 20:00:25 UTC; 1min 47s ago
       Docs: man:mpd(1)
             man:mpd.conf(5)
             file:///usr/share/doc/mpd/html/user.html
   Main PID: 3113 (mpd)
      Tasks: 6 (limit: 8731)
        CPU: 956ms
     CGroup: /system.slice/mpd.service
             └─3113 /usr/bin/mpd --systemd

Mar 20 20:00:25 pi4b systemd[1]: Starting mpd.service - Music Player Daemon...
Mar 20 20:00:25 pi4b systemd[1]: Started mpd.service - Music Player Daemon.
Mar 20 20:01:17 pi4b mpd[3113]: client: [0] malformed command "                 0"
Mar 20 20:01:22 pi4b mpd[3113]: exception: Failed to open "My ALSA Device" (alsa); Error opening ALSA device "hw:0,0"; Failed to configure format f: Invalid argument
Mar 20 20:01:22 pi4b mpd[3113]: exception: Failed to open "My ALSA Device" (alsa); Error opening ALSA device "hw:0,0"; Failed to configure format f: Invalid argument
Mar 20 20:01:22 pi4b mpd[3113]: player: problems opening audio device while playing "http://192.168.1.3:9790/minimserver/*/Music/My*20CDs/Bryan*20Adams/So*20Far*20So*20Good/10*20(Everythin
andrum993 commented 3 months ago

Just realised that the shell script to start MediaPlayer can build the path dynamically itself, so the user doesn't have to. I would have added this to the repo, but the version of run.sh I'm seeing there has different contents to the one in 0016b2, so I'll let you add it yourself:

#!/bin/sh

# Absolute path to this script, e.g. /home/pi/mediaplayer/run.sh
SCRIPT=$(readlink -f "$0")
# Absolute path this script is in, thus /home/pi/mediaplayer
SCRIPTPATH=$(dirname "$SCRIPT")

TURNOFF_WLAN=true

DIRNAME="$( dirname "$0" )"
cd "${DIRNAME}"
# Generate lib path dynamically, since Java can't do this itself now :(
arch=`uname -m`
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SCRIPTPATH/mediaplayer_lib/ohNet/linux/$arch
echo Java LibPath: $LD_LIBRARY_PATH
java -jar $SCRIPTPATH/mediaplayer.jar &
_wlanexist=$(ifconfig | grep wlan) || true
if [ "$_wlanexist" ] && [ "$TURNOFF_WLAN" ]; then
       iwconfig wlan0 power off
fi
exit 0

Obviously that's only going to do something useful on Linux - needs a way to detect whether we're running on Windows or Linux (assuming you're supporting Windows - the ohNet libs for it are there).

Similarly for run_systemd.sh.

PeteManchester commented 3 months ago

Hi,

Thanks for the script update. I've added it to the latest version.

For the errors you are seeing in MPD, do you think that is an Mediaplayer issue or an MPD issue?

What happens if you install MPC and then use MPC to play add and play a track? (https://www.mankier.com/1/mpc)

Thanks again,

Pete.

On Wed, 20 Mar 2024 at 20:05, andrum993 @.***> wrote:

OK, I've reopened this and renamed it to better reflect what's happening.

I can get version 0016b2 running, but mpd fails as follows:

@.***:/var/log/mpd $ systemctl status mpd ● mpd.service - Music Player Daemon Loaded: loaded (/lib/systemd/system/mpd.service; disabled; preset: enabled) Active: active (running) since Wed 2024-03-20 20:00:25 UTC; 1min 47s ago Docs: man:mpd(1) man:mpd.conf(5) file:///usr/share/doc/mpd/html/user.html Main PID: 3113 (mpd) Tasks: 6 (limit: 8731) CPU: 956ms CGroup: /system.slice/mpd.service └─3113 /usr/bin/mpd --systemd

Mar 20 20:00:25 pi4b systemd[1]: Starting mpd.service - Music Player Daemon... Mar 20 20:00:25 pi4b systemd[1]: Started mpd.service - Music Player Daemon. Mar 20 20:01:17 pi4b mpd[3113]: client: [0] malformed command " 0" Mar 20 20:01:22 pi4b mpd[3113]: exception: Failed to open "My ALSA Device" (alsa); Error opening ALSA device "hw:0,0"; Failed to configure format f: Invalid argument Mar 20 20:01:22 pi4b mpd[3113]: exception: Failed to open "My ALSA Device" (alsa); Error opening ALSA device "hw:0,0"; Failed to configure format f: Invalid argument Mar 20 20:01:22 pi4b mpd[3113]: player: problems opening audio device while playing "http://192.168.1.3:9790/minimserver/*/Music/My*20CDs/Bryan*20Adams/So*20Far*20So*20Good/10*20(Everythin

— Reply to this email directly, view it on GitHub https://github.com/PeteManchester/MediaPlayer/issues/106#issuecomment-2010526649, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5RVJ3JRAWIH7O5Y2HKYETYZHTYDAVCNFSM6AAAAABE6GYHLWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJQGUZDMNRUHE . You are receiving this because you commented.Message ID: @.***>

andrum993 commented 3 months ago

Apologies once again - mpd was unhappy trying to output to the new KMS/DRM vc4 HDMI audio device, presumably because it only accepts IEC958. I've got 0017 working now on Java 17. Thanks 😄