IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
MP3 Compression, size of file
bazza
post Dec 9 2013, 19:08
Post #1





Group: Members
Posts: 3
Joined: 9-December 13
Member No.: 113099



Ok, most of us know that converting a WAV file to MP3 reduces the size to arounf 10% (35 Meg WAV becomes a 3.5 Meg MP3) of the origional file at the loss of quality, and the bits that are cut out to reduce the size are gone. What I dont figure is that when the MP3 is converted back to a WAV file it is around the same size as it was in the first place, if bits are lost in the compression phase, where does all the extera MB come from?

This post has been edited by bazza: Dec 9 2013, 19:10
Go to the top of the page
+Quote Post
pdq
post Dec 9 2013, 19:23
Post #2





Group: Members
Posts: 3391
Joined: 1-September 05
From: SE Pennsylvania
Member No.: 24233



The 35 meg WAV (actually PCM) is data of the form that your sound card requires in order to reproduce the music. The mp3 does not "remove bits". It simply is a more efficient way of encoding the information that your sound card will need, but it must be restored to 35 meg in order to play it.
Go to the top of the page
+Quote Post
halb27
post Dec 9 2013, 19:25
Post #3





Group: Members
Posts: 2425
Joined: 9-October 05
From: Dormagen, Germany
Member No.: 25015



A WAV file has always the same structure: 44100 wave samples in a second for each channel, and each wave sample is represented by a 16 bit Integer (CD originated music assumed).
You may have compressed your music anyway you like: if you convert back to WAV it's always the size according to this WAV file structure. So same size as original WAV file.


--------------------
lame3100m -V1 --insane-factor 0.75
Go to the top of the page
+Quote Post
includemeout
post Dec 9 2013, 20:42
Post #4





Group: Members
Posts: 282
Joined: 16-December 09
From: Maringá, Brazil
Member No.: 76067



An analogy that may help you:

let's say you've decided to save a lossy JPG image file as uncompressed TIF; you would end up with exactly the same image (ie, quality settings wouldn't improve or decrease) but in a larger file, which is inherent to the uncompressed format - nothing more nothing less.


--------------------
Listen to the music, not the media.
Go to the top of the page
+Quote Post
spoon
post Dec 9 2013, 21:59
Post #5


dBpowerAMP developer


Group: Developer (Donating)
Posts: 2745
Joined: 24-March 02
Member No.: 1615



Take a newspaper sheet (this is your wave file), now squash into a ball (this is mp3), now open backup again to a full sheet (this is wave again, but you will notice it is not as good as before you squashed it).


--------------------
Spoon http://www.dbpoweramp.com
Go to the top of the page
+Quote Post
DVDdoug
post Dec 9 2013, 22:26
Post #6





Group: Members
Posts: 2564
Joined: 24-August 07
From: Silicon Valley
Member No.: 46454



If you know that there are 8-bits in a byte, and you know the bit depth, sample rate, and number of channels, you can calculate the size of a WAV file:

File Size in bytes = Sample rate in Hz x (bits-per-sample / 8) x number of channels x playing time in seconds.

i.e. CDs are 16-bits stereo at 44.1kHz, so you have 44,100 samples per second x 2 bytes x 2 channels. That's about 10 megabytes for one minute of sound.


For compressed files, the bitrate (kbps) is the number of kilobits for one second of program, so you can calculate file size if you know the bitrate and the playing time.

Or by calculating the number of bits in one second of CD audio, you can caluculate the bitrate for CDs as 1411 kpbs.
Go to the top of the page
+Quote Post
Nessuno
post Dec 10 2013, 10:48
Post #7





Group: Members
Posts: 422
Joined: 16-December 10
From: Palermo
Member No.: 86562



QUOTE (spoon @ Dec 9 2013, 21:59) *
Take a newspaper sheet (this is your wave file), now squash into a ball (this is mp3), now open backup again to a full sheet (this is wave again, but you will notice it is not as good as before you squashed it).

But if you don't squash it too much, or better fold it carefully, when you expand it again to its previous size you might not notice any difference at all, at reading distance. This is perceptual encoding... wink.gif


--------------------
... I live by long distance.
Go to the top of the page
+Quote Post
bazza
post Dec 10 2013, 15:36
Post #8





Group: Members
Posts: 3
Joined: 9-December 13
Member No.: 113099



ok, think im getting the picture here(though i was always told mp3's do give a lot of loss, (unlike FLAC)
as for the newspapar alogy, hmmm, if it is ironed out to remove the not so squashed bits, it is almost as good as the origional.

not that i need mp3's, as dont use a player for them, and on the computer, with the low cost of HDs in the TB range, space is not an issue

This post has been edited by bazza: Dec 10 2013, 15:39
Go to the top of the page
+Quote Post
probedb
post Dec 10 2013, 15:48
Post #9





Group: Members
Posts: 1210
Joined: 6-September 04
Member No.: 16817



QUOTE (bazza @ Dec 10 2013, 14:36) *
ok, think im getting the picture here(though i was always told mp3's do give a lot of loss, (unlike FLAC)


But that's the point, it's perceptual, whether you can hear what is missing isn't guaranteed, and the whole point of this sort of lossy encoding. The objective being to remove what you can't (shouldn't be able to) hear.

FLAC is lossless, what you encode is exactly what you get out.
Go to the top of the page
+Quote Post
includemeout
post Dec 10 2013, 16:32
Post #10





Group: Members
Posts: 282
Joined: 16-December 09
From: Maringá, Brazil
Member No.: 76067



QUOTE (bazza @ Dec 10 2013, 16:36) *
not that i need mp3's, as dont use a player for them, and on the computer, with the low cost of HDs in the TB range, space is not an issue


Is that thanks to what you've read elsewhere so far?

Then, like myself, you'll benefit immensely from reading what's in here at HA.

I was once or twice in the same boat, but after realising other HA members who, knowing a lot more than I do (you won't believe the expertise level of some of them), still cared about MP3 and other similarly good lossy encoders, I came to the conclusion it is not a matter of 'don't use it anymore' but more of 'be quality-minded & practical: use it whenever necessary' (portable usage etc.)

That of course, as long as you 'lossyly' encode you files with quality settings high enough, your ears (and only your ears, not other people's) cannot discern them from the original. Get to know more about ABX testing if necessary but just don't give up on what it is an excellent alternative to audio encoding without first giving it a fair chance to impress you.

This post has been edited by includemeout: Dec 10 2013, 16:36


--------------------
Listen to the music, not the media.
Go to the top of the page
+Quote Post
dhromed
post Dec 10 2013, 17:52
Post #11





Group: Members
Posts: 1301
Joined: 16-February 08
From: NL
Member No.: 51347



QUOTE (bazza @ Dec 10 2013, 15:36) *
though i was always told mp3's do give a lot of loss, (unlike FLAC)


Information is absolutely lost, but when converting "back" to WAV, you're basically reserving space for that lost information, even if there's no music there. So saving an mp3 as WAV is quite a waste of space.

How much is lost depends on your compression settings and your ears.
Go to the top of the page
+Quote Post
bazza
post Dec 10 2013, 20:55
Post #12





Group: Members
Posts: 3
Joined: 9-December 13
Member No.: 113099



thanks dhromed, i thought it may have been something like that, the computer knows there should be something there but cant find it, so reserves space fir it.
Go to the top of the page
+Quote Post
saratoga
post Dec 10 2013, 21:12
Post #13





Group: Members
Posts: 4903
Joined: 2-September 02
Member No.: 3264



QUOTE (bazza @ Dec 10 2013, 14:55) *
thanks dhromed, i thought it may have been something like that, the computer knows there should be something there but cant find it, so reserves space fir it.


To be clear, theres still information there, its just not the same information as the original file. You can think of mp3 as adding noise to replace the information it discards. So the output file has the same size as the input, but is not quite the same because some information has been changed.
Go to the top of the page
+Quote Post
dhromed
post Dec 10 2013, 22:20
Post #14





Group: Members
Posts: 1301
Joined: 16-February 08
From: NL
Member No.: 51347



I can make another metaphor about small data being in a small box (mp3), and if you convert to a bigger box (wav) you don't get more music but you do waste space, and about how part of the mp3 algorithm in a way permanently tenderizes the data-meat so that it can be more easily compressed, but how many can we stack on top of one another before mr. bazza is more confused than at the start? emot-pseudo.gif

At some point, you just have to get to terms with the fact that WAV means writing out every single value, in full, 44100 numbers of 16 bits, for every second in your song, and that just takes up loads of space.

This post has been edited by dhromed: Dec 10 2013, 22:25
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st August 2014 - 23:21