Log in

View Full Version : GUIDE: Converting stereo to 5.1 surround for FREE


Pages : [1] 2 3

ursamtl
14th January 2006, 19:28
NOTE: THIS GUIDE WAS WRITTEN IN JANUARY 2006. RECENTLY, A NEW VST PLUGIN ADD-ON FOR FOOBAR2000 HAS APPEARED THAT GREATLY SIMPLIFIES THE PROCESS. IF YOU'D LIKE TO TRY IT, CHECK OUT THE FOLLOWING POST. FOR BACKGROUND AND OTHER APPROACHES, YOU CAN ALSO READ THE ORIGINAL GUIDE BELOW.

2007 GUIDE BY TEBASUNA51 (http://forum.doom9.org/showthread.php?p=1011274#post1011274)
2013 GUIDE (http://forum.doom9.org/showthread.php?p=1640451#post1640451)

Many of the stereo-to-surround conversion guides posted in this forum and elsewhere on the internet rely on Plogue Bidule or other VST hosting software such as Steinberg Cubase, Steinberg Nuendo, or Adobe Audition. These are all fine programs but they are not free. Bidule has a time-limited free version but eventually that will run out.
If you can afford Plogue's $75 US for an early bird license, let me say that in my opinion, this is the best value available. You get tremendous value for your money, one of the most interesting, unique and powerful audio programs available today. If you can't afford this, however, there is a way to convert stereo to 5.1 sound and do it for free, using legal software.

There may be other approaches, but this is one I'm proposing.

Here's what you need
V.I Stereo to 5.1 Converter Suite (http://stevethomson.ca/audio/guides/VI_Setup.exe)
Foobar 2000 version 9.0. (http://www.foobar2000.org)
Bridge plugin for winamp DSP plugin (http://pelit.koillismaa.fi/plugins/redir.php?id=682) NEW FOR FOOBAR v0.9x
VST Host Winamp Bridge by Christian Budde (http://www.savioursofsoul.de/Christian/VST/dsp_vst.exe)
MultiFXVST (Optional-for chaining VST effects) French site (http://www.ctaf.free.fr/dokuwiki/doku.php?id=meslogiciels) or Google translation of site (http://translate.google.com/translate?u=http%3A%2F%2Fwww.ctaf.free.fr%2Fdokuwiki%2Fdoku.php%3Fid%3Dmeslogiciels&langpair=fr%7Cen&hl=en&ie=UTF-8&oe=UTF-8&prev=%2Flanguage_tools)
johnman's wavewizard (http://tinyurl.com/d7lqg)

NOTE: THE FOLLOWING GUIDE WAS WRITTEN USING FOOBAR V0.83. THE BASIC PROCEDURE WITH VERSION 0.9 IS ALMOST THE SAME BUT WITH SOME CHANGES. FOR THE BASIC METHOD OF USING THE V.I PLUGINS, READ THE GUIDE BELOW. FOR THE FOOBAR2000 V.9.4 AND HIGHER PROCEDURES, INCLUDING AC3 ENCODING WITH AFTEN, SEE THIS POST (http://forum.doom9.org/showthread.php?p=991707#post991707).

As for why these programs and plugins: Foobar allows a user to right-click and save a 32-bit file to disk as a wave file without having to play it back in real time. Similar to Plogue Bidule's offline mode, this can save a lot of time over VST hosts that can only process while playing a file. Foobar also has built in dithering, limiting, resampling and convolution. Why not Winamp? Because to my knowledge, its diskwriter plugin only saves 16-bit files. If you prefer to use it, go ahead!
Foobar does not support VST plugins, nor does it support Winamp plugins. However, if you add the Bridge plugin for winamp DSP plugin and then in turn use it to load Christian Budde's VST Host Winamp Bridge, you can then host a VST plugin.
If you want to chain more than one VST plugin, you can load MultiFXVST into the VST Host Winamp Bridge. It works! However, for limiting, reverb convolution (impulse responses), resampling and dithering, you can use Foobar itself. Just be sure your settings for writing files have the Use DSP box checked.

Procedure Overview
You will process a stereo file three times, each time using a different V.I companion plugin from the fLfR, CLFE, and sLsR plugins to write processed files to disk. This will create three stereo files. Then you can use wavewizard to create 6 mono files or one 6-channel file for encoding. If you need a freeware 5.1 encoder, wavewizard comes with a free AC3 encoder.

Part 1: Foobar and plugins
Install Foobar. Install all files for both Bridge plugins in Foobar's Component subdirectory. This includes all files such as the msvcr71.dll that comes with the Foobar2WinampPlugin. Important: The installation program for the Winamp VST bridge installs to the Winamp/plugins folder. If you don't have Winamp, let it create and install to that folder anyway and then manually move the dsp_vst.dll file to your Foobar/Component directory.
You can check to be sure the bridge is installed by starting Foobar and pressing Ctrl+P. In the Preferences dialog box,
select Component libraries at the very top of the left tree and find "foo_dsp_Foobar2WinampPlugin.dll."
http://stevethomson.ca/audio/guides/foo-1.gif

Expand the Components branch of the tree on the left and select Diskwriter. Setup Foobar to write 32-bit files by choosing 32 from the Preferred bit depth dropdown list and then check the box next to use DSP in the Processing[b] section.
http://stevethomson.ca/audio/guides/foo-2.gif

Select [b]DSP Manager in the tree on the left. Use the <= and => buttons on the right to move DSPs from the Available DSPs list on the right to the Active DSPs list in the middle. Be sure that the Advanced Limiter DSP is at the very bottom (use the Up and Down buttons to re-arrange the list order.
http://stevethomson.ca/audio/guides/foo-3.gif

Expand the DSP Manager branch of the tree and select Winamp DSP plugin. Select the VST Host DSP v.10 for WinAmp in the middle Plugins pane and Use the On ==> button to move it to the list on the right.
http://stevethomson.ca/audio/guides/foo-4.gif

Click the Show Plugin Interface button if the VST Bridge does not open with the last plugin used in it. If it's the first time it's run, click the space to the right of VST Plugin: and choose Load DLL... from the menu that appears. Navigate to the folder containing the VST plugin dlls you wish to use and select flfR.dll. Adjust set it as desired. Note that you can play a file in Foobar while adjusting. Just move back and forth between the two windows.
http://stevethomson.ca/audio/guides/foo-5.gif

When you're ready to write a processed file, stop Foobar from playing the file. Select the file you wish to process in Foobar, then right click on the stereo file in Foobar and choose Convert to save as a wave file. Name your file in such a way that you can identify it later as the front channels.
http://stevethomson.ca/audio/guides/foo-6.gif

Once this is complete, go to the Bridge window and click the dll name to the right of VST Plugin:. If you cannot find the Bridge window, click the Show Plugin Interface button in Foobar's Preferences dialog box. Load CLFE into the VST bridge and set it as desired.
Right click on stereo file in Foobar and choose Convert to save as a wave file. Name the file so that you can identify it later as the center and LFE channels.
When complete, load sLsR into the VST bridge and set it as desired.
Right click on stereo file in Foobar and choose Convert to save as a wave file. Name the file so that you can identify it later as the rear surround channels.
When finished, go back to the bridge and click the text to the right of VST Plugin: and choose Reset to clear the bridge for the next time it's used.

Part 2: Merging or splitting files
Note: you can use other utilities to combine or split the files. For example, CDP Multi-Channel ToolKit at http://www.bath.ac.uk/~masrwd/mctools.html or Besweet as documented elsewhere in this forum. If you're going to split the files, it's a good idea to combine them first because some encoding programs that require 6 mono files will only work if the files are all the same length.

Here's how to merge or split the files with Wavewizard.
Load the three files into wavewizard.
http://stevethomson.ca/audio/guides/ww-1.gif
Choose Preferences from the Edit menu or press Ctrl+F4. Select the options you want for Stream manipulation according to your encoding software's requirements (1 6-channel file or 6 mono files).
http://stevethomson.ca/audio/guides/ww-2.gif
Choose Conversion Batcher from wavewizard's Edit menu or press Ctrl+F3. Important: Make sure the two boxes are not checked next to Send jobs to batcher and Start batcher when finished. You will use the Conversion Batcher later, but not yet!
http://stevethomson.ca/audio/guides/ww-6.gif
Click the Convert button to carry out the conversion. You should end up with one merged 6-channel file or 6 mono files, depending on the settings you choose in the previous step.

Part 3: Encoding
The subject of this guide is how to end up with a surround sound file using completely free (and legal) software. Unless you own commercial AC3 or DTS encoding software, there are only a couple of options for encoding to AC3 files. One option is to use wavewizard with ac3enc.dll, as I explain here.
Go to the directory where you installed wavewizard and in the ConversionBatcher subdirectory, find and run ConversionBatcher.exe. Click the Configure button and then the Programs 2 tab at the top. You need to set it up with the path of your AC3 encoder.
http://stevethomson.ca/audio/guides/ww-4.gif
Close ConversionBatcher and run wavewizard.
Choose Conversion Batcher from wavewizard's Edit menu or press Ctrl+F3. Choose the AC3 Encoder.dll at the bottom of the dropdown list. Be sure to check both boxes next to Send jobs to batcher and Start batcher when finished.
http://stevethomson.ca/audio/guides/ww-3.gif
IMPORTANT: Choose Channel mapping (F2) from the Edit menu. Be sure that the box for 6 -> 6 Softencode and ac3enc is checked as well as the box for Enable channelmapping. This ensures the final ac3 file will have the right channel order.
http://stevethomson.ca/audio/guides/ww-5.gif
Click OK to apply the channelmapping settings and return to the main window.
Click the Convert button to carry out the conversion.

For now, experiment and see if you can get it to work. I tested on several files and got it to work each time.

An extra bonus: stereo playback enhancement
I might add that the fLfR plugin by itself can enhance stereo playback if you use it by itself and turn the front ambience up near its maximum. This won't give you the full V.I effect, but depending on your source material it can have you looking for speakers that don't exist! :) ).


Happy surrounding!
Steve.

daphy
15th January 2006, 13:58
Hiho,

as you may have noticed: needfulthings (http://dhost.info/needfulthings/index.php) is under construction

Edit: problems solved!

ursamtl
15th January 2006, 14:17
Thanks daphy. I was going to put it on my site this morning until you got needfulthings back up and running. I'll change the link in the guide.

johnman
15th January 2006, 16:00
Thats a really nice guide you made


If you don't have one, use the AC3Enc.dll that came with the program


There isnt any ac3enc.dll included in the ww distribution. IIRC one can be downloaded in the ww thread on this forum.

newhaven
18th January 2006, 07:17
hi all,
may seem like a stupid question. i have installed foo_dsp_Foobar2WinampPlugin.dll in the components directory of foobar. how do i use this to load christians budde's vst host winamp bridge?

thanks for your time--newhaven

ursamtl
18th January 2006, 14:23
No it's a valid question. Be sure you copy Christian's dsp_vst.dll file to the same folder as foo_dsp_Foobar2WinampPlugin.dll, the Foobar2000 Component folder. Then restart Foobar and when you check the DSP Manager in the Properties tree, selecting Winamp DSP Plugin (see step 6 of the guide) should display VST Host DSP v.10 for WinAmp in the left side of the Plugins section of the dialog box. This is Christian Budde's bridge plugin. You just have to activate it and then load a VST dll file. This is because the Foobar2WinampPlugin searches for and lists all Winamp plugins it finds in its directory. A neat trick I've discovered is that if you make a copy of Christian's dsp_vst.dll, rename it to something like dsp_vst_2.dll and load it in the same directory, the Foobar2WinampPlugin lists two instances of it. You can then load activate both and load a different VST into each one!

newhaven
18th January 2006, 15:12
ok,
when i double click on the setup icon for christian's bridge, the install box comes up and states: please select your winamp path below (you will be able to proceed when winamp is detected) (install button in lower right corner is greyed out). for my destination folder, i select the component folder of foobar. the ok button stays greyed out, and i cannot proceed any further?
not sure what i'm doing wrong----i don't have winamp installed on the pc? also in the foobar winamp plugin folder i downloaded is a file called msvcr71.dll.
does this go into the components folder also--i saw no mention in the instructions.
thansk again--newhaven

ursamtl
18th January 2006, 16:56
Actually sorry, it's been awhile since I downloaded and installed Christian's plugin so I forgot that it tries to install to the Winamp/plugins folder. Since I also have Winamp installed, I just let it go ahead and then copied the dsp_vst.dll file manually to my Foobar/Component folder. As for the msvcr71.dll, yes put it in the Foobar/Component folder as well. Thanks for bringing this up. I'll update the guide right away.

Regards,
Steve.

ursamtl
22nd January 2006, 18:03
Just a note to those who downloaded the software and tried this guide, the sLsR v1.0 plugin I released on January 14 contained a problem with reduced ambience. I've fixed this and released version 1.1. I think you'll find this greatly improves the surround field. Check the message at http://forum.doom9.org/showthread.php?p=773084#post773084 for download links.

Regards,
Steve.

newhaven
23rd January 2006, 23:45
steve,
when i start foobar up. i get a pop up console that says: Failed to load DLL: foo_dsp_Foobar2WinampPlugin.dll, reason: Unable to load DLL. I can't get rid of this i have tried uninstalling foobar and putting all the DLL's back in the component folder, but i still get the error message?? any ideas?

thank you--new haven

ursamtl
24th January 2006, 00:31
I haven't seen that error before. When I put the foo_dsp_foobar2WinampPlugin.dll in my Foobar/Component directory, it worked ok.

Anyone else have this problem? You might also check the foobar forum at http://www.hydrogenaudio.org/forums/index.php?act=SF&s=&f=28. I'll let you know if I find anything out.

newhaven
25th January 2006, 16:49
Steve,
i was able to resolve the issue with foobar. the link provided for the winamp plugin above, has 4 selections. 1 of the files contained a third DLL (msvcp71). put this in the components folder and no more problems loading.
i am currently using wavewizard to process the files from your wonderful proggy to 6 monostreams that i want to convert using surcode dvd dts encoder (not using conversion batcher). each of the 6 streams has a 0 & 1 after the title (i.e. center & LFE channels ch0,center & LFE channels ch1, front channels ch0,front channels ch1, rear channels ch0,rear channels ch1)
can you possibly tell me what each ch# properly corresponds with (example--center & LFE channels ch0 is the center channel, front channels ch0 is the front left,rear channels ch0 is the left rear and so on?)
than you for your time! --newhaven

ursamtl
25th January 2006, 18:34
Glad to hear you got the Foobar problem resolved. In Foobar Diskwriter preferences, it's possible to have the program prompt you for a filename by checking the Ask before writing checkbox. This way, you can give you generated files descriptive names. What I used during my tests was adding "flfr" to the end of the filename for the fronts, "clfe" for the centre/lfe and "slsr" for the surrounds. Then you can place them in the order flfr, clfe, slsr in Wavewizard.

Steve.

newhaven
25th January 2006, 22:11
Steve,
i did what you suggested (CLFE,FLFR,SLSR) in foobar originally. my confusion comes when i load the 3 files into wave wizard. i am using a surcode dvd dts encoder----the only way i can load the files in Surcode is by having wavewizard convert the 3 WAV's into 6 mono streams (which Surcode accepts). after converting the 3 WAV's (c&LFE,flfr,slsr) to 6 mono streams i have the following:
c&LFE ch.0
c&LFE ch.1
flfr ch.0
flfr ch.1
slsr ch.0
slsr ch.1

what are the 0's and 1's? (examples: c&LFE ch.0=center
c&LFE ch.1=sub bass & LFE
flfr ch.0= left front
flfr ch.1= right front
slsr ch.0=surround left
slsr ch.1=surround right )
do you know what i listed in the examples is correct ?

thanks again, sorry if i'm a bit "green" at this:sly:
newhaven

ursamtl
25th January 2006, 22:44
These look to be correct, yes. Give them a try.

No need to apologize for being green at this. We all were not so long ago! :)

newhaven
26th January 2006, 02:15
Steve,
thanks for the kindness and patience, but MOST of ALL, THANK YOU FOR THIS GUIDE!!!!!!!! i have successfully used your method twice now, and to say i am pleasantly surprised at the final quality of the product is an understatement . WOW! is more like it.:D :D :D

thanks again, see ya around the forums ---newhaven

ursamtl
26th January 2006, 03:30
Hey I'm happy it's turning out well for you. I continue to be amazed myself with how good these conversions turn out.

Thanks for the feedback.
Steve.

mfsn
13th February 2006, 18:26
I followed the steps of your guide "Converting stereo to 5.1 surround for FREE" and was able to generate the 6-channel WAV file by merging 3 stereo (2 ch) files with wavewizardv0.54b. Then I burned a CD that didn't play at all on my home theater DVD. Could it be a problem with the ac3enc.dll???

How can I create 5.1 WAV files that will play on my DVD using the FREE method??

Thanks.

ursamtl
13th February 2006, 18:46
Go back and recheck everything. I know it took my a few tries before I got the process working correctly. I found it helpful to use CDRWs until I got things working.

One of the most common problems people run into is sampling rate. If you're burning a surround CD, the audio file has to be at a sampling rate of 44.1 kHz. If it's for a DVD soundtrack, it has to be at 48kHz. People often think because a surround CD will be played back on a DVD player, they need to convert to 48kHz. Not so. The other most common problem is the hook-up between the DVD player and the receiver. It has to be a digital SPDIF or optical connection. Once the data goes through the left and right audio connections, it's already been converted to analog.

A surround CD does a sort of "double trickery" on your system. First, it fools your DVD player into thinking it's a regular audio CD by being at 44.1kHz. Then the data going into the decoder has an AC3 identifier embedded, so the decoder thinks it's receiving the audio from a DVD and thus decodes it as such.

You could retrace your steps and save files every step of the way. since you've installed foobar2000 to do this method, you can use it to play back the 6 channel wave file to see if it's making sounds (if you have a 5.1 soundcard/speaker setup, you can use the Directsound of Kernel Streaming outputs in foobar to hear all 6 channels in surround). Foobar also plays back AC3 files, so you can check them as well.

Don't give up. You'll get it!

Regards,
Steve.

mfsn
13th February 2006, 22:22
I have changed the the sampling rate to 44.1 kHz but now when I open the file it looks like an ordinary PCM audio file with the same amplitude/frequency modulations as the original stereo files. Instead, shouldn't I expect to see bursts of data separated by spaces (zeros) when I visualize the file?

ursamtl
13th February 2006, 23:53
I have changed the the sampling rate to 44.1 kHz but now when I open the file it looks like an ordinary PCM audio file with the same amplitude/frequency modulations as the original stereo files. Instead, shouldn't I expect to see bursts of data separated by spaces (zeros) when I visualize the file?

Unless you stretched the data out tremendously in the app you're using to view it, no you shouldn't see spaces. How does the file sound when you play it back?

mfsn
14th February 2006, 16:22
I'm definitely able to create all three WAV files FLFR, CLFE, SLSR in 32-bit floating-point and play them without any problem. Then I run wavewizard on these files and it indicates a successful conversion, generating the merged WAV file.

However, when I open the logging window from the Conversion Batcher checkbox and display the "Jobs log", I get the following message:

Starting CB
***** Starting ac3 encoder dll *****

***** ac3enc.dll is missing or invallid, skipping current job *****


I am using the ac3enc.dll that came with BeSweet and I just copied it into the ..\WAVEWIZARDV0.54B\CONVERSIONBATCHER subdirectory. Any idea why this is happening?

Thanks.

ursamtl
14th February 2006, 17:34
Did you set up the path to ac3enc.dll in wavewizard's configuration?

mfsn
15th February 2006, 16:10
Hey,

I was finally able to encode the 5.1 WAV file from 6 WAV files using BeSweetv1.5b31 with BeLight-0.22beta9 GUI and it worked painlessly. It's very nice too.

I did set up the path to ac3enc.dll correctly in the Wavewizard configuration but I think my old ac3enc.dll had a problem so I just decided to reinstall everything from scratch.

I'm now interested in finding out the formulas to extract FL, FR, C, LFE, SL, and SR channels, I basically know that C=(FL+FR)/2 gives a boost on vocals but don't isolate it totally, perhaps some extra band-pass filtering would help.

For the surround channels, SL=SR=(FL-FR) will cut the vocals out, but the result is not very clean. A 120 Hz low-pass filter for the LFE should be ok, I just don't know what to do with the FL and FR. Keeping them just like the originals doesn't make much sense to me.

Anyway, if someone knows of any good literature on this subject, it would be very helpful.

Thanks a lot.

ursamtl
15th February 2006, 19:53
I'm glad you got it working. It can be a really cool feeling to get these conversions working and discover all the sound information that's seemingly "hidden" in a stereo mix.

As for the formulas, there are no exact rules, but many stereo to surround conversions are based on some sort of manipulation of the sum and difference signals in the stereo signal. In V.I and its related plugins, the formulas are a bit more complex: over 300 connections among software modules, a dozen virtual speaker positions superimposed over an ITU 5.1 layout, bandpass filtering plus phase inversion for Movie Mode, 60Hz lowpass filtering for the LFE channel, and some other stuff.

If you want some references, check the "General Reading and Information" part of the Additional resources (http://forum.doom9.org/showthread.php?p=558760#post558760) section of the guide list. There are some really good resources there. Certainly the Sursound mailing list is a wealth of information.

Enjoy!
Steve.

daphy
16th February 2006, 07:12
I am using the ac3enc.dll that came with BeSweet and I just copied it into the ..\WAVEWIZARDV0.54B\CONVERSIONBATCHER subdirectory. Any idea why this is happening?

wrong version :scared:
see wavewizard thread (http://forum.doom9.org/showpost.php?p=696810&postcount=50) or follow the links at needfulthings (http://dhost.info/needfulthings/index.php) ;)

aichan
16th February 2006, 13:38
nice guide, stereo to surround for free.. :)

stars
27th February 2006, 19:59
i think there must be a fault somewhere in the final ac3 encoding
the sound channels have the woring order and cant be re mapped.
And the settings for the ac3.dll cant be changed...
I ended up with converting the audio into 6 mono channels and do the final encodning with besweet....

stars....

ursamtl
28th February 2006, 00:08
You're right. However, if you use wavewizard with the correct configurations for ac3enc.dll, it should take care of that for you.

johnman
28th February 2006, 18:00
"I am using the ac3enc.dll that came with BeSweet and I just copied it into the ..\WAVEWIZARDV0.54B\CONVERSIONBATCHER subdirectory. Any idea why this is happening?"

Wavewizard is only tested with ONE version of ac3enc. I also have had problems once with ac3enc which was supplied with a particular version of headac3he which somehow did not work. I asked DA and he gave me a newer version which can be downloaded from the ww thread here on doom9.

I know it would be more easy if the ac3enc was downloadable from within CB but for a couple of reasons i cant do it unfortunatly. Once i get the okay from DA i willl host it myself immediately.

johnman
28th February 2006, 18:05
http://forum.doom9.org/showpost.php?p=696810&postcount=49

link to the ac3enc

stars
28th February 2006, 20:03
You're right. However, if you use wavewizard with the correct configurations for ac3enc.dll, it should take care of that for you.


do you the mean the options in the channel mapping menu..:)

i will config for ac3enc and give it a try....

stars.....

tebasuna51
1st March 2006, 04:23
@ursamtl
I think your method to encode with WaveWizard-ac3enc need this correction:

4. Choose Conversion Batcher from the Edit menu and uncheck Sends Jobs to Batcher.

5. Click the Convert button to obtain a wav 6 channels Surround test 4 fLfR_Merge.wav (with channels in correct wav order).

6. Clear_List and load the wav 6 Surround test 4 fLfR_Merge.wav. Now you need:
- Edit menu Channel Mapping, select ac3 order for SoftEncode or ac3enc
- Edit menu Preferences, check Enable Channelmapping and uncheck Stream manipulation.
-Edit menu Conversion Batcher and check Sends Jobs to Batcher and Start batcher when finished.

7. Click the Convert button to obtain the encoded ac3.

@Johnman
Seems that Stream manipulation and Channelmapping don't work together, the merged file in pass 5 is always in correct wav order with Channel mapping enabled or disabled.

ursamtl
2nd March 2006, 01:24
tebasuna51,

Thanks for the feedback. I'll check it out but I did test the guide as it's written and the resulting surround files all had the same correct channel order as well. You might double-check your settings from the beginning, perhaps there's something you did differently earlier on that made it necessary for you to modify the method at the end to get good results.

Regards,
Steve.

tebasuna51
2nd March 2006, 02:15
@ursamtl
If you load into WaweWizard:
Test_fLfR.wav
Test_CLFE.wav
Test_sLsR.wav
when you click Convert, WaveWizard make a intermediate wav 6 file with correct wav order FL_FR_C_LFE_SL_SR, and is send to ac3enc, but ac3enc need a wav ordered FL_C_FR_SL_SR_LFE then only the FL channel is in the correct place.

Maybe Johnman can confirm you this issue.

ursamtl
3rd March 2006, 01:02
Ok, thanks for bringing this up tebasuna51. In fact, after testing this evening, I discovered that I had forgotten to add the step about enabling channelmapping to my guide. Do not disable sending the jobs tro the batcher as you suggest. Simply choose Channel mapping (F2) from the Edit menu. Be sure that the box for "6 -> 6 Softencode and ac3enc" is checked as well as the box for "Enable channelmapping." This ensures the final ac3 file will have the right channel order. I tested this with three stereo waves loaded into ww in the ITU 5.1 order (fLfR, CLFE, sLsR) and the resulting ac3enc-encoded ac3 file had the right channel order when I played it back through a 5.1 system. I've edited the guide and added a new screen grab.

Thanks for your help.

Regards,
Steve.

tebasuna51
3rd March 2006, 02:24
Simply choose Channel mapping (F2) from the Edit menu. Be sure that the box for "6 -> 6 Softencode and ac3enc" is checked as well as the box for "Enable channelmapping." This ensures the final ac3 file will have the right channel order.
Yes, I tried this first time, but don't work for me.

In my previous post I say to Johnman:
"Seems that Stream manipulation and Channelmapping don't work together, the merged file in pass 5 is always in correct wav order with Channel mapping enabled or disabled."

For that I think we need 2 pass, first generate the wav 6 (always in correct wav order), and after open this wav 6, apply the remapping and encode.

Sorry.:)

ursamtl
3rd March 2006, 13:45
Yes, I tried this first time, but don't work for me.

In my previous post I say to Johnman:
"Seems that Stream manipulation and Channelmapping don't work together, the merged file in pass 5 is always in correct wav order with Channel mapping enabled or disabled."

For that I think we need 2 pass, first generate the wav 6 (always in correct wav order), and after open this wav 6, apply the remapping and encode.

Sorry.:)

2 passes is exactly what it does for me. First it create the merged file, then it sends it to Conversion Batcher.; If you set it up the way I explain in the guide, you will end up with a correctly encoded AC3 file.

Perhaps the problem is that you are looking at the merged file and expecting it to be in the remapped order. It is not. Only when it gets passed to the encoder does the channel remapping take place. If you take the merged file and try to encode it yourself manually, you will end up with the wrong channel order in your AC3s. If you let ww take care of it for you, it will do the necessary remapping. This is one reason why I like johnman's wavewizard so much. I've used it on quite a few projects and it has never let me down!

Keep trying!
Steve.

tebasuna51
5th March 2006, 12:25
Perhaps the problem is that you are looking at the merged file and expecting it to be in the remapped order. It is not. Only when it gets passed to the encoder does the channel remapping take place. If you take the merged file and try to encode it yourself manually, you will end up with the wrong channel order in your AC3s. If you let ww take care of it for you, it will do the necessary remapping. This is one reason why I like johnman's wavewizard so much. I've used it on quite a few projects and it has never let me down!
Yes, I like wavewizard so much too. The remapping function "6 -> 6 ac3 order for SoftEncode or ac3enc" (and other issues about SoftEncode) is my very little contribution to Johnman's project.

But, seems you don't understand the wavewizard behavior :). Wavewizard don't work sending to ac3enc the wav file in pipe mode, need always a intermediate wav file to send to encoder. And, if the last merged file is in wav order, the ac3 output is wrong mapped.

I know work in pipe mode is in Johnman's mind, but AFAIK the last beta version 0.54b don't still work so. I test this (including the last ac3enc.dll from this post) with a channel_test and can confirm you: if the last wav is not ordered FL_C_FR_SL_SR_LFE, the ac3 output is wrong mapped.

In order to avoid disk usage (the two wav6 32bit can be really big) I can propose another method using BeHappy (pipe mode) to encode the three wav (lFlR, CLFE and sLsR) to ac3 with the free encoder ffmpeg (equivalent to ac3enc).

I know, is not a easy way because BeHappy is in developing stage, but can be useful for somebody:

Software required
- Avisynth 2.5.6a (http://www.avisynth.org/) installed.
- BeHappy: (http://workspaces.gotdotnet.com/behappy)Download last version and unzip to a folder at your choice.
- ffmpeg: (http://kurtnoise.free.fr/ffmpeg.7z)Unzip ffmpeg.exe to BeHappy folder.
- ffdshow installed and properly configurated: Audio Decoder -> Codecs -> Uncompressed -> All supported (to open 32bit float from avisynth with DirectShowSource). Check also filters and output configuration.
- AvsSource.extension: You need create a new file in BeHappy folder with the name "AvsSource.extension" and content (copy and paste to Notepad for instance):
<?xml version="1.0"?>
<BeHappy.Extension xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://workspaces.gotdotnet.com/behappy">
<AudioSource Name="AvsSource" UniqueID="0aa78710-aafd-11da-a746-0800200c9a66">
<Script>Import("{0}")</Script>
<SupportedFileExtension>avs</SupportedFileExtension>
</AudioSource>
</BeHappy.Extension>

For other BeHappy usage you can read Basic Help for BeHappy (http://forum.doom9.org/showthread.php?p=779783) or BeHappy development (http://forum.doom9.org/showthread.php?t=104686)

BeHappy usage to encode 3 stereo wav (fLfR, CLFE and sLsR) to ac3 with ffmpeg.
1) You need make a avs file, (YourName.avs) with the content (put your exact path and filenames):
flfr = DirectShowSource("g:\Test fLfR.wav")
clfe = DirectShowSource("g:\Test CLFE.wav")
slsr = DirectShowSource("g:\Test sLsR.wav")
MergeChannels(flfr, clfe, slsr)

2) Run BeHappy.exe and open (in Source section) YourName.avs. Check the source mode is "AvsSource"

3) Select the Destination method "ffmpeg AC3" and configure (Button "...") the desired bitrate. Select the Destination filename and press Add to Job Control.

4) Go to Job Control tab and press Start.

ursamtl
5th March 2006, 16:18
Ok thanks again for your input. You're right. The channel order was wrong when running ww with both the merging and encoding at the same time. I was using a regular 6-channel V.I-processed version of one song to test. It was difficult to really ascertain where the channels went because the ambience still seemed quite good. I did some testing this morning with completely separate songs in each channel and this way, I confirmed the channel orders. I've rewritten the guide to split the job into two passes manually. This should do the trick.

Your Avisynth, BeHappy & ffmpeg approach looks good; I'll give it a try. Another option that could work well is HeadAc3He using the latest alpha version available on daphy and @ndy's www.needfulthings.com. This includes a modified version of ac3enc.dll that seems to solve the problem with low volume that's plagued the regular ac3enc.dll that's been used with Besweet and ffmpeg. I'll try and write a guide for it sometime soon as well.

Regards,
Steve.

dimzon
5th March 2006, 17:48
This includes a modified version of ac3enc.dll that seems to solve the problem with low volume

Is it possible to apply same modification to regular ffmpeg???

tebasuna51
5th March 2006, 19:34
Is it possible to apply same modification to regular ffmpeg???
I think all recent ac3enc.dll (for BeSweet, for WaveWizard) are similar to ac3enc.dll from HeadAC3he v0.24-a13 by Dark Avenger 15.12.2004. Also ffmpeg do the same volume output (50%) like the dll's.

But only HeadAC3he have a parameter "Gain" send and applied for the dll. Then if we have a source normalized 100% and put 6 dB (x2) Gain the ac3 output go to 100% also.

Then the possible midification is only multiply by 2 the signal at the correct point.

dimzon
5th March 2006, 20:40
I think all recent ac3enc.dll (for BeSweet, for WaveWizard) are similar to ac3enc.dll from HeadAC3he v0.24-a13 by Dark Avenger 15.12.2004. Also ffmpeg do the same volume output (50%) like the dll's.

But only HeadAC3he have a parameter "Gain" send and applied for the dll. Then if we have a source normalized 100% and put 6 dB (x2) Gain the ac3 output go to 100% also.

Then the possible midification is only multiply by 2 the signal at the correct point.
Can You create feature request @ ffmpeg development site? (your english is much more better)
http://sourceforge.net/projects/ffmpeg/

tebasuna51
6th March 2006, 04:54
Can You create feature request @ ffmpeg development site?
Done.

ursamtl
15th April 2006, 22:15
Just thought I'd let everyone whose following the thread know that I've tried testing this guide with Foobar v0.9 (which is now the only one available on the Foobar web site) but v0.9 does not support most v0.8x plugins, including the ones mentioned above. Fortunately, those who don't have v0.83 can still find it at Really Rare Wares (link in the guide). Too bad, there are a lot of great plugins that won't work in the new version.

Betchin
24th April 2006, 20:40
I don't get something, Can someone Explain the part of installing the bride plugins in foobar. And where can I get that foobar2winampplugin??? I do not really get that part :(

ursamtl
25th April 2006, 13:01
I don't get something, Can someone Explain the part of installing the bride plugins in foobar. And where can I get that foobar2winampplugin??? I do not really get that part :(

It's quite simple. In the directory where you install foobar, there's a subdirectory called Components. Simply put the bridge plugin files in there then restart foobar. As for the files themselves, the links are in this (http://forum.doom9.org/showthread.php?p=768141#post768141) message. Be sure to use foobar v0.83 only. Don't use v0.9; it won't work).

Give these a try and if you can't get things to work, let us know and we'll try and get you up and running.

Good luck!
Steve.

Betchin
25th April 2006, 13:36
I don't want to doublepost but figured out what I did wrong now (I confused the vstplugin with the dsp). Though there is one slight problem...the bridge plugin winamp dsp is not a valid link. It immediately refers me to some .txt
and I have tried to search it up on google though without any results ... :(

ursamtl
25th April 2006, 18:01
The author seems to be rewriting it for v0.9 and has taken the old version down in the meantime. I don't have the file on my computer right now as I'm at work. Perhaps someone else might send it to you. Otherwise, try Googling a bit more. Some of those asian sites may have it for download. Try clicking on the Google "Translate this page" link. In the meantime, I'm working on another totally free way to produce these surround files using the V.I algorithm. It'll be much simpler than this guide (only 1 step) and will produce the same results. Just give me some time to put a couple of things together and you'll have it.

Regards,
Steve.

Betchin
29th April 2006, 13:03
that would be really nice ! Could you keep us up with the information when you have finished it xD?

I think this is one hard way to convert stereo to surround. I was looking over the internet for some other solutions but found none.

I wish u luck with your work !