Please note the new address for this forum : forum.excito.org. The old address redirects here but I don't know for how long. Thanks !
New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !
Using Squeezecenter with my iPod
Using Squeezecenter with my iPod
I'm one of those guys with an iPod and a nice collection of music encoded in m4a files, which I've put on my Bubba Two. After installing Streamserver, I could browse my albums and playlists in the browser (on http://bubba:9000). Cool.
But I couldn't actually play the files. That was not so good.
My preferred way of playing them is start iTunes on my mediacenter, and under Advanced, add http://bubba/stream.mp3 as a media stream. The Squeezecenter recognizes it as a player, and can stream to it.
My podcasts aren't a problem, they come as mp3 files and don't have to be converted to mp3. I can listen to them fine.
Fortunately, SqueezeCenter is very good at converting audio file formats. To do this, it uses external programs. In /etc/squeezecenter/server.conf, the recipes for format conversion are listed. m4a files are of type "mov" (listed in types.conf), and to translate mov files into mp3 files for any player, Squeezecenter runs (or is supposed to run) a program called mov123 (aka Quicktime) and one called lame.
Neither mov123 nor lame are found on the search path. Running apt-get install mov123 or apt-get install lame doesn't get them installed (E: Couldn't find package).
When I ask Squeezecenter to stream one of my .m4a files, and look at what happens in the logs with the command "tail -f /var/log/squeezecenter/server.log | sed /Warning/d'", I see that Squeezecenter tries and then gives up with the error message:
[08-12-29 19:05:00.3050] Slim::Player::Source::openSong (2089) Error: Couldn't create command line for mov playback for [file:///home/storage/music/iTunes/iTunes%20Music/Dave%20Douglas/A%20Thousand%20Evenings/01%20A%20Thousand%20Evenings.m4a]
So my questions are: how do I find mov123 and lame to install? And once I have them, will Squeezecenter be able to create the command line?
But I couldn't actually play the files. That was not so good.
My preferred way of playing them is start iTunes on my mediacenter, and under Advanced, add http://bubba/stream.mp3 as a media stream. The Squeezecenter recognizes it as a player, and can stream to it.
My podcasts aren't a problem, they come as mp3 files and don't have to be converted to mp3. I can listen to them fine.
Fortunately, SqueezeCenter is very good at converting audio file formats. To do this, it uses external programs. In /etc/squeezecenter/server.conf, the recipes for format conversion are listed. m4a files are of type "mov" (listed in types.conf), and to translate mov files into mp3 files for any player, Squeezecenter runs (or is supposed to run) a program called mov123 (aka Quicktime) and one called lame.
Neither mov123 nor lame are found on the search path. Running apt-get install mov123 or apt-get install lame doesn't get them installed (E: Couldn't find package).
When I ask Squeezecenter to stream one of my .m4a files, and look at what happens in the logs with the command "tail -f /var/log/squeezecenter/server.log | sed /Warning/d'", I see that Squeezecenter tries and then gives up with the error message:
[08-12-29 19:05:00.3050] Slim::Player::Source::openSong (2089) Error: Couldn't create command line for mov playback for [file:///home/storage/music/iTunes/iTunes%20Music/Dave%20Douglas/A%20Thousand%20Evenings/01%20A%20Thousand%20Evenings.m4a]
So my questions are: how do I find mov123 and lame to install? And once I have them, will Squeezecenter be able to create the command line?
Why not use the web interface?
Rather than poking around in configuration files and logfiles, one could try the web interface. Just open http://bubba:9000 and choose Home, Settings, SqueezeCenter Settings, File Types. File type mov is not listed, but "Apple Lossless" is. The menus that could be used to make settings are all greyed out.
I guess my next question is: can these menus be used to make the settings required to convert m4a to mp3?
I guess my next question is: can these menus be used to make the settings required to convert m4a to mp3?
The packages that I have defined as dependices for squeezecenter is
If I've missed some package/converter, please tell me, and I'll try to fix that problem.
/Carl
Code: Select all
perl (>= 5.6.0-16), dbconfig-common, ttf-dejavu | ttf-bitstream-vera, ttf-freefont, mysql-server-5.0, flac, sox, adduser, wavpack, musepack-tools, libcache-cache-perl (>= 1.04), libcgi-pm-perl (>= 3.40), libclass-accessor-perl (>= 0.31), libclass-data-accessor-perl (>= 0.03), libclass-data-inheritable-perl (>= 0.04), libclass-inspector-perl (>= 1.16), libcompress-zlib-perl (>= 1.41), libdata-dump-perl, libdata-uriencode-perl (>= 0.11), libdbd-mysql-perl (>= 3.0002), libdbi-perl (>= 1.604), libdbix-class-perl (>= 0.07001), libencode-detect-perl, libfile-bom-perl (>= 0.13), libfile-next-perl (>= 1.02), libfile-slurp-perl, libfile-temp-perl (>= 0.17), libfile-which-perl (>= 0.05), libgd-gd2-perl (>= 2.35), libhtml-parser-perl (>= 3.48), libio-string-perl (>= 1.07), libjson-xs-perl (>= 1.5), libjson-xs-versiononeandtwo-perl (>= 0.31), liblog-log4perl-perl (>= 1.07), libmath-vecstat-perl (>= 0.08), libnet-dns-perl (>= 0.58), libnet-ip-perl (>= 1.24), libnet-upnp-perl (>= 1.2.1), libpar-perl (>= 0.970), libpoe-perl (>= 0.35), libpath-class-perl (>= 0.13), libproc-background-perl (>= 1.08), libsql-abstract-perl (>= 1.20), libtemplate-perl (>= 2.15), libtext-unidecode-perl (>= 0.04), libtimedate-perl (>= 1.1600), libtie-cache-lru-perl (>= 0.21), libtie-cache-lru-expires-perl, libtie-llhash-perl (>= 1.003), libtie-regexphash-perl (>= 0.13), liburi-perl (>= 1.35), liburi-find-perl (>= 0.16), libwww-perl (>= 5.805), libxml-parser-perl (>= 2.34), libxml-simple-perl (>= 2.15), libyaml-syck-perl (>= 0.64), libclass-xsaccessor-array-perl (>= 0.05), libpoe-xs-queue-array-perl (>= 0.005)
/Carl
Installing faad and lame
faad can easily be installed by running
apt-get install faad
apt-get install lame liblame0
Doesn't work yet, though:
Reading package lists... Done
Building dependency tree... Done
Package lame 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 lame has no installation candidate
I could install lame by downloading the sources and compiling them. Worked fine.
apt-get install faad
apt-get install lame liblame0
Doesn't work yet, though:
Reading package lists... Done
Building dependency tree... Done
Package lame 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 lame has no installation candidate
I could install lame by downloading the sources and compiling them. Worked fine.
Last edited by roelof on 04 Jan 2009, 11:49, edited 2 times in total.
Thank you Carl, great to know that you're looking over my shoulder. I'll figure this out for you.carl wrote:The packages that I have defined as dependices for squeezecenter is ...
If I've missed some package/converter, please tell me, and I'll try to fix that proble
Carl
I'm going to lay this to rest, after I've figured out the dependencies.
Last edited by roelof on 30 Dec 2008, 10:50, edited 1 time in total.
Which programs are used by SqueezeCenter?
I read through the convert.conf and slimservice-convert.conf files and came up with a list of all non-squeezecenter binaries squeezecenter uses "out of the box":
[alac]
[faad]
[flac]
[lame]
[mac]
[mov123]
[mplayer-stdout]
[mppdec]
[sox]
[wmad]
[wmadec]
[wvunpack]
Now this list is to be used with some care. Squeezecenter is platform independent, but these executables aren't necessarily. mov123 is QuickTime (->Apple), and mplayer is Windows Media Player. Binaries for Ubuntu *may* be available, but more lightweight alternatives have been developed for Linux (especially, faad and lame).
One approach that seems useful to me is to develop a Bubba-specific slimservice-convert.conf file. This file is left untouched when the Slimserver is upgraded. A Bubba-specific slimservice-convert.conf file would be able to produce all output formats that the current conf files can produce, and do this with the best converters that are available for Linux (you may be able to do everything with faad and lame). This optimal converter set would then give you the dependencies that you need to take into account.
Squeezecenter uses the slimservice-convert.conf file to enable users to make changes that are not overwritten on an upgrade. I don't know how to use this file for Bubba-specific purposes and still leave users in control.
Is this useful to you?
Cheers, Roelof
[alac]
[faad]
[flac]
[lame]
[mac]
[mov123]
[mplayer-stdout]
[mppdec]
[sox]
[wmad]
[wmadec]
[wvunpack]
Now this list is to be used with some care. Squeezecenter is platform independent, but these executables aren't necessarily. mov123 is QuickTime (->Apple), and mplayer is Windows Media Player. Binaries for Ubuntu *may* be available, but more lightweight alternatives have been developed for Linux (especially, faad and lame).
One approach that seems useful to me is to develop a Bubba-specific slimservice-convert.conf file. This file is left untouched when the Slimserver is upgraded. A Bubba-specific slimservice-convert.conf file would be able to produce all output formats that the current conf files can produce, and do this with the best converters that are available for Linux (you may be able to do everything with faad and lame). This optimal converter set would then give you the dependencies that you need to take into account.
Squeezecenter uses the slimservice-convert.conf file to enable users to make changes that are not overwritten on an upgrade. I don't know how to use this file for Bubba-specific purposes and still leave users in control.
Is this useful to you?
Cheers, Roelof
Lame and faad now work, still no progress
I've got lame and faad working. Yet, Squeezecenter doesn't serve up the .m4a files -- so THAT was not the problem.
Playing .m4a still doesn't work, though. In the server logs, I still find:
[08-12-30 16:54:36.3361] Slim::Player::TranscodingHelper::getConvertCommand (311) Error: Didn't find any command matches for type: mov format: mp3
and the error mentioned earlier.
Although this is specified in the .conf-files, Squeezecenter doesn't process the information in such a way that it knows how to convert mov to mp3.
Playing .m4a still doesn't work, though. In the server logs, I still find:
[08-12-30 16:54:36.3361] Slim::Player::TranscodingHelper::getConvertCommand (311) Error: Didn't find any command matches for type: mov format: mp3
and the error mentioned earlier.
Although this is specified in the .conf-files, Squeezecenter doesn't process the information in such a way that it knows how to convert mov to mp3.
File type configuration in Server Settings on web interface
Under File Format Conversion Setup, pairs of file formats are listed and you can select a method to convert one to the other. The information used to build this interface is read from the two *.conf files in /etc/squeezecenter. The conversion I am looking for, is from "AAC or Movie File" to MP3. By setting in the server.conf file:
mov mp3 * *
[faad] -o - $FILE$ | [lame] -
a menu option becomes available to select faad/lame as method to convert from mov (AAC or Movie File) to MP3. Comment these lines out, restart the server and the menu is greyed out.
After restarting the server and reconnecting to http://bubba:9000/stream.mp3 with my player (Rhythmbox, in this case), I heard a faraway trumpet playing. It was Dave Douglas, playing A Thousand Evenings.
I'm not sure the music has ever sounded so wonderful in my ears.
So my solution was:
* Install faad and lame
* Put above lines in the conf file
* Restart server and player
mov mp3 * *
[faad] -o - $FILE$ | [lame] -
a menu option becomes available to select faad/lame as method to convert from mov (AAC or Movie File) to MP3. Comment these lines out, restart the server and the menu is greyed out.
After restarting the server and reconnecting to http://bubba:9000/stream.mp3 with my player (Rhythmbox, in this case), I heard a faraway trumpet playing. It was Dave Douglas, playing A Thousand Evenings.
I'm not sure the music has ever sounded so wonderful in my ears.
So my solution was:
* Install faad and lame
* Put above lines in the conf file
* Restart server and player
Gaps in playback of iTunes files
Turned out Dave Douglas HAS sounded better -- playback of the original .m4a file on the Bubba using Squeezecenter is slow, happens with many gaps (unexpected silences) in between and Bubba Two itself looked like it was working too hard for its own good.
What was so bad? I ran the command Squeezecenter is running to decode the original .m4a file and reencode it as mp3:
time faad -o - 1.m4a | lame - >1a.mp3
It turns out Bubba Two uses more than 9 minutes to produce the mp3 file, a rough two minutes longer than the six minute song itself:
real 9m18.453s
user 9m0.416s
sys 0m3.696s
faad sends to standard output:
Decoding 1.m4a took: 43.92 sec. 9.30x real-time.
lame sends to standard output:
LAME 3.98.2 32bits (http://www.mp3dev.org/)
Using polyphase lowpass filter, transition band: 16538 Hz - 17071 Hz
Encoding <stdin> to <stdout>
Encoding as 44.1 kHz j-stereo MPEG-1 Layer III (11x) 128 kbps qval=3
Timing a run of lame on its own:
time cat 1.full | lame - >1.mp3
real 7m13.562s
user 6m51.044s
sys 0m4.112s
Timing a run of faad on its own:
time faad -o - 1.m4a >1.full
real 0m45.597s
user 0m40.856s
sys 0m3.936s
Running top, I can see the amount of CPU these commands take (especially when run separately). faad takes 10% or so, lame seems to take all it can get: 97% max.
What if we run lame with different arguments? I consulted with http://jthz.com/mp3/ to find some good commandline arguments to use lame with:
time lame 1.full 1c.mp3 -V5 -vbr-new -q0 -b96 --lowpass 15.4
LAME 3.98.2 32bits (http://www.mp3dev.org/)
Using polyphase lowpass filter, transition band: 15115 Hz - 15648 Hz
Encoding 1.full to 1c.mp3
Encoding as 44.1 kHz j-stereo MPEG-1 Layer III VBR(q=5)
Frame | CPU time/estim | REAL time/estim | play/CPU | ETA
13500/15658 (86%)| 4:25/ 5:08| 4:33/ 5:16| 1.3275x| 0:43
15658/15658 (100%)| 5:05/ 5:05| 5:13/ 5:13| 1.3377x| 0:00
32 [ 163] **
96 [ 2479] %***************************
112 [ 5955] %%%%***************************************************************
128 [ 5505] %%%%%%%%%%****************************************************
160 [ 1415] %%%%%%**********
192 [ 109] %*
224 [ 32] *
256 [ 0]
320 [ 0]
-------------------------------------------------------------------------------
kbps LR MS % long switch short % ^ 119.4 11.0 89.0 94.4 2.8 2.8
Writing LAME Tag...done
ReplayGain: +0.1dB
real 5m13.763s
user 5m4.068s
sys 0m1.812s
So that's a bit better. What if we compress even more?
time lame 1.full 1d.mp3 -V7 -vbr-new -q0 -b112 --lowpass 15.4
real 5m12.451s
user 4m57.332s
sys 0m1.884s
Doesn't make much of a difference.
CPU load is very high again (max was 97.8%)
Bottom line: using lame to encode mp3 files for Squeezecenter puts extreme load on Bubba Two and is not fast enough to keep the mp3 stream going.
I'll stop here, am curious what others experience.
What was so bad? I ran the command Squeezecenter is running to decode the original .m4a file and reencode it as mp3:
time faad -o - 1.m4a | lame - >1a.mp3
It turns out Bubba Two uses more than 9 minutes to produce the mp3 file, a rough two minutes longer than the six minute song itself:
real 9m18.453s
user 9m0.416s
sys 0m3.696s
faad sends to standard output:
Decoding 1.m4a took: 43.92 sec. 9.30x real-time.
lame sends to standard output:
LAME 3.98.2 32bits (http://www.mp3dev.org/)
Using polyphase lowpass filter, transition band: 16538 Hz - 17071 Hz
Encoding <stdin> to <stdout>
Encoding as 44.1 kHz j-stereo MPEG-1 Layer III (11x) 128 kbps qval=3
Timing a run of lame on its own:
time cat 1.full | lame - >1.mp3
real 7m13.562s
user 6m51.044s
sys 0m4.112s
Timing a run of faad on its own:
time faad -o - 1.m4a >1.full
real 0m45.597s
user 0m40.856s
sys 0m3.936s
Running top, I can see the amount of CPU these commands take (especially when run separately). faad takes 10% or so, lame seems to take all it can get: 97% max.
What if we run lame with different arguments? I consulted with http://jthz.com/mp3/ to find some good commandline arguments to use lame with:
time lame 1.full 1c.mp3 -V5 -vbr-new -q0 -b96 --lowpass 15.4
LAME 3.98.2 32bits (http://www.mp3dev.org/)
Using polyphase lowpass filter, transition band: 15115 Hz - 15648 Hz
Encoding 1.full to 1c.mp3
Encoding as 44.1 kHz j-stereo MPEG-1 Layer III VBR(q=5)
Frame | CPU time/estim | REAL time/estim | play/CPU | ETA
13500/15658 (86%)| 4:25/ 5:08| 4:33/ 5:16| 1.3275x| 0:43
15658/15658 (100%)| 5:05/ 5:05| 5:13/ 5:13| 1.3377x| 0:00
32 [ 163] **
96 [ 2479] %***************************
112 [ 5955] %%%%***************************************************************
128 [ 5505] %%%%%%%%%%****************************************************
160 [ 1415] %%%%%%**********
192 [ 109] %*
224 [ 32] *
256 [ 0]
320 [ 0]
-------------------------------------------------------------------------------
kbps LR MS % long switch short % ^ 119.4 11.0 89.0 94.4 2.8 2.8
Writing LAME Tag...done
ReplayGain: +0.1dB
real 5m13.763s
user 5m4.068s
sys 0m1.812s
So that's a bit better. What if we compress even more?
time lame 1.full 1d.mp3 -V7 -vbr-new -q0 -b112 --lowpass 15.4
real 5m12.451s
user 4m57.332s
sys 0m1.884s
Doesn't make much of a difference.
CPU load is very high again (max was 97.8%)
Bottom line: using lame to encode mp3 files for Squeezecenter puts extreme load on Bubba Two and is not fast enough to keep the mp3 stream going.
I'll stop here, am curious what others experience.
Bubba Two configuration and performance
My Bubba Two runs 1.0.13.
Download performance:
Kastanje:~# wget http://download.excito.net/web/BubbaSer ... Manual.pdf
--18:12:40-- http://download.excito.net/web/BubbaSer ... Manual.pdf
=> `Bubba_Users_Manual.pdf'
Resolving download.excito.net... 213.180.89.191
Connecting to download.excito.net|213.180.89.191|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2,864,309 (2.7M) [application/pdf]
100%[====================================>] 2,864,309 891.14K/s ETA 00:00
18:12:43 (889.25 KB/s) - `Bubba_Users_Manual.pdf' saved [2864309/2864309]
hdparm:
Kastanje:~# hdparm -t /dev/sda1
/dev/sda1:
Timing buffered disk reads: 76 MB in 3.10 seconds = 24.51 MB/sec
Download performance:
Kastanje:~# wget http://download.excito.net/web/BubbaSer ... Manual.pdf
--18:12:40-- http://download.excito.net/web/BubbaSer ... Manual.pdf
=> `Bubba_Users_Manual.pdf'
Resolving download.excito.net... 213.180.89.191
Connecting to download.excito.net|213.180.89.191|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2,864,309 (2.7M) [application/pdf]
100%[====================================>] 2,864,309 891.14K/s ETA 00:00
18:12:43 (889.25 KB/s) - `Bubba_Users_Manual.pdf' saved [2864309/2864309]
hdparm:
Kastanje:~# hdparm -t /dev/sda1
/dev/sda1:
Timing buffered disk reads: 76 MB in 3.10 seconds = 24.51 MB/sec
Gaps in music playback
I'm now concentrating on getting mt-daapd and Squeezecenter to stream mp3 files without gaps.
I notice that iTunes on a Windows computer on my network stops playing its Squeezecenter stream after a few files. At that moment, on the Bubba Two, nmbd has stopped running. nmbd is one of the two daemons started when Samba is started. The exact same behavior is displayed when iTunes approaches the Bubba Two as a daap server. Play two or three numbers, then hang -- and on the Bubba Two, the nmbd daemon has disappeared.
On my laptop running Ubuntu I have playback with some gaps on Rhythmbox, but it keeps playing for a remarkable amount of time -- and is obviously not bothered by the fact that nmbd is not running on the Bubba Two.
I notice that iTunes on a Windows computer on my network stops playing its Squeezecenter stream after a few files. At that moment, on the Bubba Two, nmbd has stopped running. nmbd is one of the two daemons started when Samba is started. The exact same behavior is displayed when iTunes approaches the Bubba Two as a daap server. Play two or three numbers, then hang -- and on the Bubba Two, the nmbd daemon has disappeared.
On my laptop running Ubuntu I have playback with some gaps on Rhythmbox, but it keeps playing for a remarkable amount of time -- and is obviously not bothered by the fact that nmbd is not running on the Bubba Two.
I had an discussion with the squeezecenter devs, and they told me we can't distribute an AAC decoder ithout an license, due to the technology is patented. Anyway I don't think you should use so much juice on the mp3 conversion. I would choose the simplest conversion possible, as it's mostly temporary.
If you want to pre-transcode the files, I would recommend converting them to flac, as it will not introduce any more degeneration of the music.
/Carl
If you want to pre-transcode the files, I would recommend converting them to flac, as it will not introduce any more degeneration of the music.
/Carl