Mp3 lame bitrate compression optimization
Upcoming SlideShare
Loading in...5
×
 

Mp3 lame bitrate compression optimization

on

  • 667 views

 

Statistics

Views

Total Views
667
Views on SlideShare
667
Embed Views
0

Actions

Likes
0
Downloads
6
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Mp3 lame bitrate compression optimization Mp3 lame bitrate compression optimization Document Transcript

  • AQuA MusicAQuA is the tool that will help you to save up to 40% on bitrate andup to 50% on audio size when encoding your audio files!AQuA for music quality testing is basically the same AQuA Widebandproduct, which is devoted to perceptual testing of audio signal quality.When considering digital recording and digital playback, sound qualitydepends on the range of sound signal, the rate at which it is sampled,and various conversions that occur in sound reproduction system.In lossy codecs like MP3, sound quality is a factor that determineshow much of the sound signal data the encoder is allowed to loosein order to reduce file size. In MP3-encoded signals for instance thequality is defined by its bitrate, in kilobits per second (kbps).The frequency range of sound (in Hertz) which equipment is capableto sample and reproduce affects sound quality. Humans can hearfrequencies ranging from about 20 Hz to approximately 20 kHz, sosampling that does not extend far enough will take effect on thesound quality.Sound signal wave is continuous and has some real value at everyinstant. The digital quantization of the analogue sound wave meansthat much of the continuous sound wave is not recorded. The rateat which the sound is sampled refers to the amount of informationthe detection equipment records for each second of the sound. Thehigher the sampling frequency, the more accurate the final sampleswill be. However, there is a mathematical proof that in order topreserve all frequencies in the original sound its enough that thesampling frequency is two times higher than the highest frequencyin the sound signal spectrum. Thus for example when dealing withspeech one can easily use sampling frequency of 8kHz, becausehuman speech spectrum is limited by 4kHz and telephone channelspectrum by 3.4kHz.When recording a podcast, grabbing music from your CD into MP3,
  • OGG or AAC, uploading an audio book to your iPhone or dumpingyour favorite tracks on a memory stick to play while driving, wealways face the same problem - we want to make the file smallerbut sound as good as ithe original. In many cases when one usessMP3 encoder the choice he or she makes is simple - to use 320kbpsand that will surely preserve the quality. In many cases it may work,but what if you store thousands of tracks? What if millions? Whatif you are going to transmit your podcast over the Internet? Whatif your audio is transmitted over a mobile network? In such casesevery megabyte saved turns into real money saving and the lowerthe bitrate preserving desired audio quality the better performance ofyour service.The way it works is very simple. AQuA has a perceptual audio qualitymodel that acts as a very well trained human ear that can hear eventiny changes in audio quality and tell how much quality was lost dueto audio processing. AQuA returns two types of scores:- percentage of quality similarity compared to the original audio- MOS (Mean Opinion Score), which is a value between 1 and 5MOS Quality Impairment5 Excellent Imperceptible4 Good Perceptible but not annoying3 Fair Slightly annoying2 Poor Annoying1 Bad Very annoyingSo, the process of choosing the best audio compression parameters(OGG, MP3, AAC compression optimization) when optimizing f.e.bitrate with Lame MP3 encoder is split into the following phases:1. set minimal bitrate = X2. set bitrate incremental step = S3. compress original audio into MP3 with bitrate X4. decompress MP3 into uncompressed WAV5. test quality comparing original WAV and uncompressed MP3 usingAQuA Wideband6. if the quality is lower than MOS 5 increase bitrate so that new
  • bitrate = X + S and go to step 37. if the quality is higher or equals MOS 5 then we have found optimalbitrate for this audioLets use MP3_Torture_Test.wav taken from this location: http://recording.org/daw-pro-audio/28203-mp3-encoder-torture-test.htmlWe are going to use mp3opt.bat file to automate bitrate optimizationand the result we get is:"% = 97.59""MOS = 5.00""Bitrate = 104""Passes=13"So, we preserve 97.59% of original file quality if encodeMP3_Torture_Test.wav using Lame encoder with the followingparameters:lame.exe -b 104 MP3_Torture_Test.wav MP3_Torture_Test.wav.mp3In the post where we took the MP3_Torture_Test.wav from 128kbpsgives a very good quality according to the poster, but we could save24kbps on bandwidth and about 400K on the file size!lame.exe -b 128 MP3_Torture_Test.wav MP3_Torture_Test-128kbps.wav.mp3WAV 15882228 Bytes Bytes Ratio128kbps 1441122 11104kbps 1080842 15Now its time to check how much quality was preserved in the audiocompressed with 128kbps, so we use AQuA again:aqua-wb tst.lic -mode files -src file MP3_Torture_Test.wav -tstfMP3_Torture_Test-128kbps.wav -acr auto -npnt auto -miter 1 -enormon -grad on -mprio on -tmc on -ratem %m
  • Here is the output:Sevana Audio Quality Analyzer - AQuA-Wideband v.5.3.11.720.Copyright (c) 2009 by Sevana Oy, Finland. All rights reserved.---------------------------------------------------------------test license---------------------------------------------------------------File Quality is Percent value 97.52 MOS value 5.00Amazingly, but the quality is the same as at 104kbps! And if it soundsthe same (you are welcome to download these files and listen tothem yourself) why to spend extra space and bandwidth?And now another application of AQuA Wideband – audio transcoding.Lets compress MP3_Torture_Test.wav using Lame with 320kbpskeeping in mind that this is a typical choice of those who want topreserve maximum of quality.AQuA shows us that at 320kbps we preservedaqua-wb tst.lic -mode files -src file MP3_Torture_Test.wav -tstfMP3_Torture_Test_320kbps_mp3.wav -acr auto -npnt auto -miter 1 -enorm on -grad on -mprio on -tmc on -ratem %mSevana Audio Quality Analyzer - AQuA-Wideband v.5.3.11.720.Copyright (c) 2009 by Sevana Oy, Finland. All rights reserved.---------------------------------------------------------------test license---------------------------------------------------------------File Quality is Percent value 99.50 MOS value 5.00almost 100% of audio quality. Lets now transcode this audio file andcheck what lowest bitrate we can use and how much quality wellpreseve from 99.5%
  • "% = 97.53""MOS = 5.00""Bitrate = 104""Passes=13"And we got a pretty much the same result from tanscoding. Ofcourse when dealing with uncompressed original audio we have abetter chance to avoid compression artifacts, but still it is possible totranscode with a lower bitrate and audibly the same quality. Of coursecompared to the original uncompressed audio we may get a differentresult:Sevana Audio Quality Analyzer - AQuA-Wideband v.5.3.11.720.Copyright (c) 2009 by Sevana Oy, Finland. All rights reserved.---------------------------------------------------------------Valeri, test license---------------------------------------------------------------File Quality is Percent value 97.41 MOS value 5.00But it is still of a high quality level.WAV 15882228 Bytes Bytes Ratio320kbps 3602807 4.4104kbps 1081469 15After transcoding we saved 216kbps bandwidth and 70% of space!Whats in it for me?Private customer (AQuA service) Corporate customer (AQuA Server)Optimized audio CD grabbing Tremendous space saving on large audio files
  • Increased storage on MP3 player, Space and bandwidth saving oniPod and mobile devices podcasts, tunes, audio books hosting and streamingMore audiobooks to fit the same Optimized audio for transmissionstorage over communication channelsMore tracks to fit the same Bandwidth saving on mobile networkmemory stick audio streaming Automated audio encoding with user defined quality level Optimize bitrate for Internet radio broadcasting