Music Streaming Basics

I think we all know by now what this section is for.
User avatar
Ray P
No idea why I do this anymore
Posts: 6294
Joined: Thu Nov 22, 2007 5:18 pm
Location: Somerset

#1 Music Streaming Basics

Post by Ray P »

It's clear from the Raspberry Pi threads that there are a number of people interested in getting into computer-based music 'streaming' but still some confusion about what this actually means in practice so I thought I would try to describe, simply, the concepts as I understand them; hope it helps...

Ray
User avatar
Ray P
No idea why I do this anymore
Posts: 6294
Joined: Thu Nov 22, 2007 5:18 pm
Location: Somerset

#2

Post by Ray P »

Logically you need three components to build a music streaming solution, these being;

1. A media library

This is where your media resides and is organised. Your media can be music but can also be pictures/videos. Additionally, your media library might include virtual sources, such as internet radio.

For the purposes of this we'll assume music so your media library will be a collection of computer files containing music that you have ripped from CDs or downloaded. I will not go into the topic of ripping or the various types of music file here.

2. A media renderer

This device receives music files from the library and converts them into something that can be used by your amplifier or dac. You need a renderer in each location where you want to listen to music from you library.

3. A media controller

This device tells the media library which music to send to which renderer and might also control the renderer, for example, volume control.

Note that I used the word 'logically' right at the beginning of this post. That is because in practical solutions some, or all, of the three components might be combined into a single physical device: for example you may use a smart phone to select music from your library and then listen to it via headphones plugged into the phone and in this case your phone is a combined controller and renderer and if your music files are also on the phone then it is a combined library, renderer, controller.

Next I'll try to cover some examples of physical implementations related to what people here seem to be doing.

Ray
User avatar
Ray P
No idea why I do this anymore
Posts: 6294
Joined: Thu Nov 22, 2007 5:18 pm
Location: Somerset

#3

Post by Ray P »

Sorry, there will now be a brief intermission while I go and earn my daily crust.

Ray
User avatar
Paul Barker
Social Sevices have been notified
Posts: 8867
Joined: Mon May 21, 2007 9:42 pm

#4

Post by Paul Barker »

Thank you Ray you are contributing a great deal to those of us who are not up to speed with these matters.

I have come to realise the RPI may be of value in many ways.

Might end up using one to control stuff around the house.

Only if my work runs dry so there is time to spare.

Just enough time right now to follow what you are showing us and perhaps copy some of it.
"Two things are infinite, the universe and human stupidity, and I am not yet completely sure about the universe." – Albert Einstein
User avatar
Ray P
No idea why I do this anymore
Posts: 6294
Joined: Thu Nov 22, 2007 5:18 pm
Location: Somerset

#5

Post by Ray P »

No worries Paul. I'm just trying to think through the best way of describing some practical implementations.

Ray
User avatar
Ray P
No idea why I do this anymore
Posts: 6294
Joined: Thu Nov 22, 2007 5:18 pm
Location: Somerset

#6

Post by Ray P »

After consideration about how to describe the concepts in terms of actual implementations I've decided that looking at it from a products perspective will probably be simplest; that way people can relate to names they've come across and see where they fit into the scheme of things.

There seem to be three main solutions referenced here;

1. Squeezebox based
2. UPnP/DLNA based
3. Apple based

plus Linux MPD based solutions.

I'm by no means an expert and have little experience of some (I once had an iPhone!) but I'll try to sketch out the basics of each over the weekend and hopefully others can pitch in to fill gaps or correct errors.

Ray
User avatar
Ray P
No idea why I do this anymore
Posts: 6294
Joined: Thu Nov 22, 2007 5:18 pm
Location: Somerset

#7

Post by Ray P »

Oh, and one caveat: the intention is to give a general flavour/understanding and this cannot possibly cover all of the potential variations that I alluded to before.

Also, the only stupid question is the one that doesn't get asked.

Ray
User avatar
Ray P
No idea why I do this anymore
Posts: 6294
Joined: Thu Nov 22, 2007 5:18 pm
Location: Somerset

#8

Post by Ray P »

Paul Barker wrote:Only if my work runs dry so there is time to spare.
Paul, you're a plumber, how can your work possibly run dry!? :lol:

Ray
User avatar
Mike H
Amstrad Tower of Power
Posts: 20157
Joined: Sat Oct 04, 2008 5:38 pm
Location: The Fens
Contact:

#9

Post by Mike H »

Just to throw my oar in - Image


Depends on your definition of quality but might be worth mentioning that iTunes will rip CD's to WAV, mp3 and 2 other types, can't remember offhand. It also directly interfacers with iPad & iPhone, which in turn can function as audio sources with the suitable adapter leads.

If using your PC with audio adapter or whatever:

I now use VLC player, plays virtually anything including CD's, DVD's including those that are world region limited (i.e. you can play region 1 [US / Canada] DVD's without altering your region setting, which is limited to 3 changes only I think), and web files, and Windows media player format (wmv). Can also convert files to different types, resize display dimensions, I've even made it save audio track only.

Also check out YouTube Downloader, Replay Media Catcher and WM Capture. The last is an off-screen recorder, the other two download and save web files to disc. YTD also works on Vimeo and some others.

Just FYI
 
"No matter how fast light travels it finds that the darkness has always got there first, and is waiting for it."
User avatar
Paul Barker
Social Sevices have been notified
Posts: 8867
Joined: Mon May 21, 2007 9:42 pm

#10

Post by Paul Barker »

Ray P wrote:
Paul Barker wrote:Only if my work runs dry so there is time to spare.
Paul, you're a plumber, how can your work possibly run dry!? :lol:

Ray
:lol: :lol: :lol:
"Two things are infinite, the universe and human stupidity, and I am not yet completely sure about the universe." – Albert Einstein
User avatar
Paul Barker
Social Sevices have been notified
Posts: 8867
Joined: Mon May 21, 2007 9:42 pm

#11

Post by Paul Barker »

Mike H wrote:
Also check out YouTube Downloader,
I have to boot up in Linux to download the youtube flash. Run something in terminal. Forgotten the name of it, something dl. Works a treat!

I struggled to achieve it in Windows so didn't get a solution, or care either for that matter. Most links that pretend to be a solution are just scammers trying to clog your windows up with a load of shyte you didn't want and the thing you did want doesn't work.

So I generally leave windows as standard (read crippled and useless) and use Linux to do extra things like download flash.
"Two things are infinite, the universe and human stupidity, and I am not yet completely sure about the universe." – Albert Einstein
User avatar
Mike H
Amstrad Tower of Power
Posts: 20157
Joined: Sat Oct 04, 2008 5:38 pm
Location: The Fens
Contact:

#12

Post by Mike H »

Wow ... :shock:
 
"No matter how fast light travels it finds that the darkness has always got there first, and is waiting for it."
User avatar
Paul Barker
Social Sevices have been notified
Posts: 8867
Joined: Mon May 21, 2007 9:42 pm

#13

Post by Paul Barker »

Just remembered the command. "youtubedl" space then the web address.

I only find two things challenging about Linux.

Getting a printer to work and working out how to turn sound on, because for some mysterious reason if you load it up fresh and start it up it comes with sound turned off.

A few days head scratching and I have sound. A few weeks head scratching and I can print.

I catch on quick!
"Two things are infinite, the universe and human stupidity, and I am not yet completely sure about the universe." – Albert Einstein
User avatar
Ray P
No idea why I do this anymore
Posts: 6294
Joined: Thu Nov 22, 2007 5:18 pm
Location: Somerset

#14

Post by Ray P »

So the first thing to consider is actually acquiring and hosting some music files. I mention it here as a starting point because to save wasting time down the line you should consider your requirements up front. You need to consider whether you require compression and the format you'll use.

Compression comes in three flavours:

Lossy Compression - example is mp3. Use clever algorithms that discard original data in order to compress the original source file to consume less storage.

Lossless Compression - examples are FLAC and ALAC. Use clever algorithms that compress the original source file to consume less storage space but enable an exact image of the original to be reconstructed for playback.

Uncompressed - example is WAV. What it says on the tin.

For good quality audio most people will opt for lossless compression.

Having decided on compression you now need to decide on the actual format that you'll use and, without wishing debate the relative merits, I think this boils down to whether you want to utilise the Apple ecosystem, in which case it'll be ALAC, or to utilise more generic solutions, in which case you'll probably choose FLAC. There are other formats available and, it has to be said that many systems can playback both. Also, it is probably a little easier to purchase downloads from Apple iTunes than FLAC downloads where there are various suppliers.

Of course, you may have a lot of digital music already in the form of CDs and you should be able to rip these to your chosen format. I suggest checking out CD rippers such as EAC and dbPoweramp.

More to follow.

Ray

Edit: should have been explicit - lossy compression normally takes the least space and, obviously, uncompressed the most space.
Last edited by Ray P on Sun Jan 19, 2014 10:31 am, edited 1 time in total.
User avatar
Paul Barker
Social Sevices have been notified
Posts: 8867
Joined: Mon May 21, 2007 9:42 pm

#15

Post by Paul Barker »

Thank you Ray.

A friend was telling me that there is something called Audacity available for free which I could use to record my Vinyl. Presumably it can be recorded real time then converted to FLAC. He said something about playing the whole album as one, which becomes one file, then you can go in to the recording find the track spacings and name the tracks.

Why this matters to me is that someone with plenty of vinyl and virtually no digital, that isn't interested in mp3 lack of quality, without spending money on new purchased digital can equip himself with a library of his own vinyl to use when he feels the convenience of digital suits him, but when he wants ultimate quality he can still reach for the vinyl.

That coming from someone who needs to fix some things before he can even play vinyl once more.
"Two things are infinite, the universe and human stupidity, and I am not yet completely sure about the universe." – Albert Einstein
Post Reply