ralph-irving / squeezelite

Lightweight headless squeezebox player for Lyrion Media Server
https://sourceforge.net/projects/lmsclients/files/squeezelite/
Other
391 stars 98 forks source link

No audio output when using squeezelite as service on Raspberry Pi #144

Closed beckflorian closed 3 years ago

beckflorian commented 3 years ago

Hello everyone...

I use Squeezelite on an Raspberry Pi with Raspian Buster. When I start squeezelite on the shell it works nicely.

When i start it as service i have no audio output.

What do i do the wrong way?

Start from shell:

pi@Test:~ $ squeezelite -f /home/pi/sl.log -d all=info

`squeezelite -f /home/pi/sl.log -d all=info [20:58:55.080589] stream_init:290 init stream [20:58:55.084295] output_init_alsa:817 init output [20:58:55.084503] output_init_alsa:846 requested alsa_buffer: 40 alsa_period: 4 format: any mmap: 1 [20:58:55.137920] output_init_common:410 supported rates: 384000 352800 192000 176400 96000 88200 48000 44100 32000 24000 22500 16000 12000 11025 8000 [20:58:55.138196] output_init_alsa:860 unable to lock memory: Cannot allocate memory [20:58:55. output_thread:638 open output device: default [20:58:55.145577] decode_init:129 init decode, include codecs: exclude codecs: [20:58:55.145789] alsa_open:355 opening device at: 44100 [20:58:55.145954] register_dsd:624 using dsd to decode dsf,dff [20:58:55.146083] register_ff:731 using ffmpeg to decode alc [20:58:55.146114] register_ff:715 using ffmpeg to decode wma,wmap,wmal [20:58:55.146143] register_faad:640 using faad to decode aac [20:58:55.146172] register_vorbis:329 using vorbis to decode ogg [20:58:55.146198] register_flac:286 using flac to decode flc [20:58:55.146225] register_pcm:384 using pcm to decode aif,pcm [20:58:55.146256] register_mad:412 using mad to decode mp3 [20:58:55.146519] discover_server:756 sending discovery [20:58:55.148548] discover_server:767 got response from: 192.168.178.28:3483 [20:58:55.151553] alsa_open:406 opened device default using format: S32_LE sample rate: 44100 mmap: 0 [20:58:55.151735] alsa_open:485 buffer: 40 period: 4 -> buffer size: 1764 period size: 441 [20:58:55.157522] slimproto:848 connecting to 192.168.178.28:3483 [20:58:55.158418] slimproto:881 connected [20:58:55.158569] sendHELO:124 mac: b8:27:eb:54:17:4d [20:58:55.158605] sendHELO:126 cap: Model=squeezelite,AccuratePlayPoints=1,HasDigitalOut=1,HasPolarityInversion=1,Firmware=v1.8,ModelName=SqueezeLite,MaxSampleRate=384000,dsf,dff,alc,wma,wmap,wmal,aac,ogg,flc,aif,pcm,mp3 [20:58:55.190150] decode_flush:190 decode flush [20:58:55.190309] output_flush:423 flush output buffer [20:58:55.191041] decode_flush:190 decode flush [20:58:55.191078] output_flush:423 flush output buffer [20:59:08.001937] decode_flush:190 decode flush [20:59:08.002211] output_flush:423 flush output buffer [20:59:08.445990] codec_open:218 codec open: 'm' [20:59:08.446375] stream_sock:384 connecting to 212.122.141.128:80 [20:59:08.468115] stream_sock:413 header: GET /swr/swr2/live/mp3/256/stream.mp3?ar-distributor=f0a1&_art=dj0yJmlwPTg5LjI0NS4zMy4xMSZpZD1pY3NjeGwtanlzZTMybGxiJnQ9MTYyMDg0NTk0OCZzPTc4NjZmMjljIzg2NjdiNDEyNTYwOWMxMzM3YTIzNmZiZGFlMGY0MWRi HTTP/1.0 Cache-Control: no-cache Connection: close Accept: / Host: swr-edge-2023-dus-lg-cdn.cast.addradio.de Range: bytes=0- User-Agent: iTunes/4.7.1 (Linux; N; Debian; armv8l-linux; DE; utf8) SqueezeCenter, Squeezebox Server, Logitech Media Server/8.1.1/1610364019 Icy-MetaData: 1

[20:59:08.555843] stream_thread:176 headers: len: 531 HTTP/1.0 200 OK Content-Type: audio/mpeg Date: Tue, 11 May 2021 18:59:08 GMT icy-description:Lust auf Kultur icy-genre:Culture icy-name:SWR2 icy-pub:1 icy-url:http://www.swr.de/swr2 Server: dg-swr-http_dus-lg_edge_d5c167f377b2059232a58220a8dd5ca5 Cache-Control: no-cache, no-store Access-Control-Allow-Origin: * Access-Control-Allow-Headers: Origin, Accept, X-Requested-With, Content-Type Access-Control-Allow-Methods: GET, OPTIONS, HEAD Connection: Close Expires: Mon, 26 Jul 1997 05:00:00 GMT icy-metaint:16000

[20:59:08.656590] stream_thread:229 icy meta: len: 32 StreamTitle='SWR2 Thema Musik'; [20:59:08.673896] mad_decode:242 setting track_start [20:59:08.680745] _output_frames:61 start buffer frames: 9839 [20:59:08.680918] _output_frames:146 track start sample rate: 48000 replay_gain: 0 [20:59:08.691071] output_thread:638 open output device: default [20:59:08.707330] alsa_open:355 opening device at: 48000 [20:59:08.719767] alsa_open:406 opened device default using format: S32_LE sample rate: 48000 mmap: 0 [20:59:08.720055] alsa_open:485 buffer: 40 period: 4 -> buffer size: 1920 period size: 480 [20:59:17.098079] slimproto_stop:919 slimproto stop [20:59:17.198692] decode_close:175 close decode [20:59:17.283372] stream_close:322 close stream [20:59:17.331871] output_close_alsa:890 close output `

Start as service:

sudo /etc/init.d/squeezelite start

`/usr/bin/squeezelite -f /home/pi/sl.log -d all=info -n Test [21:02:56.740727] stream_init:290 init stream [21:02:56.745244] output_init_alsa:817 init output [21:02:56.745619] output_init_alsa:846 requested alsa_buffer: 40 alsa_period: 4 format: any mmap: 1 [21:02:56.798263] output_init_common:410 supported rates: 384000 352800 192000 176400 96000 88200 48000 44100 32000 24000 22500 16000 12000 11025 8000 [21:02:56.949375] output_init_alsa:862 memory locked [21:02:56.950211] output_thread:638 open output device: default [21:02:56.950246] decode_init:129 init decode, include codecs: exclude codecs: [21:02:56.950666] alsa_open:355 opening device at: 44100 [21:02:56.950835] register_dsd:624 using dsd to decode dsf,dff [21:02:56.950918] register_ff:731 using ffmpeg to decode alc [21:02:56.950948] register_ff:715 using ffmpeg to decode wma,wmap,wmal [21:02:56.950976] register_faad:640 using faad to decode aac [21:02:56.951002] register_vorbis:329 using vorbis to decode ogg [21:02:56.951028] register_flac:286 using flac to decode flc [21:02:56.951054] register_pcm:384 using pcm to decode aif,pcm [21:02:56.951081] register_mad:412 using mad to decode mp3 [21:02:56.951881] discover_server:756 sending discovery [21:02:56.952913] discover_server:767 got response from: 192.168.178.28:3483 [21:02:56.953405] alsa_open:406 opened device default using format: S32_LE sample rate: 44100 mmap: 1 [21:02:56.953780] alsa_open:485 buffer: 40 period: 4 -> buffer size: 1776 period size: 444 [21:02:56.954450] slimproto:848 connecting to 192.168.178.28:3483 [21:02:56.955136] slimproto:881 connected [21:02:56.955185] sendHELO:124 mac: b8:27:eb:54:17:4d [21:02:56.955214] sendHELO:126 cap: Model=squeezelite,AccuratePlayPoints=1,HasDigitalOut=1,HasPolarityInversion=1,Firmware=v1.8,ModelName=SqueezeLite,MaxSampleRate=384000,dsf,dff,alc,wma,wmap,wmal,aac,ogg,flc,aif,pcm,mp3 [21:02:56.959503] decode_flush:190 decode flush [21:02:56.959535] output_flush:423 flush output buffer [21:02:56.960574] decode_flush:190 decode flush [21:02:56.960603] output_flush:423 flush output buffer [21:03:51.513945] decode_flush:190 decode flush [21:03:51.514223] output_flush:423 flush output buffer [21:03:51.952604] codec_open:218 codec open: 'm' [21:03:51.952973] stream_sock:384 connecting to 212.122.144.241:80 [21:03:51.969257] stream_sock:413 header: GET /swr/swr2/live/mp3/256/stream.mp3?ar-distributor=f0a1&_art=dj0yJmlwPTg5LjI0NS4zMy4xMSZpZD1pY3NjeGwtanlzZTMybGxiJnQ9MTYyMDg0NjIzMSZzPTc4NjZmMjljIzBmYzIzY2ZiMTI1NzQyYmY4OWI5Njk5ZTdiYzk1NzBk HTTP/1.0 Cache-Control: no-cache Connection: close Accept: / Host: swr-edge-30bd-fra-ts-cdn.cast.addradio.de Range: bytes=0- User-Agent: iTunes/4.7.1 (Linux; N; Debian; armv8l-linux; DE; utf8) SqueezeCenter, Squeezebox Server, Logitech Media Server/8.1.1/1610364019 Icy-MetaData: 1

[21:03:52.043973] stream_thread:176 headers: len: 531 HTTP/1.0 200 OK Content-Type: audio/mpeg Date: Tue, 11 May 2021 19:03:51 GMT icy-description:Lust auf Kultur icy-genre:Culture icy-name:SWR2 icy-pub:1 icy-url:http://www.swr.de/swr2 Server: dg-swr-http_fra-ts_edge_c2441b88516db8a80a0492072548d693 Cache-Control: no-cache, no-store Access-Control-Allow-Origin: * Access-Control-Allow-Headers: Origin, Accept, X-Requested-With, Content-Type Access-Control-Allow-Methods: GET, OPTIONS, HEAD Connection: Close Expires: Mon, 26 Jul 1997 05:00:00 GMT icy-metaint:16000

[21:03:52.145056] stream_thread:229 icy meta: len: 48 StreamTitle='Nachrichten, Wetter'; [21:03:52.216469] mad_decode:242 setting track_start [21:04:10.331172] slimproto_stop:919 slimproto stop [21:04:10.431512] decode_close:175 close decode [21:04:10.435094] stream_close:322 close stream [21:04:10.515746] output_close_alsa:890 close output `

Thank you very much...

ralph-irving commented 3 years ago

You are running a very old version of squeezelite v1.8. Please try my latest build https://sourceforge.net/projects/lmsclients/files/squeezelite/linux/