Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Member
    Join Date
    Jan 2007
    Posts
    40

    understanding LAME

    Hi,
    I have had a squeezebox for a while, but I am clearly not taking advantage of all of its features. I am hoping for some pointers on how to do things a bit better.
    Currently, I have Slimserver running on an Olive Musica (HiFidelio). This is a Linux box that rips and stores my CDs, mostly in FLAC format. At the same time, I have an MP3 library stored in iTunes on a separate PC running WinXP SP2.

    Over time, I have neglected the iTunes library, since I do most of my listening on the Musica, or on the linked Squeezebox. However, there is also music in the iTunes library in MP3 that I do not have on the Musica. In short, there are files on each server that are not represented on the other.

    Ideally, I would like to have both libraries served up in a format that can be recognized by either iTunes or Squeezebox. I gather that LAME should permit me to transcode the FLAC files on the fly, turning them into MP3s that iTunes can recognize (even if they can't be loaded onto an iPod). However, when I look at the LAME settings, there seems to be a choice of either FLAC->FLAC or FLAC->MP3.

    This leaves me with a couple of questions:
    1. Is it possible to set up LAME so that FLAC files are presented as MP3 only for iTunes (while serving FLAC as FLAC to the Slimserver?)

    2. Is there software that will run on either the Linux box that will copy/transcode my FLAC library into the iTunes library? If it can keep these two libraries in sync, that would be even better.

    Thanks!
    Dan

  2. #2
    Senior Member
    Join Date
    Oct 2005
    Posts
    7,099
    The LAME transcoding in SlimServer is done in real-time, i.e. while streaming. The files always remain as FLAC - iTunes will never see them.

    In order for iTunes to see them, you need to convert the files and store MP3 copies. LAME can do this but only one at a time. Look for batch tools like flac2mp3, which also syncs.
    Current: SB2, Transporter, Boom (PQP3 - late beta, PQP1 - early beta), SBC (early beta), Squeezebox Radio (PB1 - early beta), Squeezebox Touch (late beta)
    Sold: SB3, Duet

  3. #3
    Member
    Join Date
    Jan 2007
    Posts
    40
    Thanks.
    From what I gather-by streaming you mean a music stream that is controled by the Slimserver software and which can be played by logging into the appropriate port of the Slimserver?
    My understanding is that there is no way to directly access the FLAC files from iTunes but have them played as MP3?

    Finally, does LAME only control streamed music? Will my Squeezebox still access the FLAC files, or will they be transcoded as well?
    Thanks,
    Dan

  4. #4
    Member
    Join Date
    Jan 2007
    Posts
    40
    Also, as a side issue, when I activate the FLAC->MP3 conversion under "File Types", I get the following error:

    Required binary was not found: [flac] -dcs --skip=$START$ --until=$END$ -- $FILE$ | [lame] --resample 44100 --silent -q $QUALITY$ --abr $BITRATE$ - -

    Am I missing something?
    Thanks.

  5. #5
    Senior Member
    Join Date
    Oct 2005
    Posts
    7,099
    Quote Originally Posted by Dpfels View Post
    Thanks.
    From what I gather-by streaming you mean a music stream that is controled by the Slimserver software and which can be played by logging into the appropriate port of the Slimserver?
    Yes.

    My understanding is that there is no way to directly access the FLAC files from iTunes but have them played as MP3?
    Not sure what you mean here. iTunes cannot access FLAC files. The FLAC files can be played as MP3 with SlimServer, but only while you are playing them. It's a real-time process, no MP3 file is created that iTunes will be able to see. SlimServer uses LAME to construct an MP3 stream on-the-fly as opposed to actually creating a file.

    Finally, does LAME only control streamed music?
    Again, not quite sure what you mean. LAME is an MP3 encoder. It takes WAV files and makes MP3 files out of them. It can do this by constructing files (which is what you want) or it can do this real-time, on-the-fly, making a stream (this is what SlimServer does, this is NOT what you want).

    Will my Squeezebox still access the FLAC files, or will they be transcoded as well?
    You have me thoroughly confused. The FLAC files are never altered. SlimServer will always be able to access them. It can, however, stream (rather than convert) the files to MP3.

    If you are referring to the flac2mp3 script I mentioned, yes, the original FLAC files are retained.
    Current: SB2, Transporter, Boom (PQP3 - late beta, PQP1 - early beta), SBC (early beta), Squeezebox Radio (PB1 - early beta), Squeezebox Touch (late beta)
    Sold: SB3, Duet

  6. #6
    Senior Member
    Join Date
    Oct 2005
    Posts
    7,099
    Quote Originally Posted by Dpfels View Post
    Also, as a side issue, when I activate the FLAC->MP3 conversion under "File Types", I get the following error:

    Required binary was not found: [flac] -dcs --skip=$START$ --until=$END$ -- $FILE$ | [lame] --resample 44100 --silent -q $QUALITY$ --abr $BITRATE$ - -

    Am I missing something?
    Thanks.
    Looks like you don't have LAME installed in a location SlimServer can see it. Go to Player Settings - Audio - Bitrate Limiting. Does it mention that LAME is properly installed?

    Mine's in /usr/bin.
    Current: SB2, Transporter, Boom (PQP3 - late beta, PQP1 - early beta), SBC (early beta), Squeezebox Radio (PB1 - early beta), Squeezebox Touch (late beta)
    Sold: SB3, Duet

  7. #7
    Member
    Join Date
    Jan 2007
    Posts
    40
    Let me see if I can explain myself a bit better.
    I understand that music can be served up from the Slimserver in two ways:
    1. A Squeezebox can log in and pull music over.
    2. The Slimserver can be controlled directly to allow it to "push" music.

    As far as I can tell the "pushed" music can be directed at a particular Squeezebox or it can be read as a stream by any device that can recognize it (including iTunes on a Mac or PC).

    Assuming that 1 and 2 are distinct processes (pushing vs pulling files), then am I correct in my understanding that the Squeezebox will be "pulling" FLAC files and decoding them locally?

    Additionally, if I stream music, will that automatically be converted to MP3?

    My main concern is that the Squeezebox will also receive MP3 files, which I do not want. What I like about the Squeezebox is its ability to decode FLAC locally, allowing me to play uncompressed files that have not lost any information.

    If I am still not making sense, please let me know.
    I appreciate your help.
    Best,
    Dan

  8. #8
    Member
    Join Date
    Jan 2007
    Posts
    40
    I had a look. I clearly don't have LAME installed.
    For a novice, can I ask: is there way to get a copy of LAME that is already compiled? I will need it for a Mac and a Linux machine.
    I found one older version for Mac (3.9.1). The problem is that I don't know where to install it to make it available for Slimserver.
    /usr/bin is not the same on the Mac, I think.

    Thanks,
    Dan

  9. #9
    Senior Member
    Join Date
    Oct 2005
    Posts
    7,099
    Quote Originally Posted by Dpfels View Post
    Let me see if I can explain myself a bit better.
    I understand that music can be served up from the Slimserver in two ways:
    1. A Squeezebox can log in and pull music over.
    2. The Slimserver can be controlled directly to allow it to "push" music.

    As far as I can tell the "pushed" music can be directed at a particular Squeezebox or it can be read as a stream by any device that can recognize it (including iTunes on a Mac or PC).
    Actually it's really all one process. SlimServer does everything. The SB is merely sending along commands to SlimServer, SlimServer does all the work. The SB doesn't even really have the smarts to "log in", it can be considered a dumb terminal for SlimServer.

    SlimServer can be controlled from the web interface, yes, but the same process is going on.

    Assuming that 1 and 2 are distinct processes (pushing vs pulling files), then am I correct in my understanding that the Squeezebox will be "pulling" FLAC files and decoding them locally?
    Again, it's the same process, and it's more like "pushing". The Squeezebox isn't doing much of anything, SlimServer is breaking the FLAC file up into networking packets and sending it to the SB, the SB merely stores the packets in its buffer and plays them out at the appropriate speed.

    Additionally, if I stream music, will that automatically be converted to MP3?
    Only if you tell it to by the Bitrate Limiting setting I mentioned above. If you keep Server Settings - File Types - FLAC - FLAC (built-in) checked it won't transcode unless you also have FLAC - MP3 checked and activate Bitrate Limiting or if you uncheck FLAC - FLAC (built-in).

    Note Bitrate Limiting is set per-player, so you can have each player behave differently. Software players using stream.mp3 automatically use bitrate limiting, SlimServer-specific software players like SoftSqueeze and squeezeslave behave just like the hardware players.

    My main concern is that the Squeezebox will also receive MP3 files, which I do not want. What I like about the Squeezebox is its ability to decode FLAC locally, allowing me to play uncompressed files that have not lost any information.
    Yes, provided the player settings are OK, you can have the SB play FLAC files as FLAC files and send FLAC transcoded to MP3 to other players.

    Just keep in mind it's a transcoded stream. No MP3 file is created that iTunes can use, although iTunes can tune into the MP3 stream by pointing it to http://<SlimServer IP>:9000/stream.mp3
    Current: SB2, Transporter, Boom (PQP3 - late beta, PQP1 - early beta), SBC (early beta), Squeezebox Radio (PB1 - early beta), Squeezebox Touch (late beta)
    Sold: SB3, Duet

  10. #10
    Senior Member
    Join Date
    Oct 2005
    Posts
    7,099
    Quote Originally Posted by Dpfels View Post
    I had a look. I clearly don't have LAME installed.
    For a novice, can I ask: is there way to get a copy of LAME that is already compiled? I will need it for a Mac and a Linux machine.
    I found one older version for Mac (3.9.1). The problem is that I don't know where to install it to make it available for Slimserver.
    /usr/bin is not the same on the Mac, I think.
    Don't know too much about Macs. My copy of LAME came with my Linux distro (Ubuntu 7.04) and can be installed from the Ubuntu repository too.

    You can get precompiled LAME for Mac here: http://www.rarewares.org/mp3-lame-bundle.php

    For Linux, it usually comes preinstalled. You could get it from the distro resources (repositories, precompiled .deb or RPM files).
    Last edited by Mark Lanctot; 2007-10-24 at 09:41.
    Current: SB2, Transporter, Boom (PQP3 - late beta, PQP1 - early beta), SBC (early beta), Squeezebox Radio (PB1 - early beta), Squeezebox Touch (late beta)
    Sold: SB3, Duet

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •