PDA

View Full Version : Streaming question



cjhabs
2010-02-14, 13:09
Hi
Couldn't find the answer to this - hopefully someone can shed some light.
I have Squeezebox Server Version: 7.4.1 - r28947 running under Ubuntu Karmic.
I have a Squeezebox 3 connected to my audio system.
I have a Ubuntu Karmic laptop.

I wish to play a CD in my laptop through the audio system, so I figure the only way I could do that it to have it streamed through the Squeezebox server to the Squeezebox 3.

I know I can rip the cd and load it into the SS d/b but I don't want to rip these cds.

Is this possible - if so how?

Thanks !!!

chris

aubuti
2010-02-14, 13:58
Check out the CD Player plugin (http://forums.slimdevices.com/showthread.php?t=47288). I've never used it myself because my SB server is hidden away, but it appears to be just what you're looking for. You can install it via SBS's Extension Downloader if you have enabled 3rd Party Plugins.

bpa
2010-02-14, 14:41
It's not clear whether you have one or two Ubuntu systems.

The CDplayer plugin will only work if Squeezebox Server is running on the laptop with the CD drive.

cjhabs
2010-02-14, 15:20
It's not clear whether you have one or two Ubuntu systems.

The CDplayer plugin will only work if Squeezebox Server is running on the laptop with the CD drive.

I have 2 machines with Ubuntu - the SS server and my laptop.
The cd is on the laptop. I want to stream from the cd on the client through the SS server to my Squeezebox 3.
SS is _not_ running on the laptop.

cjhabs
2010-02-14, 15:23
Check out the CD Player plugin (http://forums.slimdevices.com/showthread.php?t=47288). I've never used it myself because my SB server is hidden away, but it appears to be just what you're looking for. You can install it via SBS's Extension Downloader if you have enabled 3rd Party Plugins.

Maybe I can mount the cd onto the server and then use the cdplayer plugin - I'll look into that and I'll post that if I can get it to work.

Thanks

bpa
2010-02-14, 15:33
The CD drive must be on the same system as Squeezebox server as the app which plays the CD must go to CD driver level.

The alternative would be using VLC to play the CD on VLC and stream the output to a http stream - you will get no control over the CD except via VLC and between changes you may have to restart the http stream on your SB player.

aubuti
2010-02-14, 15:36
I have 2 machines with Ubuntu - the SS server and my laptop.
Sorry, that wasn't apparent to me from your original post.

cjhabs
2010-02-14, 19:39
The CD drive must be on the same system as Squeezebox server as the app which plays the CD must go to CD driver level.

The alternative would be using VLC to play the CD on VLC and stream the output to a http stream - you will get no control over the CD except via VLC and between changes you may have to restart the http stream on your SB player.

I couldn't work out how to share the audio cd over nfs anyway.
Could you provide a little more detail on what I need to do on the Slimserver side to configure this VLC solution please?

Thanks - much appreciated!

Chris

cjhabs
2010-02-14, 21:34
I couldn't work out how to share the audio cd over nfs anyway.
Could you provide a little more detail on what I need to do on the Slimserver side to configure this VLC solution please?

Thanks - much appreciated!

Chris

Update - not much progress - on the Squeezebox server I selected Internet Radio -> tune in url and selected http://localhost:1234
On VLC on the client laptop I popped in the cd, ran vlc, selected "media -> streaming".
Input is audio disk /dev/sr0 - cdda:///dev/sr0
Destination is http, address of media server, port 1234
Transcoding Audio - MP3
Hit stream - nothing seems to happen.

cjhabs
2010-02-14, 21:49
Update - not much progress - on the Squeezebox server I selected Internet Radio -> tune in url and selected http://localhost:1234
On VLC on the client laptop I popped in the cd, ran vlc, selected "media -> streaming".
Input is audio disk /dev/sr0 - cdda:///dev/sr0
Destination is http, address of media server, port 1234
Transcoding Audio - MP3
Hit stream - nothing seems to happen.

Another update - I changed the stream output of VLC to be the local laptop ip address and VLC started streaming it (after I loaded the appropriate codec to convert to mp3) but still nothing on the SS when I point to http://ip_of_laptop:1234

bpa
2010-02-15, 02:04
I presume you have tested the stream using VLC, mplayer or some other player on the server system (i.e. not the laptop) - this makes sure there is nothing like a firewall problem. Don't forget to test using the same user id as SBS uses as this can affect permissions.

Assuming the stream works on another player on the server system, the most likely problem is that SBS doesn't know the audio format of the stream either because
* there is no MIME type with the headers
* the MIME type is not a supported one (see types.conf)
* with no MIME - there is no extension onthe stream name to indicate (e.g. stream.mp3) audio format.


I suggest adding a name at the end of the stream from VLC and in SBS so the URL becomes something like
http://ip_of_laptop:1234/cdstream.mp3

cjhabs
2010-02-15, 07:41
I presume you have tested the stream using VLC, mplayer or some other player on the server system (i.e. not the laptop) - this makes sure there is nothing like a firewall problem. Don't forget to test using the same user id as SBS uses as this can affect permissions.

Assuming the stream works on another player on the server system, the most likely problem is that SBS doesn't know the audio format of the stream either because
* there is no MIME type with the headers
* the MIME type is not a supported one (see types.conf)
* with no MIME - there is no extension onthe stream name to indicate (e.g. stream.mp3) audio format.


I suggest adding a name at the end of the stream from VLC and in SBS so the URL becomes something like
http://ip_of_laptop:1234/cdstream.mp3

I know there are no firewall issues (heard that before :-) but I will try running everything on the server.

Thanks for the other suggestion - I may not get a chance to try this until later - I will report back with the results.

bpa
2010-02-15, 08:27
I know there are no firewall issues (heard that before :-) but I will try running everything on the server.


I would use a different port than 1234 a big number like 10000 because on the server there may a services handler already configured for security as 1234 used to be a Infoseek search agent port.

Do not run everything on the server (SBS can be stopped). Just try a player such as vlc or mplayer (if no audio card redirect output to as file) to see if the server can receive the audio stream. The userid (and using su is not the right way as you must have run the login shell scripts) is important as sometimes systems are configured preventing some users from accessing some ports= etc.

cjhabs
2010-02-15, 16:14
I would use a different port than 1234 a big number like 10000 because on the server there may a services handler already configured for security as 1234 used to be a Infoseek search agent port.

Do not run everything on the server (SBS can be stopped). Just try a player such as vlc or mplayer (if no audio card redirect output to as file) to see if the server can receive the audio stream. The userid (and using su is not the right way as you must have run the login shell scripts) is important as sometimes systems are configured preventing some users from accessing some ports= etc.

You are _the_ man! Thanks - it is now working exactly how I want it. The only issue I am experiencing is that the stream will stop in the middle of a song and won't come back until I restart the vlc session and restart the stream on the SB server. This could be because my laptop is running wireless and can't feed the server - I will test it wired also.

Also sometimes I have trouble restarting the stream - I think it is ok so long as I select the "Tune in URL" again on the left hand side of the web interface, rather than trying to restart from the right hand pane.

By the way, is there a way to save the URL so I don't have to key it into the "Tune to URL" field each time?

Here is a summary for anyone else who maybe looking to do the same, taking into account your suggestions:
Goal:
Play a CD in my laptop, stream it through Squeezebox Server to play on my SB3.

My laptop and SB server are both running Ubuntu Karmic

On laptop, play the CD using VLC.
Configure VLC to use:
Input = Audio disk
Select "stream" option rather than play.
Configure stream to be:
http, ip address = ip_local_laptop, port = 10001 (this can be any port, use a high port number to make sure there are no firewall issues)
Note - this didn't work when I tried to stream to the SB server - only when I streamed to the local laptop.
Set the transcoding options to mp3 (you can select flac also, but I have not tried that)
Then under options, where it shows the command to be used for the stream, edit the dst option from:
ip_addr:port to ip_addr:port/cdstream.mp3
On the same screen, select "Keep output stream open" or else it stops after each song.

On the Squeezebox server,
Internet radio -> Tune in URL -> http:ip_address:port/cdstream.mp3

You can control the music from VLC on the laptop.

I ran vlc from the command line as follows:

vlc -vvv cdda:///dev/sr0 --sout '#transcode{acodec=mp3,ab=128,channels=2,samplerat e=44100}:std{access=http,mux=raw,dst=192.168.1.14: 10001/cdstream.mp3}' --sout-keep

bpa
2010-02-15, 17:20
By the way, is there a way to save the URL so I don't have to key it into the "Tune to URL" field each time?


Create a Favorite with the URL.

If you wish to experiment to improve quality - I think SBS can play a Flac stream but I think it must be streamed in a OGG container.

Also - I think one user created a plugin to control VLC remotely (i.e. it mapped keys on the remote to VLC functions which are sent as commands on a separate TCP connection).

cjhabs
2010-02-16, 09:47
Create a Favorite with the URL.

If you wish to experiment to improve quality - I think SBS can play a Flac stream but I think it must be streamed in a OGG container.

Also - I think one user created a plugin to control VLC remotely (i.e. it mapped keys on the remote to VLC functions which are sent as commands on a separate TCP connection).

By keeping the stream open, it responds to skipping forward and back in VLC, so that is good.

My biggest issue is getting the stream started consistently - sometimes it just won't start until I faff around with it - retsarting VLC and the URL - I haven't worked out why or found a process that works 100% of the time.

I suspect that flac will be less consistent for me as I am guessing that my drop outs are due to the laptop being wireless - so flac will stress the connection more than mp3.

If I could get the stream to start up consistently - this seems to mostly break when I change the cd - then I'll be a happy man (it doesn't take much!)