duracell80 / DLNA-Radio

Using Rygel to stream radio URL's over DLNA / UPnP
GNU General Public License v3.0
10 stars 2 forks source link

Errors during install #3

Open XrayFab opened 3 months ago

XrayFab commented 3 months ago

Hi, I'm new to Linux. I get several errors during install, see below. How can I solve this? Thanks.

Package pulseaudio-dlna is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

E: Package 'pulseaudio-dlna' has no installation candidate Reading package lists... Done Building dependency tree... Done Reading state information... Done Package rygel-2.6-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: rygel-2.8-dev:armhf rygel-2.8-dev

E: Unable to locate package python3.10-venv E: Couldn't find any package by glob 'python3.10-venv' E: Package 'rygel-2.6-dev' has no installation candidate touch: cannot touch '/home/pi/.config/rygel.conf': No such file or directory cp: cannot create regular file '/usr/share/rygel/icons/120x120/': No such file or directory cp: cannot create regular file '/usr/share/rygel/icons/120x120/': No such file or directory cp: cannot create regular file '/usr/share/rygel/icons/48x48': No such file or directory cp: cannot create regular file '/usr/share/rygel/icons/48x48': No such file or directory

duracell80 commented 3 months ago

Hi, welcome!

Which Linux distribution and desktop environment are you using, the package might not be available in that distro.

XrayFab commented 3 months ago

Hi, thanks. It is running without desktop UI on a Raspberry pi, see below.

pi@homebridge:/var/lib/homebridge $ uname -srm Linux 6.1.0-rpi7-rpi-v8 aarch64 pi@homebridge:/var/lib/homebridge $ lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 12 (bookworm) Release: 12 Codename: bookworm

duracell80 commented 2 months ago

Gotcha, looks like I need to update the dependencies for the newer version of Raspbian. Will see what's what and drag this up to Deb12.

Full output

Hit:2 http://deb.debian.org/debian-security bookworm-security InRelease
Hit:3 http://deb.debian.org/debian bookworm-updates InRelease
Hit:4 http://archive.raspberrypi.com/debian bookworm InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'gstreamer1.0-qt5' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-qt6' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-wpe' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-plugins-ugly' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-packagekit' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-gtk3-dbgsym' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-gl' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-plugins-good-dbgsym' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-fluendo-mp3' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-clutter-3.0' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-autogain-pulseeffects' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-qapt' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-python-dbg-plugin-loader' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-plugins-bad-videoparsers' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-adapter-pulseeffects' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-videosource' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-tools' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-espeak' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-plugins-really-bad' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-omx-generic' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-lame' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-plugins-base-apps' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-omx-generic-config' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-alsa' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-pipewire-dbgsym' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-audiosource' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-qt5-dbgsym' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-audiosink' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-visualization' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-x' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-gtk3' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-pocketsphinx' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-rtsp' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-libcamera' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-plugins-good' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-plugins-bad-faad' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-plugins-base' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-crystalhd' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-pipewire' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-python3-plugin-loader' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-vaapi-doc' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-videosink' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-plugins-base-doc' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-omx-bellagio-config' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-convolver-pulseeffects' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-python3-dbg-plugin-loader' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-plugins-ugly-amr' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-plugins-bad-apps' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-opencv' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-vaapi' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-qt6-dbgsym' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-nice' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-libcamera-dbgsym' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-crystalizer-pulseeffects' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-plugins-bad' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-pulseaudio' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-python-plugin-loader' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-libav' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-plugins-rtp' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-doc' for glob 'gstreamer1.0-*'
Note, selecting 'gstreamer1.0-plugins-bad' instead of 'gstreamer1.0-plugins-bad-faad'
Note, selecting 'gstreamer1.0-plugins-bad' instead of 'gstreamer1.0-plugins-bad-videoparsers'
Note, selecting 'gstreamer1.0-plugins-ugly' instead of 'gstreamer1.0-plugins-ugly-amr'
Package pulseaudio-dlna is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'pulseaudio-dlna' has no installation candidate
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package rygel-2.6-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  rygel-2.8-dev:armhf rygel-2.8-dev

E: Unable to locate package python3.10-venv
E: Couldn't find any package by glob 'python3.10-venv'
E: Package 'rygel-2.6-dev' has no installation candidate
cp: cannot create regular file '/usr/share/rygel/icons/120x120/': No such file or directory
cp: cannot create regular file '/usr/share/rygel/icons/120x120/': No such file or directory
cp: cannot create regular file '/usr/share/rygel/icons/48x48': No such file or directory
cp: cannot create regular file '/usr/share/rygel/icons/48x48': No such file or directory
Created symlink /etc/systemd/system/multi-user.target.wants/dlna.service → /lib/systemd/system/dlna.service.
duracell80 commented 2 months ago

Resolved with upgrading dependency versions.

Run a git fetch and git pull to get the updated install scripts, choose Debian 12 when installing on latest Raspberry Pi OS.

XrayFab commented 2 months ago

Thanks a lot for your work and fix. Installation seems to run fine, however, at some point I get the following error:

Setting up rygel-2.8-dev (0.42.1-1) ... Processing triggers for rygel (0.42.1-1) ... touch: cannot touch '/home/pi/.config/rygel.conf': No such file or directory

The DLNA service shows then a "FileNotFoundError" on the same file and exits, see below. In the /home/pi directory is no ".config" directory.

Fab

Every 2.0s: systemctl status dlna.service homebridge: Sun Jul 14 08:41:02 2024

× dlna.service - DLNARadio: App for serving Internet Radio over DLNA with Rygel Loaded: loaded (/lib/systemd/system/dlna.service; enabled; preset: enabled) Active: failed (Result: exit-code) since Sun 2024-07-14 08:39:05 CEST; 1min 56s ago Duration: 142ms Process: 107472 ExecStartPre=/bin/bash -c source /home/pi/python-apps/dlnaradio/bin/activate dlnaradio (code=exited, status=0/SUCCESS) Process: 107473 ExecStart=/home/pi/python-apps/dlnaradio/bin/python3 /home/pi/python-apps/dlnaradio/app/main.py (code=exited, status=1/FAILURE) Main PID: 107473 (code=exited, status=1/FAILURE) CPU: 146ms

Jul 14 08:39:05 homebridge python3[107473]: station2-mime=audio/mpeg Jul 14 08:39:05 homebridge python3[107473]: station2-dlnaprofile=audio/mpeg Jul 14 08:39:05 homebridge python3[107473]: station2-launch=souphttpsrc iradio-mode=true is-live=true automatic-redirect=true location=https://0n-70s.radionetz.de/0n-70s.mp3 Jul 14 08:39:05 homebridge python3[107473]: Traceback (most recent call last): Jul 14 08:39:05 homebridge python3[107473]: File "/home/pi/python-apps/dlnaradio/app/main.py", line 94, in Jul 14 08:39:05 homebridge python3[107473]: with open(s_rygel_file, "w") as s_file: Jul 14 08:39:05 homebridge python3[107473]: ^^^^^^^^^^^^^^^^^^^^^^^ Jul 14 08:39:05 homebridge python3[107473]: FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/.config/rygel.conf' Jul 14 08:39:05 homebridge systemd[1]: dlna.service: Main process exited, code=exited, status=1/FAILURE Jul 14 08:39:05 homebridge systemd[1]: dlna.service: Failed with result 'exit-code'.

duracell80 commented 2 months ago

Hmmm try this

mkdir -p ~/.config sudo systemctrl restart dlna.service systemctrl status dlna.service

That should help the python script write the configuration to the directory. Will update the install to add the configuration directory creation, maybe they removed it from Raspberry Pi OS, or I had it existing from something else. Thanks for spotting.

XrayFab commented 2 months ago

Thanks a lot for your answer, we are progressing a lot! After doing what you wrote, it seems that the DLNA service is now starting properly. I can see the DLNA server from VLC on my Mac :-). However, I can't see the DLNA server from other UPNP clients on my network (internet radios having a "Browse UPNP servers" option). Below is the dump of the service status. I see some warnings but nothing scary I think. Maybe you have some ideas why.

Fab

● dlna.service - DLNARadio: App for serving Internet Radio over DLNA with Rygel Loaded: loaded (/lib/systemd/system/dlna.service; enabled; preset: enabled) Active: active (running) since Mon 2024-07-15 20:00:01 CEST; 9s ago Process: 161145 ExecStartPre=/bin/bash -c source /home/pi/python-apps/dlnaradio/bin/activate dlnaradio (code=exited, status=0/SUCCESS) Main PID: 161146 (python3) Tasks: 9 (limit: 1585) CPU: 3.894s CGroup: /system.slice/dlna.service ├─161146 /home/pi/python-apps/dlnaradio/bin/python3 /home/pi/python-apps/dlnaradio/app/main.py ├─161155 sh -c rygel └─161156 rygel

Jul 15 20:00:01 homebridge systemd[1]: Started dlna.service - DLNARadio: App for serving Internet Radio over DLNA with Rygel. Jul 15 20:00:01 homebridge rygel[161156]: Rygel v0.42.1 starting… Jul 15 20:00:04 homebridge python3[161159]: sys:1: Warning: cannot register existing type 'GstRtpSrc' Jul 15 20:00:04 homebridge python3[161159]: sys:1: Warning: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed Jul 15 20:00:04 homebridge python3[161159]: sys:1: Warning: g_once_init_leave: assertion 'result != 0' failed Jul 15 20:00:04 homebridge gst-plugin-scan[161159]: gst_element_register: assertion 'g_type_is_a (type, GST_TYPE_ELEMENT)' failed Jul 15 20:00:04 homebridge python3[161159]: sys:1: Warning: cannot register existing type 'GstRtpSink' Jul 15 20:00:04 homebridge gst-plugin-scan[161159]: gst_element_register: assertion 'g_type_is_a (type, GST_TYPE_ELEMENT)' failed Jul 15 20:00:09 homebridge rygel[161156]: New plug-in “GstLaunch” available Jul 15 20:00:09 homebridge rygel[161156]: New plug-in “Playbin” available pi@homebridge:/home $

duracell80 commented 2 months ago

Hmm, yeah warnings are normally nothing to stop a system running totally.

Gstreamer's documentation is almost too detailed, it would seem to be relating to RTSP. https://gstreamer.freedesktop.org/documentation/rtsp/rtspsrc.html?gi-language=python

I got BubbleUPnP up on my Android, and for select metadata from the top right ellipsis menu; it produces 4 streams with different codecs, PCM, AAC and MP3 all over HTTP. I wonder if some of your devices are expecting an RTSP or UDP stream instead of HTTP.

Run a "sudo apt list gstreamer1.0-rtsp" to see if you have that package

gstreamer1.0-rtsp/stable,now 1.22.0-2 arm64 [installed]

It should also be using ffmpeg to do the transcoding, from the good bad or ugly plugins 'sudo apt list gstreamer1.0-plugins-*'

XrayFab commented 2 months ago

Thanks for your answer. The first sudo command gives me the following:

pi@homebridge:~ $ sudo apt list gstreamer1.0-rtsp Listing... Done gstreamer1.0-rtsp/stable,now 1.22.0-2 arm64 [installed] gstreamer1.0-rtsp/stable 1.22.0-2 armhf

And the second one gives me that:

pi@homebridge:~ $ sudo apt list gstreamer1.0-plugins-* Listing... Done gstreamer1.0-plugins-bad-apps/stable,stable-security,now 1.22.0-4+deb12u5 arm64 [installed] gstreamer1.0-plugins-bad-apps/stable,stable-security 1.22.0-4+deb12u5 armhf gstreamer1.0-plugins-bad/stable,stable-security,now 1.22.0-4+deb12u5 arm64 [installed] gstreamer1.0-plugins-bad/stable,stable-security 1.22.0-4+deb12u5 armhf gstreamer1.0-plugins-base-apps/stable,stable-security,now 1.22.0-3+deb12u2 arm64 [installed] gstreamer1.0-plugins-base-apps/stable,stable-security 1.22.0-3+deb12u2 armhf gstreamer1.0-plugins-base/stable,stable-security,now 1.22.0-3+deb12u2 arm64 [installed] gstreamer1.0-plugins-base/stable,stable-security 1.22.0-3+deb12u2 armhf gstreamer1.0-plugins-good-dbgsym/stable,now 1.22.0-5+rpt1+deb12u1 arm64 [installed] gstreamer1.0-plugins-good-dbgsym/stable 1.22.0-5+rpt1+deb12u1 armhf gstreamer1.0-plugins-good/stable,now 1.22.0-5+rpt1+deb12u1 arm64 [installed] gstreamer1.0-plugins-good/stable 1.22.0-5+rpt1+deb12u1 armhf gstreamer1.0-plugins-rtp/stable,now 1.14.4.1 arm64 [installed] gstreamer1.0-plugins-rtp/stable 1.14.4.1 armhf gstreamer1.0-plugins-ugly/stable,stable-security,now 1.22.0-2+deb12u1 arm64 [installed] gstreamer1.0-plugins-ugly/stable,stable-security 1.22.0-2+deb12u1 armhf

duracell80 commented 2 months ago

That all seems good. I found a stack overflow where the trouble was being caused by multiple paths of the same libraries and gstreamer couldn't figure out which was which. If I was to guess as to what it's failing at, is that it seems to be trying to load something and can't or has already loaded it once and trying to again.

Try this to see if there is one result returned. find / -type f -name "libgstrtp.so" 2> >(grep -v 'Permission denied' >&2) | grep -i "libgstrtp.so"

These may also show something but not entirely sure what to look for in terms of missing things gst-inspect-1.0 -a | grep -i "rtsp" gst-inspect-1.0 rtspsrc

In general too as a good step to reoubleshoot anything package related in Debian Linux at least a package may have got skipped, stuck or failed to extract correctly so you can try this too: sudo apt install gstreamer1.0-rtsp gstreamer1.0-plugins-good rygel-gst-launch gupnp-dlna

If you need to look at the rygel configuration too: cat ~/.config/rygel.conf

For devices not seeing the server, there might be some ports in your router you might need to open. To rule that in or out, try other DLNA servers, perhaps on your Mac or phone.

XrayFab commented 2 months ago

Thanks for your answer and thoughts and sorry for the delayed comment, I was travelling during 2 weeks.

I tried the command: pi@homebridge:/var/lib/homebridge $ sudo apt install gstreamer1.0-rtsp gstreamer1.0-plugins-good rygel-gst-launch gupnp-dlna

and it gave me the following:

Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package gupnp-dlna

Thanks a lot for all your proposals and ideas, I'll give it a try. Fab

XrayFab commented 1 month ago

BTW, which port numbers should usually be used and open in the router?