Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Squeezeboxserver does not play #123

Closed
FlorianSW opened this issue Dec 11, 2016 · 3 comments
Closed

Squeezeboxserver does not play #123

FlorianSW opened this issue Dec 11, 2016 · 3 comments

Comments

@FlorianSW
Copy link

Hi all together!

I've a problem getting an mp3 file streamed trough squeeboxserver/LMS/Slimserver. For a short background: Playing a playlist from a web radio works pretty fine, also playing an mp3 file from the server where LMS is running works fine, too. What I now try to achieve is, to play a file which is delivered by a local webserver (the file is generated by php -> pico2wave -> lame -> mp3 file) using php. However, this is not working.

What I would expect:
If I enter the URL in the "direct URL" input box of the LMS web interface and click play, the LMS starts playing the file (at least the progress bar indicates this).

What I currently have as a result:
I don't have any audio in the LMS player (it's a squeezelite service on the same server). Just to be clear: Playing other media files or streams works fine and I've audio. The LMS web interface indicates, that the file is played and has the title, which is set in the icy-name header.

The log output when the LMS server is started with the arguments --debug player.streaming.direct=debug player.streaming.remote=debug

Async::HTTP: Unable to load IO::Socket::SSL, will try connecting to SSL servers in non-SSL mode
[16-12-11 18:14:54.7842] main::init (384) Starting Logitech Media Server (v7.9.0, 1481125532, Fri Dec  9 04:19:54 UTC 2016) perl 5.022001 - x86_64-linux-gnu-thread-multi
[16-12-11 18:14:54.7864] main::changeEffectiveUserAndGroup (1001) Warning: Logitech Media Server must not be run as root!  Trying user squeezeboxserver instead.
[16-12-11 18:15:05.6842] Slim::Player::Squeezebox::stream_s (787) This player supports direct streaming for http://smarty/tts/service.php?lng=de-DE&msg=Hallo as http://smarty/tts/service.php?lng=de-DE&msg=Hallo, let's do it.
[16-12-11 18:15:05.6846] Slim::Player::Squeezebox::stream_s (807) Made synchronous DNS request for smarty (0.00 ms)
[16-12-11 18:15:05.6851] Slim::Player::Squeezebox::stream_s (828) setting up direct stream (2130706689:80) autostart: 3 format: m.
[16-12-11 18:15:05.6853] Slim::Player::Squeezebox::stream_s (829) request string: GET /tts/service.php?lng=de-DE&msg=Hallo HTTP/1.0
Cache-Control: no-cache
Connection: close
Accept: */*
Host: smarty
User-Agent: iTunes/4.7.1 (Linux; N; Debian; x86_64-linux; DE; utf8) SqueezeCenter, Squeezebox Server, Logitech Media Server/7.9.0/1481125532
Icy-Metadata: 1

[16-12-11 18:15:05.7953] Slim::Player::Squeezebox2::directHeaders (471) Processing headers for direct streaming:
HTTP/1.1 200 OK
Server: nginx/1.10.0 (Ubuntu)
Date: Sun, 11 Dec 2016 17:15:05 GMT
Content-Type: audio/mpeg
Content-Length: 4392
Connection: close
Content-Transfer-Encoding: binary
Content-Disposition: filename="tts.mp3"
Cache-Control: no-cache
icy-br: 48
icy-name: TTS Announcement

[16-12-11 18:15:05.7956] Slim::Player::Squeezebox2::directHeaders (545) Processing 10 headers
[16-12-11 18:15:05.7958] Slim::Player::Squeezebox2::directHeaders (551) Calling Slim::Player::Protocols::HTTP ::parseDirectHeaders
[16-12-11 18:15:05.7960] Slim::Player::Protocols::HTTP::parseDirectHeaders (348) header-ds: Server: nginx/1.10.0 (Ubuntu)
[16-12-11 18:15:05.7962] Slim::Player::Protocols::HTTP::parseDirectHeaders (348) header-ds: Date: Sun, 11 Dec 2016 17:15:05 GMT
[16-12-11 18:15:05.7963] Slim::Player::Protocols::HTTP::parseDirectHeaders (348) header-ds: Content-Type: audio/mpeg
[16-12-11 18:15:05.7964] Slim::Player::Protocols::HTTP::parseDirectHeaders (348) header-ds: Content-Length: 4392
[16-12-11 18:15:05.7965] Slim::Player::Protocols::HTTP::parseDirectHeaders (348) header-ds: Connection: close
[16-12-11 18:15:05.7966] Slim::Player::Protocols::HTTP::parseDirectHeaders (348) header-ds: Content-Transfer-Encoding: binary
[16-12-11 18:15:05.7967] Slim::Player::Protocols::HTTP::parseDirectHeaders (348) header-ds: Content-Disposition: filename="tts.mp3"
[16-12-11 18:15:05.7969] Slim::Player::Protocols::HTTP::parseDirectHeaders (348) header-ds: Cache-Control: no-cache
[16-12-11 18:15:05.7970] Slim::Player::Protocols::HTTP::parseDirectHeaders (348) header-ds: icy-br: 48
[16-12-11 18:15:05.7971] Slim::Player::Protocols::HTTP::parseDirectHeaders (348) header-ds: icy-name: TTS Announcement
[16-12-11 18:15:05.7974] Slim::Player::Squeezebox2::directHeaders (570) Setting new title for http://smarty/tts/service.php?lng=de-DE&msg=Hallo, TTS Announcement
[16-12-11 18:15:05.7983] Slim::Player::Squeezebox2::directHeaders (613) Got a stream type: mp3 bitrate: 48000 title: TTS Announcement
[16-12-11 18:15:05.7985] Slim::Player::Squeezebox2::directHeaders (664) Beginning direct stream!
[16-12-11 18:15:05.7986] Slim::Player::Squeezebox2::sendContCommand (700) Sending cont frame: metaint 0, loop 0

How the mp3 output is generated:
I followed a wiki page from openhab to create a php script (PHP 7 using nginx 1.10). The script generates an wav file and converts it to mp3. I can play the generated mp3 file from LMS (if I move it to the music bibliothek of the LMS server and can play it in my web browser (or if I save it locally)). The script works pretty fine and I also can play the file directly on my pc (if I open the url of the script: http://smarty/tts/service.php?lng=de-DE&msg=Hallo).

So, now I don't have any idea why the mp3 file isn't working with LMS. Does anyone has an idea?

If you need more information, feel free to ask.

Version of LMS:
Logitech Media Server Version: 7.9.0 - 1481125532 @ Fri Dec 9 04:19:54 UTC 2016

Thanks for any help!

@michaelherger
Copy link
Member

I think you should post to forums.slimdevices.com to a Squeezelite related thread. Or start a new one. Would you have a different player you could test this with? Eg. a real Squeezebox, or SqueezePlay?

@FlorianSW
Copy link
Author

Thanks for your help! However, I tried to play the sound using SqueezePlay. This worked fine, so I tested it with squeezelite for windows and it's also working fine. So, now I created the following forum thread and hope for help:
http://forums.slimdevices.com/showthread.php?106623-squeezelite-and-local-tts-working-on-windows-but-not-on-Ubuntu

@mherger
Copy link
Contributor

mherger commented Dec 13, 2016

Good. Let's follow up there. I think the bitrate might be a good indicator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants