kbps and all that

Discussion in 'Hi-Fi and General Audio' started by Coda II, Aug 10, 2007.

  1. Coda II

    Coda II getting there slowly

    Joined:
    Nov 17, 2004
    Messages:
    603
    Likes Received:
    1
    Location:
    Devon
    In simple terms, what are the various parameters to be aware of with digital broadcast?
    The BBC feed playing at the moment is 42kbps, my assumption is that this sort of equates to dpi on a monitor, ie the resolution of the information available. Expanding on that would mean that simple sounds are fine at low bit rates but more complex music would suffer - in the same way that a highly detailed image can't be displayed at 72 dpi.

    Winamp also shows a frequency so at present it's 64 kbps and 44 khz

    and the sound card is set to: 16 bit, 8 - 48 khz

    So what's that all about then?

    Thanks
     
    Coda II, Aug 10, 2007
    #1
  2. Coda II

    I-S Good Evening.... Infidel

    Joined:
    Jun 25, 2003
    Messages:
    4,842
    Likes Received:
    1
    Location:
    In a world of pain
    At a very basic level, more kbps = better quality. An uncompressed CD is 1411.2 kbps (16 bits times 44100 samples per second times 2 channels). A lossless FLAC file of a CD is typically 1000kbps. A good quality MP3 is 320kbps and an average-low quality (used to be regarded as standard, but bandwidth and storage have increased significantly) is 128kbps. Lower than that (as is typical for many internet streams) is getting distinctly low-fi.

    On a more technical level, kbps stands for "kilo bits per second" - a raw data rate. The lower the data rate, either the lower the amount of original data (eg 12 or 8 bit rather than 16, 32kHz sampling rather than 44.1 or 48, mono rather than stereo) or the original data has been compressed (eg MP3). The data rate that a stream uses will infer quality, typically in the level of compression, but also in how the stereo information is encoded and sample rates, etc.

    MP3 (and other lossy audio compression formats) use something called "perceptual coding" - the information that is thrown away is done so on the basis that you are least likely to notice it missing (note NOT that you WON'T or CAN'T - just that it is the least invasive). As the level of compression increases, the information lost becomes more and more and more noticeable.
     
    I-S, Aug 10, 2007
    #2
  3. Coda II

    Coda II getting there slowly

    Joined:
    Nov 17, 2004
    Messages:
    603
    Likes Received:
    1
    Location:
    Devon
    Thanks Isaac...

    so does that mean that, in principal, 8 bit at 32 kHz and 16 bit at 16 kHz would require the same streaming rate?

    and when winamp shows 64 kbps and 44 kHz does that mean the sample rate was fine but that it's then been compressed down to something that streams at 64 kbps?

    ps. Nitin Sawhney and Friends at the Proms tonight:prom37
     
    Coda II, Aug 10, 2007
    #3
  4. Coda II

    I-S Good Evening.... Infidel

    Joined:
    Jun 25, 2003
    Messages:
    4,842
    Likes Received:
    1
    Location:
    In a world of pain
    Correct.

    Also correct. 64kbps is a very heavily compressed stream, but is typical of many internet radio stations.
     
    I-S, Aug 10, 2007
    #4
  5. Coda II

    sastusbulbas

    Joined:
    May 21, 2006
    Messages:
    275
    Likes Received:
    0
    Location:
    Edinburgh
    Hi Guys,

    I had queries about this a while back in another forum, and their opinion was that FLAC and such were theoreticaly lossless and therefor perfect.

    I myself questioned this, as a CD with say 1200kbps is usualy reduced to 800kbps as an example. My thoughts are with around 400kbps of data removed how can it be considered high quality and perfect, one of the answers I got was Flac and similar lossless compression programs only remove the information you cannot hear, plus the silences? The argument continued as to how perfect a CD stored on a HD is compaired to a CD player ETC.

    Surely losing any amount of kbps is detrimental?

    I myself am still not sure about what is best, but prefer the sound of WAV to Windows Lossless and MP3. And I still do not have a computer which sounds better than a dedicated CD player.
     
    sastusbulbas, Aug 13, 2007
    #5
  6. Coda II

    Dev Moderator

    Joined:
    Jun 19, 2003
    Messages:
    5,764
    Likes Received:
    4
    Location:
    Ilford, Essex, UK
    Any lossless format should mean exactly that. I.e. completely lossless and therefore reversible.
     
    Dev, Aug 13, 2007
    #6
  7. Coda II

    zanash

    Joined:
    Jun 20, 2003
    Messages:
    3,826
    Likes Received:
    2
    Location:
    Notts.
    yes ....but on a simple back to back listen my flac recorded track sounded different to the apple lossless on a friends sb3...

    the apple sounded thin and weedy and flac full bodied ...I've no idea of the apple settings...but both were ripped from the same cd.

    why ?
     
    zanash, Aug 13, 2007
    #7
  8. Coda II

    Dev Moderator

    Joined:
    Jun 19, 2003
    Messages:
    5,764
    Likes Received:
    4
    Location:
    Ilford, Essex, UK
    I'm not going to argue about the merits of Apple lossless versus FLAC but just to reiterate that lossless means there is NO loss of data at all. You MUST be able to uncompress the file back to the original format, otherwise it's not lossless. There is nothing magical about it, how many people here zip data files without losing any data?
     
    Dev, Aug 13, 2007
    #8
  9. Coda II

    I-S Good Evening.... Infidel

    Joined:
    Jun 25, 2003
    Messages:
    4,842
    Likes Received:
    1
    Location:
    In a world of pain
    Sastusbulbas - It is lossless compression. When the decompression algorithm is run on a FLAC file it is restored to the full amount of data and the 0s and 1s fed to the DAC chip are the same as the uncompressed file. Read up on Lempel Ziv Welch for an explanation of how lossless compression works (FLAC does not use LZW, but this should enhance your understanding of compression/decompression).

    Mp3 DOES throw away data, and thus the 0s and 1s that reach the DAC chip are different to what comes out of a CD.
     
    I-S, Aug 13, 2007
    #9
  10. Coda II

    zanash

    Joined:
    Jun 20, 2003
    Messages:
    3,826
    Likes Received:
    2
    Location:
    Notts.
    I've no idea ...I'm a complete novice with this
     
    zanash, Aug 13, 2007
    #10
  11. Coda II

    sastusbulbas

    Joined:
    May 21, 2006
    Messages:
    275
    Likes Received:
    0
    Location:
    Edinburgh
    So what is the better solution?

    I use WAV for stuff I want to keep at high quality, with some WMA and some highest setting MP3 for background, but is FLAC a better storage sollution and overal performer than WAV?

    What have people found to give the best quality playback and with what recomended SoundCards?
     
    sastusbulbas, Aug 13, 2007
    #11
  12. Coda II

    I-S Good Evening.... Infidel

    Joined:
    Jun 25, 2003
    Messages:
    4,842
    Likes Received:
    1
    Location:
    In a world of pain
    FLAC is EQUAL to WAV in quality, but takes up less space.
     
    I-S, Aug 13, 2007
    #12
  13. Coda II

    DaveHiFi Seeking Nirvana

    Joined:
    Jan 20, 2006
    Messages:
    126
    Likes Received:
    0
    Location:
    Bradford
    lossless

    So therefore whats missing from wav to reduce it to a so called 'lossless' format of FLAC (free lossless audio codec) if file sizes decrease sure something went into the ether.
    Dave
     
    DaveHiFi, Aug 13, 2007
    #13
  14. Coda II

    Jampot

    Joined:
    Nov 22, 2005
    Messages:
    43
    Likes Received:
    0
    Location:
    Chorley, Lancs
    The analagy of the zip file is best - if you zip a document on the pc and subsequently unzip it, it is still all there. Same with Apple lossless and FLAC.

    If anyone has doubts, then agreed - if you store as wav files the playback should be AOK, and large hard drives are cheap now anyway. The use of compression is only of interest if you want to conserve space such as on a portable player. Even in this case, if you are prepared to do a little housekeeping the original rips could be done uncompressed and then compress them on the fly as they are written to the portable.

    On exceptional systems variations may be percieved (careful choice of term there:)) in playback quality (between wav / flac / apple lossless) but from an internal pc soundcard I very much doubt it.

    BUT -Coda II was asking about how kbps related to broadcasts, and the conclusion has to be 'they suck'!

    Jim
     
    Jampot, Aug 13, 2007
    #14
  15. Coda II

    I-S Good Evening.... Infidel

    Joined:
    Jun 25, 2003
    Messages:
    4,842
    Likes Received:
    1
    Location:
    In a world of pain
    Nothing is missing. It's just a more efficient way of writing it.

    For example:

    1,000,000,000,000,000,000,000 is the same as 1x10^21. However, the latter is significantly fewer characters but carries precisely the same information.

    WAV is like a bitmap image - data is represented fully. FLAC is akin to a bitmap in a zip file - it's smaller but still contains all of the data. MP3 is like a JPG - there's now bits missing which become more and more noticeable as the compression level increases.

    If you still struggle with what lossless compression does, read this link: http://en.wikipedia.org/wiki/Lzw
     
    I-S, Aug 13, 2007
    #15
  16. Coda II

    Coda II getting there slowly

    Joined:
    Nov 17, 2004
    Messages:
    603
    Likes Received:
    1
    Location:
    Devon
    So what's actually the limiting factor(s) on net broadcasts?
    Is it down to ISP speeds or the broadcasters themselves? And are compression techniques improving - will FLACs get any smaller?

    Just back to bit depth/word length (sounds like one of those should be right, please correct). Sample rate sounds straightforward - more samples = better accuracy. But is bit depth analogous to the position with images ie the difference between B&W, 256 colours, 16 million colours etc. Instead of hue, saturation and value you have frequency and amplitude?
    To simplify again - for the same amount of data you could have lots of frequency information but all at one volume - or lots of loud and soft all on a mono tone?
     
    Coda II, Aug 13, 2007
    #16
  17. Coda II

    I-S Good Evening.... Infidel

    Joined:
    Jun 25, 2003
    Messages:
    4,842
    Likes Received:
    1
    Location:
    In a world of pain
    Usually the limiting factor on net broadcasts is the broadcaster. Every single person listening uses up 64kbps (for example). With only 1000 listeners they're up to 64Mbps - that's serious bandwidth and gets expensive.

    There is a theoretical limit on lossless compression, and although LZW and FLAC aren't completely as efficient in terms of space used as they could be, there's a trade off - FLAC is designed to be easy and quick to decode, as is a requirement for systems without serious processing horsepower (eg a squeezebox or mp3 player - neither packs a big, powerful CPU) to be able to decode it without drop-outs. There's also the commercial side of things, as we see from the ugly court battles over MP3 patents - this will not happen with FLAC (the F stands for Free) as it is open-source.

    Bit depth (or "Resolution" - ie 16 bit for CD) is quite similar to colour depth.

    8 bit means that there's 256 (2^8) possible levels for each sample. 16 bit gives you 65536 (2^16) and 24bit gives 16777216 (2^24).

    The effect this has is on dynamic range (ie the magnitude of the smallest possible sound that can be distinguished (the difference between adjacent levels) compared to the magnitude of a full-scale sound). 8 bit recordings have a maximum dynamic range of 48dB, 16 bit are 96dB and 24 bit can offer 144dB. A good preamp offers in the region of 90dB and a power amp around 100dB - the preamp is the limiting factor in dynamic range in most systems.
     
    I-S, Aug 13, 2007
    #17
  18. Coda II

    Coda II getting there slowly

    Joined:
    Nov 17, 2004
    Messages:
    603
    Likes Received:
    1
    Location:
    Devon
    But cheaper than going out and sticking transmitters on hilltops?


    Does bit depth also have a bearing on pitch resolution?

    (thanks again)
     
    Coda II, Aug 13, 2007
    #18
  19. Coda II

    I-S Good Evening.... Infidel

    Joined:
    Jun 25, 2003
    Messages:
    4,842
    Likes Received:
    1
    Location:
    In a world of pain
    From http://en.wikipedia.org/wiki/Pulse-code_modulation:

    [​IMG]

    That image is for a 4 bit (ie 16 possible levels) PCM representation of a sinewave. More bits means more possible levels, so you can see that the smallest sound that can be recorded would be one that alternates between adjacent levels - the more levels available, the smaller this is relative to the largest possible sound (alternating between maximum and minimum levels).

    The sample rate determines the time between samples - the higher the sample rate, the shorter the length of the horizontal steps on the graph.

    Based on that picture the easiest way to think of bit depth and sample rate is that more bits make vertical steps smaller, more samples make horizontal steps smaller. You can see that as the steps grow smaller, the digital data can more closely follow the original analogue waveform.

    What do you mean by pitch resolution?
     
    I-S, Aug 14, 2007
    #19
  20. Coda II

    Coda II getting there slowly

    Joined:
    Nov 17, 2004
    Messages:
    603
    Likes Received:
    1
    Location:
    Devon
    What do I mean by pitch resolution - what determines the smallest difference in pitch that can be captured - eg if it's not a perfect sine wave and the pitch wavers (as I guess must be the case for most sounds produced by humans). From the above it would appear to be the sample rate. Take an A at 440 Hz, sample it at 44.1 kHz and fairly small variations are going to be picked up (not saying I can hear the difference between 440 and 441 Hz btw). Presumably as the sample rate came down differentiation between slight variations in pitch would be compromised?
     
    Coda II, Aug 14, 2007
    #20
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.