WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Logitech Media Server  (Read 40136 times)

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Logitech Media Server
« on: March 22, 2014, 08:27:05 PM »
Available from the below repo,

http://debian.slimdevices.com stable main

importsce logitechmediaserver

Those who have the player please test, I made a startup script to where the server seems to run here but I lack the equipment to see that it works as expected.
« Last Edit: March 22, 2014, 08:48:11 PM by Jason W »

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: Logitech Media Server
« Reply #1 on: March 23, 2014, 02:49:24 PM »
Hi Very interesting - I have long wanted to combine the Logitech Media Server (LMS) with the tinycore linux. I think they would be a perfect match.

I would be even more interested in trying to run it on a Raspberry (ie the piCore) as this very energy efficient board would be very attractive as a 24/7 LMS server. Do you think that this would be possible as well?

Cheers
Steen

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Logitech Media Server
« Reply #2 on: March 23, 2014, 05:23:45 PM »
Actually, on looking at their main Debian package, all you need is perl and it will run on a variety of arch's, including arm. 

http://downloads.slimdevices.com/nightly/7.7/sc/b69eedd/logitechmediaserver_7.7.4~1395393887_all.deb

You then need to execute some commands:

mkdir pkg
ar -x logitechmediaserver_7.7.4~1395393887_all.deb
tar xvf data.tar.gz -C pkg

Then download the attached file, place it in the extension:

mkdir -p pkg/usr/local/tce.installed
cp logitechmediaserver pkg/usr/local/tce.installed/
sudo chmod -R 775 pkg/usr/local/tce.installed
sudo chown -R root:staff pkg/usr/local/tce.installed

For Pi:

cp logitechmediaserver-pi pkg/usr/local/tce.installed/logitechmediaserver
sudo chmod -R 775 pkg/usr/local/tce.installed
sudo chown -R root:staff pkg/usr/local/tce.installed

Then make the extension

mksquashfs pkg /etc/sysconfig/tcedir/sce/logitechmediaserver.sce -noappend

On piCore:

mksquashfs pkg /etc/sysconfig/tcedir/optional/logitechmediaserver.tcz -noappend

« Last Edit: March 23, 2014, 09:46:13 PM by Jason W »

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Logitech Media Server
« Reply #3 on: March 23, 2014, 06:25:39 PM »
Oops, this does not run as is on the Allwinner A10 version of armk, but the above instructions should work on supported platforms.

Offline LDS

  • Newbie
  • *
  • Posts: 11
Re: Logitech Media Server
« Reply #4 on: March 25, 2014, 07:24:41 PM »
Thanks Jason.
I wanted to to some homework before getting back to you and I appreciate you posted your answer to my question in the forum.

First i tried your instructions in your 1st post to the forum (the easy way) using importsce and loadsce. Running /etc/init.d/logitechmediaserver did not complete: /usr/sbin/squeezeboxserver_safe not found. The file is in the un archived tree (ar-x of the package, untar of data.tar.gz), but it is not loaded (probably not in the sce, ... notice the script expect to find under sbin as opposed to bin!!. I tested with the three branches (stable, testing and unstable that use version 7.7.7.3, 7.7.4, and 7.8.x respectively. Same result.

I then tried the 2nd post (manual) method and noticed that all the architectures were in the staging (under pkg) tree. Used your startup script which seems to be an extract of the Debian postinstall file. I must confess there were some tar (not more space on the device ) errors at the very end of the mksquashfs, even though I had more than enough (+100MB over estimated with option -s to importsce). I do not recall now why it did not work. i rebooted several times and finally gave up as I lost all my work (scripting a couple of hours got lost with some funny non backing up despite I used backup as root before rebooting.

Please let me know if you (a) see the files I don't and most important (b) if you see the server running (easy check ps, the logs or just pointing any browser at ipaddress:9000 of your system). You don't  need players to check if the server is running. Is there any place where I can read what should be done on Debian startup script to get things up on DCL?

Thanks again for your dedication! Impressive one man task... It would be nice to get this problem nailed down...
 :)

Ps. I always liked Debian's philosophy among distros, and also the magic of TCL, so a combination of the two in DCL is really something BIG :)
Btw DCL too close to DSL ;-)

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Logitech Media Server
« Reply #5 on: March 25, 2014, 08:24:17 PM »
LDS - Thanks for the info and I will check up on it.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Logitech Media Server
« Reply #6 on: March 25, 2014, 10:04:58 PM »
The existence of  /usr/sbin/squeezeboxserver_safe is found on my machine, and "sudo /etc/init.d/logitechmediaserver" starts the media server here, checked it with the 127.0.0.1:9000 on a browser which brought the email registration wizard.  I did just now add a check in the repo's startup script before adding the squeezeboxserver user, but that would not have an impact on what we are testing here.

When there are tar or mksquashfs errors when packing or unpacking archives due to lack of space or any other reason, there are many ways possible that it can affect the outcome.  For whatever reason there are out of space or unpacking/mksquashfs errors, I suspect that is the source of the problem.  I just tested this import on my box, and before importing df returned a 1730MB available on my disk, and the size option of imoportsce returned a 1729.53MB available.  The size data in the Debian repo's Packages file is where the estimated size comes from, so should be fairly accurate.  Here, the estimated size of the resulting SCE is overestimated by importsce by 24MB, 109MB is what the sce is when containing no deps, 133MB is what is estimated.  And I would rather have a slight overestimate than the opposite.  I used the "worst case scenario" in space calculation of the final sce to avoid errors.

Thanks for you interest and testing, let me know how it goes.  Yeah, I have always liked Debian too, I first used it when Sarge was going stable.
« Last Edit: March 25, 2014, 10:20:02 PM by Jason W »

Offline LDS

  • Newbie
  • *
  • Posts: 11
Re: Logitech Media Server
« Reply #7 on: March 26, 2014, 01:07:43 AM »
Thanks again Jason!
In my previous attempts I did both with and without dependencies, and according to the estimates I always had enough RAM and flash memory space on the system. Is there any tool to unload an installed sce to get back to a pristine base state? I am sure is not just unmounting the tcloop fs, as there are "traces" of the sce install that you probably cope with some ad-hoc script in DCL.

And just to clarify things: Should I use just importsce route (as in your very first post? or the ar + mksquashfs "manual" approach of your second post? I will start from  scratch  (base) when I get back from work and will have a look at your latest check in too.
Thanks for your following up :)


Sent from my ...who cares?

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Logitech Media Server
« Reply #8 on: March 26, 2014, 10:34:36 AM »
Hi LDS -  Unloading or unmounting an sce  would not be simple as there are possibly many startup scripts that have been run on loading an SCE for one thing, and also the files are symlinked into the live filesystem.  With the former SCM extension, unloading was simple as the main system was not touched, not so with the SCE.

importsce should just work for this package, I will test it again on my box.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Logitech Media Server
« Reply #9 on: March 26, 2014, 12:30:44 PM »
Re-imported, and it works fine here.

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: Logitech Media Server
« Reply #10 on: March 26, 2014, 04:31:55 PM »
Hi Jason.

I followed your very detailed "How-to" without any problems or errors - so I successfully build the logitechmediaserver.tcz on my raspberry pi using .

Next I loaded it with:
Code: [Select]
tce-load -i logitechmediaserver.tczIt went fine

Then I started the logitechmediaserver by:

Code: [Select]
tc@box:~$ sudo /etc/init.d/logitechmediaserver start
Making sure that Logitech Media Server is not running first: start-stop-daemon: warning: killing process 1982: No such process
Starting Logitech Media Server.
tc@box:~$

So it seems fine - however it is not running.
It is not found using "top"
Also if I try to connect to its webserver  it is not running (192.168.1.23:9000)

So I think we are very close - but there is probably a small problem somewhere. There is no log file in the var/log/squeezeboxserver, so there is no help here.

I only installed perl after I build the logitechmediaserver.tzc - will that be a problem?

Steen

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Logitech Media Server
« Reply #11 on: March 26, 2014, 05:06:19 PM »
As long as perl is there during the running of the app, it should be ok as there was no compiling.  There may be other dependencies needed other than perl, below is a list of debian ones from this site: http://www.pchilton.co.uk/2013/03/27/setup-a-squeezebox-server-using-a-raspberry-pi/

sudo apt-get install libjpeg8 libpng12-0 libgif4 libexif12 libswscale2 libavcodec53

Maybe some of those is what is missing. 

Since we are dealing with the Logitech Media Server and are probably very close to a solution, I am good with trying to help here but you may get better help at this stage if you bring this up in the Raspberry PI part of the forum where there are folks with that hardware and can help test. 
« Last Edit: March 26, 2014, 05:12:24 PM by Jason W »

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: Logitech Media Server
« Reply #12 on: March 26, 2014, 05:23:30 PM »
Thanks for your help - I think you are right that I/we are missing more dependencies.

Unfortunately only some of those are available as tzc packages for the raspberry - I tried to install those that I could find (only two) but logitechmediaserver will not still not start.

I will need some time to figure out how to make the missing packages for piCore - but anyway thank you for looking into this.

Steen

Edit - As you know, the apt-get install does not work in piCore

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Logitech Media Server
« Reply #13 on: March 26, 2014, 07:28:20 PM »
The PiCore packages for those debs for those who may not know are:

libjpeg-turbo.tcz
libpng.tcz
giflib.tcz
libexif.tcz
ffmpeg2.tcz

Some fo their related factored tcz's may be needed too.


Offline LDS

  • Newbie
  • *
  • Posts: 11
Re: Logitech Media Server
« Reply #14 on: March 26, 2014, 07:29:23 PM »
Thanks Jason.

I see I can the sce for LMS when running dCore on virtualbox (live dCore-5.14.03.09.iso) for a VM with same (512MB) RAM and flash storage (2 to 16 GB never used more than 1 GB!) for persistence storage (tce), so the problem i described can be isolated. Eventhough the sce is generated without squahfs erros, the LMS does not run in teh VM. (any way to see logs?I tried  using "loadsce -d" to no avail... (?) . I use a custom kernel bacause a buggy Bios requires a patched driver, but I cannot see how the changes on a pata drive can harm this server.

A few things that may interest you: the dCore version I am using on the little real box dCore.gz  5.14.03.22 is slightly newer than the iso from release (5.14.03.09) and it really shows your work :)
On the one hand the newest has much less errors during the import. I recall you mentioned in on of the recent posts these were inocuous. On the other hand with the newest dCore (22nd march) spits has some "cannot read .../opt/debextra/Packages"
Do you get these last type of errors?

Next thing I could try try is to copy over the sce's built on the VM onto the tce used for the real box (a thin client with CPU=AMD Geode GX 500 @366MHz, 512MB RAM) and let you know... unless you tell I should try something else :-)

Thanks again (and god night here) Jason!
 
LDS

ps. While rwriting this another (Rpi) user mentioned the logs too. So I am not alone... though you said you saw the web UI on 127.0.0.1:9000  (ummmh...). anyway. The errors I mentioned (cannot read ...'/Opt/debextras/Packages' ) might be related to dependencies. So if you do not get those, we might need to look somewhere else. Since LMS is not in an official debian repo it might help to look at  http://debian.slimdevices.com/dists/stable/main/binary-i386/Packages