Wednesday, July 30, 2014

Mission : Restoring Compressed Music


Can we make it Sound real ?


In this next blog with focus on Audio Restoration, I will bring to light what goes into making the Compressed Music sound as good as LIVE one.

I will start from where I left in my previous blog
5.1 Surround Experience
Because the blog only talks of how to install the software and but the technology behind that is completely eclipsed.

It has the keys of audio restoration built into it. And we will be uncovering them step-by-step.

Problem 1: How do we split 2 channel audio to 6(5+1) discrete channels?

To be frank, the answer to this question is still incomplete, and technology is advancing to solve this.
A little info, 5.1 audio format came into existence because of the spatial relevance of the Sound (Direction of the sound source I.E. front, sideways or back ), giving it more natural ambiance.

Back in 2004 , DOLBY Labs  came out with DOLBY PrologicII technology, the matrix encoding format for storing 5 channel audio on 2 channel media. Though recording may not sound very different from stereo recordings, but pass this as input to Dolby enabled receivers and you would know, people at Dolby have created magic.
This technology though proprietary but is shared to public as a white-paper and a freely(not open-source) available decoder is part of ffdshow.

The decoder implemented works very well for any stereo source, but presents the next set problem of managing audio levels across 6 different speakers.

Problem 2: Managing volume levels ?

As You might have predicted that simply implementing a 5.1 decoder solves the problem, your are here for a surprise.
After getting the 6 channel audio, The volume levels are high in center channel and lower for the rear channels, this gives a highly distorted audio as the mixing is optimized for stereo listening.
The perfect solution depends on the actual compression used.
One common solution is to lower the center channel volume to 50% and increase the rear channel volume as you find pleasant.
If you are up for challenge, you can configure your own matrix in matrix filter of ffdshow.

Problem 3: Make it sound real

Till now what we have achieved is enough to hear 5.1 Home Theater at work, but wait! ffdshow still has some acts left up its sleeve.
The true purpose to ffdshow's existence is the processing power it has for general audio decoding/encoding.
Generally what makes us understand sound is live or recorded is the presence of sound harmonics(no issue if you aren't getting the term) , basically how multiple audio sources interleave.

This is done by Resample and Crystality filter, which together try to recreate the ORIGINAL studio recording what the musician / singer intended us to listen.
These filters are not bound to the number of audio channels your music file has, so you can simply use for stereo music as well.

NOTE: Keep in mind though it requires decent amount of CPU for processing.
There are some more filters which serve the purpose of even more accurate spatial consistency of sound recreation and perfect volume levels.

Conclusion

The final result is that 5MB of compressed audio is decoded to 200MB of RAW audio, which could have been 50MB of CD audio. So you see the processing quality is 4 TIMES the quality of original, not literally, some of the original signal is lost completely, hence in true sense audio restoration is never 100%. It is actually made up of what the algorithms determines as estimation of actual signal. Unless we have access to original recording, the recording will feel natural and crisp.

Rest assured what we will be enjoying is among the best, we can get for free.
Please follow link to setup Surround Sound.

Wednesday, October 16, 2013

5.1 Surround Experince


When music is associated with everybody's life , why not make it little more Awesome.....


The purpose of this article is to provide general user with a better acoustic experience over the experience of compressed audio playback.
The article will guide you to setup the required software and settings to achieve surround sound from your stereo setup using free and open source software.

DO I REALLY NEED IT ?

The problem at hand is most audio files are Stereo , and even with a dedicated 5.1 Audio system without some investment for upmixing , we are able to hear normal. And for people who don't have a Home Theater system, why to restrict them from Surround experience. A disappointment for both.

After much research, I came up with a solution that not only solves both problem, but also enhances MP3(or any other compressed formal) audio to near ORIGINAL quality.
 
I May not be the best person to answer, if You really Need / Want it.
Simply download and experience it yourself with the sample files
First file is 'Sun Willow' by  Bjorn Lynne in Original Dolby Digital 5.1 format
and the second file is Surround sound version, processed using this guide.

If You really felt the difference, please go ahead with this guide.
Don't worry, if u are not a technical person, this guide is for just for you people.

UPDATE: fixed broken sample file link

 

Stereo and 5.1 Audio

Stereo audio is comprised of two channels basically Left and Right.
The Mp3 files are mostly stereo, but there quality is compromised for achieving lower file size.
-Wikipedia


5.1  ("five point one") is the common name for six channel surround sound multichannel audio systems. 5.1 is now the most commonly used layout in both commercial cinemas and home theaters. It uses five full bandwidth channels and one low-frequency effects channel (the "point one").-Wikipedia

 

Required Software

Now the idea is to upscale the stereo audio to recover quality, lost due to compression.
We are going to do this using ‘ffdshow’, a powerful audio decoder with some additional abilities.
By now you would have started to think of it as another media player, but fact is it is not.
Like in a car there is engine and body covering, here ffdshow works like the engine and for the body cover we would use an actual media player, in this case ‘Media Player Classic-Home Cinema’.

Now installing software is not a rocket science, but doing it right is important for optimal performance. And don’t be scared of installing two different software and managing them. It is already combined and freely distributed under
K-Lite Codec Pack’ .Which means it is the only software we need.

K-Lite Codec Pack download       : http://www.filehippo.com/download_klite_codec_pack/12665/


Configuration file                             : ffdshow_8_8.reg



Detailed installation guide                : K-lite 8.8 setup.docx

UPDATE : links are restored.

Installation

Here comes the tricky part the INSTALLATION, don’t worry this guide is here this purpose only.
Simply follow the instructions in the installation guide.

The setup looks good and will work as well, but the Surround sound is still missing.
To make this task a child’s play all the configurations have been saved in provided file.
Now double click on the ffdshow_8_8.reg file you would have downloaded, keep click yes until below window appears.

And you are now all set to enjoy Surround sound from your audio files.

NOTE:
1.            Close the installer or Media Player Classic before installation.(!! IMPORTANT !!)
2.            In some cases the configuration file may be downloaded as a MP3 file. Solution - rename file and delete ‘.mp3’ extension from filename

 

Final Touch

One size doesn’t fit all, as the saying goes is true for us also. The default setting in file will work fine most PCs.
The configuration adds multiple audio enhancement profiles with varying level of Processor load and audio output.
To access these profiles
Right Click inside the MPC window -> Filters -> ffdshow Audio Decoder -> Properties

You will get a window like screenshot shown below.


 OR

Under your Windows taskbar icons find the ffdshow icon > right click

 
Simply click on the profile name to activate from list.

Profile
CPU load
Description
default
Low
Basic audio enhancement
5.1_Stereo
Low
Converts 5.1 audio for listening over normal speakers
Surround
Low
Basic 5.1 Surround Sound output
Surround-HiFi
Medium
Advanced 5.1 Surround Sound output
Surround-Studio
High
Advanced 5.1 Surround Sound with studio like quality
Earphones
Low
Basic 5.1 Surround Sound output over headphones/speakers
Earphones-HiFi
Medium
Advanced 5.1 Surround Sound output over headphones/speakers
Earphones-Studio
High
Advanced 5.1 Surround Sound with studio like quality over headphones
Night Mode
Low
Subtle music for night ambiance
OFF
NA
No audio enhancement is applied

The profile selected by default is "Earphones-HiFi" and all Earphones profiles are applicable for headphones as well as desktop/laptop speakers.
To preview a profile, click on the name
To apply any profile, double-click the profile name and it appears as in Bold characters.
NOTE :  Surround profile is only applicable for PC with 5.1 audio output.


FOR BEST AUDIO EXPERIENCE 
please Change Audio Sample rate to 24(bit)-96000Khz on your windows system.

 

Test

To check the enhanced audio, play any mp3 file and toggle between 'OFF' and 'Earphones-HiFi' profile.
You can observe Earphones-HiFi will have the following advantages
·        more natural and spacious feel
·        more clarity
·     deeper bass
·        and if you are a keen listener, you can tell the direction of each music instrument played.

 

References

http://ffdshow-tryout.sourceforge.net/
http://www.free-codecs.com/download/k_lite_codec_pack.htm
http://mpc-hc.org/
http://www.lynnemusic.com/surround.html
http://en.wikipedia.org/wiki/5.1_surround_sound
http://forum.doom9.org/showthread.php?t=83752


Concerning Queries

5.1 Home Theater doesn't work ?
HD audio from laptop ?
How to Convert Stereo to 5.1 ?
Why do I hear sound from only 2 speakers ?
How to get surround sound in headphones ?
5.1 Surround music player

Facts :
  • 2 years in making
  • 200+ Hours of research (online & offline)
  • Finding the Ultimate solution
  • And all this shared for FREE...