joshbm
5th October 2004, 04:17
Stereo to 5.1 upmix using DPLII (2nd Ed.)
Originally posted by bleo (http://forum.doom9.org/showthread.php?s=&threadid=57736), Updated by joshbm
Last Updated on October 28, 2004
This Updated Version adds/revises the following:
- Optional LFE channel to the DPLII upmix.
- Eliminates the need for a Hex Editor.
- Allows user to increase bit from 16-bit to 32-bit float.
- Correct channels with channel swapping
- Optional WAVE_EXT header.
- Sample Rate conversion on the fly, +more!
I. Software Required
All software used in this guide is freeware.
InterVideo Processor Fx (full 1.54 MB (http://www.videocdpro.com/josh/ivideopfx.zip), required only 182 KB (http://www.videocdpro.com/josh/ivideoexp.zip)), from InterVideo WinDVD (Trial) (http://www.intervideo.com/)
GraphEdit
ffdshow (http://prdownloads.sourceforge.net/ffdshow/ffdshow-20041012.exe?download) (http://ffdshow.sourceforge.net/)
BeSweet or other multi-channel encoder[/list=1]II. Stereo to 6-Channel Wave
[list=1] Download and install the required software if you have not already. While you are downloading, it might be a good idea to briefly look over Section IV: Other Useful Information and apply changes accordingly. You may want to add 5 seconds of black to your video and 5 seconds of silence to your audio to allow the filter to mute the first ~1.5 seconds. Look at Section IV for more information.
Make sure you run "register.bat" when you unzip GraphEdit and if you downloaded the full or required filters above. It contains filters such as WavDest necessary to this guide.
In GraphEdit go to File > Render Media File... > Open your 2-channel audio file
Clear everything except your stereo 2-channel file as well as "Wave Parser"
Go to Graph > Insert Filters... > DirectShow Filters >
- Click on "InterVideo Audio Processor Fx > Insert Filter"
- Click on "ffdshow Audio Decoder > Insert Filter"
- Click on "WavDest > Insert Filter"
- Click on "File writer > Insert Filter"
* Once you have inserted File writer it will prompt you for a filename. This is your output 6-channel DPLII file.
* DO NOT connect these filters up *yet*!
Setting up ffdshow Audio Decoder.
- Right click on "ffdshow Audio Decoder" > "Filter Properties..."
- Under "Supported Codecs" scroll down to "Uncompressed" (or whichever your input filetype is) and click on Decoder and make sure it is set to "all supported".
- If LFE is desired check "LFE Crossover" and click on it. Set the "Lowpass frequency" to about 120 (or your desired bass range) and set the gain appropriately (mine is at 0db). You may also choose to remove the bass from your incoming channels.
- From this point the channel mapping is as follows:
* Channel 1->"FL"
* Channel 2->"FR"
* Channel 3->"C"
* Channel 4->"LFE"
* Channel 5->"SL"
* Channel 6->"SR"
In order for channel mapping to be correct for most AC3 encoders (including BeSweet), you need to map the channels to:
* Channel 1->"FL"
* Channel 2->"C"
* Channel 3->"FR"
* Channel 4->"SL"
* Channel 5->"SR"
* Channel 6->"LFE"
And thus need to check "Channel Swap" and enter the following:Front left -> front left
Front center -> front right
Front right -> front center
Back left -> LFE
Back center -> back center
Back right -> back left
LFE -> back right- Check "Mixer" and click on it. "Output speakers configuration" should be set to "3/2+LFE 5.1 channels"
- Click "Input/Output" and select all "Allowed sample formats..." and only check one desired "Supported output sample format".
- Some programs do NOT support wave files that are WAVE_EX (like BeSweet's ac3enc!)-- which is what ffdshow outputs! To remove this check: "Don't use WAVEFORMATEXSIBLE header when not needed"
- Click "Apply" then "OK" to exit with changes.
Connect it up similarly to:
stereo.wav > Wave Parser > InterVideo Audio Processor Fx > ffdshow Audio Decoder > WavDest > File writer
Setting up InterVideo Audio Processor Fx.
- Right click on "InterVideo Audio Processor Fx" > "Filter Properties..."
- Set the "Output CH" to "6 SPEAKER"
- Click on the "InterVideo Container DMO" tab.
- Click "InterVideo EXP DMO" under "Available DMOs" and click "Append <---"
- Click OK to exit the settings.
Hit the Play button in GraphEdit and immediately follow by clicking Stop. This is necessary because "InterVideo Audio Processor Fx" filter needs to "initialize".
Change settings in InterVideo Audio Processor Fx.
- Right click on "InterVideo Audio Processor Fx" > "Filter Properties..."
- Click on the "InterVideo EXP DMO" tab.
- Set the "Algorithm" to "ProLogic2"
- Click OK to exit the settings.
Hit the Play button within GraphEdit and wait until it has finished (play button reactivates).
[/list=1]
You now have a 6-Channel wave with LFE, no Hex Editing, channel swapped, at the desired bit-rate, ready for multichannel encoding in AC3, DTS, etc formats.
III. Stereo to 6-Channel AC3 Using ffdshow (ffmpeg's ac3enc)
You can not go to directly ac3 as of *yet*. That is why you must first create a 6ch wav, then run it through an AC3 encoder such as BeSweet (ac3enc from ffmpeg).
Originally posted by Milan Cutka at 2004-10-13 21:46 (http://sourceforge.net/tracker/index.php?func=detail&aid=1043689&group_id=53761&atid=471490)
I added a possibilty to connect ffdshow output directly to file writer and store data to a file. I tested it with ac3 and it produced a valid file.
However, it's still not it 20041012 version. in the next version, which should be ready within a month, or earlier if some serious bug will be found in current build..IV. Other Useful Information[list] WinDVD's filter: InterVideo Processor Fx (using the DPLII upmix) mutes the first ~1.5-2 seconds. A temporary fix would be to add ~1.5+ seconds of black to your video and ~1.5+ seconds of silence to the beginning of your audio (must be an equal amount). This way it will allow the filter to mute the first ~1.5 seconds-- which is silence anyway.
If you do not want WinDVD on your system, but want the filters to remain (InterVideo Processor Fx), then ahgc has a valid solution:Originally posted by Antonio at 2004-10-25 17:46 (http://forum.doom9.org/showthread.php?s=&threadid=84330#post561768)
Just keep graphedit window opened (using "Intervideo Audio Processor FX" filter) and perform normal uninstall of windvd. This way it will not remove the filter (c:\program files\intervideo\common\bin\*). [You will also need to regsvr32 each file.]: I've done this for you, download full 1.54 MB (http://www.videocdpro.com/josh/ivideopfx.zip) or required only 182 KB (http://www.videocdpro.com/josh/ivideoexp.zip) above for only the filters and run "register.bat".
Antonio (ahgc) also has another interesting comment:[i]Originally posted by Antonio at 2004-10-23 03:12 (http://forum.doom9.org/showthread.php?s=&threadid=83384&perpage=20&pagenumber=2#post560830)
[B]1. There is in fact some limitating factor concerning file size (destination), [around 4 GB]. I believe it has to do either with WavDest filter or File Writer filter.
1.1. My solution was to split the source WAV into 2 and run them through graphedit separately. Then join them back toghether. Worked perfectly. UrsaMtl pointed out as well:
Originally posted by ursamtl at 2004-10-25 19:36 (http://forum.doom9.org/showthread.php?s=&threadid=83384&perpage=20&pagenumber=2#post561834)
For those of you upmixing music, you might want to switch to Music mode because the default DPLII Movie mode is optimized (especially in terms of its steering logic) for movie soundtracks with centered dialog. According to Dolby documentation, this may inadvertently center vocals that are intentionally off-center, etc. The other settings such as Panorama, Dimension, Center width control, Autobalance, etc.
For more information on these settings, you can check out Dolby Surround Pro Logic II Decoder Principles of Operation (http://www.dolby.com/assets/pdf/tech_library/209_Dolby_Surround_Pro_Logic_II_Decoder_Principles_of_Operation.pdf). The Dolby Technical Library (http://www.dolby.com/resources/tech_library/index.cfm) has several other informative articles.__________________________________
Of course you can modify ffdshow settings to your liking as well as upmixing methods with Dolby Prologic II in InterVideo Audio Processor Fx such as Movie Mode and Music Mode as UrsaMtl pointed out. Sometimes I like to check "Sample Rate" and change the samplerate from 44100 Khz to 48000 Khz.
[u]Related Threads:
Stereo to AC3 5.1? (http://forum.doom9.org/showthread.php?s=&threadid=84330)
Troubleshooting: If you have *already* gone through this guide and are having problems with setting WAVE_EXT, bit-rate, etc. Make sure the settings in ffdshow are your desired ones and then clear your Graph and create a new one. Sometimes it will take clearing your graph and starting over again to get the graph to work properly.
Regards,
Josh
Originally posted by bleo (http://forum.doom9.org/showthread.php?s=&threadid=57736), Updated by joshbm
Last Updated on October 28, 2004
This Updated Version adds/revises the following:
- Optional LFE channel to the DPLII upmix.
- Eliminates the need for a Hex Editor.
- Allows user to increase bit from 16-bit to 32-bit float.
- Correct channels with channel swapping
- Optional WAVE_EXT header.
- Sample Rate conversion on the fly, +more!
I. Software Required
All software used in this guide is freeware.
InterVideo Processor Fx (full 1.54 MB (http://www.videocdpro.com/josh/ivideopfx.zip), required only 182 KB (http://www.videocdpro.com/josh/ivideoexp.zip)), from InterVideo WinDVD (Trial) (http://www.intervideo.com/)
GraphEdit
ffdshow (http://prdownloads.sourceforge.net/ffdshow/ffdshow-20041012.exe?download) (http://ffdshow.sourceforge.net/)
BeSweet or other multi-channel encoder[/list=1]II. Stereo to 6-Channel Wave
[list=1] Download and install the required software if you have not already. While you are downloading, it might be a good idea to briefly look over Section IV: Other Useful Information and apply changes accordingly. You may want to add 5 seconds of black to your video and 5 seconds of silence to your audio to allow the filter to mute the first ~1.5 seconds. Look at Section IV for more information.
Make sure you run "register.bat" when you unzip GraphEdit and if you downloaded the full or required filters above. It contains filters such as WavDest necessary to this guide.
In GraphEdit go to File > Render Media File... > Open your 2-channel audio file
Clear everything except your stereo 2-channel file as well as "Wave Parser"
Go to Graph > Insert Filters... > DirectShow Filters >
- Click on "InterVideo Audio Processor Fx > Insert Filter"
- Click on "ffdshow Audio Decoder > Insert Filter"
- Click on "WavDest > Insert Filter"
- Click on "File writer > Insert Filter"
* Once you have inserted File writer it will prompt you for a filename. This is your output 6-channel DPLII file.
* DO NOT connect these filters up *yet*!
Setting up ffdshow Audio Decoder.
- Right click on "ffdshow Audio Decoder" > "Filter Properties..."
- Under "Supported Codecs" scroll down to "Uncompressed" (or whichever your input filetype is) and click on Decoder and make sure it is set to "all supported".
- If LFE is desired check "LFE Crossover" and click on it. Set the "Lowpass frequency" to about 120 (or your desired bass range) and set the gain appropriately (mine is at 0db). You may also choose to remove the bass from your incoming channels.
- From this point the channel mapping is as follows:
* Channel 1->"FL"
* Channel 2->"FR"
* Channel 3->"C"
* Channel 4->"LFE"
* Channel 5->"SL"
* Channel 6->"SR"
In order for channel mapping to be correct for most AC3 encoders (including BeSweet), you need to map the channels to:
* Channel 1->"FL"
* Channel 2->"C"
* Channel 3->"FR"
* Channel 4->"SL"
* Channel 5->"SR"
* Channel 6->"LFE"
And thus need to check "Channel Swap" and enter the following:Front left -> front left
Front center -> front right
Front right -> front center
Back left -> LFE
Back center -> back center
Back right -> back left
LFE -> back right- Check "Mixer" and click on it. "Output speakers configuration" should be set to "3/2+LFE 5.1 channels"
- Click "Input/Output" and select all "Allowed sample formats..." and only check one desired "Supported output sample format".
- Some programs do NOT support wave files that are WAVE_EX (like BeSweet's ac3enc!)-- which is what ffdshow outputs! To remove this check: "Don't use WAVEFORMATEXSIBLE header when not needed"
- Click "Apply" then "OK" to exit with changes.
Connect it up similarly to:
stereo.wav > Wave Parser > InterVideo Audio Processor Fx > ffdshow Audio Decoder > WavDest > File writer
Setting up InterVideo Audio Processor Fx.
- Right click on "InterVideo Audio Processor Fx" > "Filter Properties..."
- Set the "Output CH" to "6 SPEAKER"
- Click on the "InterVideo Container DMO" tab.
- Click "InterVideo EXP DMO" under "Available DMOs" and click "Append <---"
- Click OK to exit the settings.
Hit the Play button in GraphEdit and immediately follow by clicking Stop. This is necessary because "InterVideo Audio Processor Fx" filter needs to "initialize".
Change settings in InterVideo Audio Processor Fx.
- Right click on "InterVideo Audio Processor Fx" > "Filter Properties..."
- Click on the "InterVideo EXP DMO" tab.
- Set the "Algorithm" to "ProLogic2"
- Click OK to exit the settings.
Hit the Play button within GraphEdit and wait until it has finished (play button reactivates).
[/list=1]
You now have a 6-Channel wave with LFE, no Hex Editing, channel swapped, at the desired bit-rate, ready for multichannel encoding in AC3, DTS, etc formats.
III. Stereo to 6-Channel AC3 Using ffdshow (ffmpeg's ac3enc)
You can not go to directly ac3 as of *yet*. That is why you must first create a 6ch wav, then run it through an AC3 encoder such as BeSweet (ac3enc from ffmpeg).
Originally posted by Milan Cutka at 2004-10-13 21:46 (http://sourceforge.net/tracker/index.php?func=detail&aid=1043689&group_id=53761&atid=471490)
I added a possibilty to connect ffdshow output directly to file writer and store data to a file. I tested it with ac3 and it produced a valid file.
However, it's still not it 20041012 version. in the next version, which should be ready within a month, or earlier if some serious bug will be found in current build..IV. Other Useful Information[list] WinDVD's filter: InterVideo Processor Fx (using the DPLII upmix) mutes the first ~1.5-2 seconds. A temporary fix would be to add ~1.5+ seconds of black to your video and ~1.5+ seconds of silence to the beginning of your audio (must be an equal amount). This way it will allow the filter to mute the first ~1.5 seconds-- which is silence anyway.
If you do not want WinDVD on your system, but want the filters to remain (InterVideo Processor Fx), then ahgc has a valid solution:Originally posted by Antonio at 2004-10-25 17:46 (http://forum.doom9.org/showthread.php?s=&threadid=84330#post561768)
Just keep graphedit window opened (using "Intervideo Audio Processor FX" filter) and perform normal uninstall of windvd. This way it will not remove the filter (c:\program files\intervideo\common\bin\*). [You will also need to regsvr32 each file.]: I've done this for you, download full 1.54 MB (http://www.videocdpro.com/josh/ivideopfx.zip) or required only 182 KB (http://www.videocdpro.com/josh/ivideoexp.zip) above for only the filters and run "register.bat".
Antonio (ahgc) also has another interesting comment:[i]Originally posted by Antonio at 2004-10-23 03:12 (http://forum.doom9.org/showthread.php?s=&threadid=83384&perpage=20&pagenumber=2#post560830)
[B]1. There is in fact some limitating factor concerning file size (destination), [around 4 GB]. I believe it has to do either with WavDest filter or File Writer filter.
1.1. My solution was to split the source WAV into 2 and run them through graphedit separately. Then join them back toghether. Worked perfectly. UrsaMtl pointed out as well:
Originally posted by ursamtl at 2004-10-25 19:36 (http://forum.doom9.org/showthread.php?s=&threadid=83384&perpage=20&pagenumber=2#post561834)
For those of you upmixing music, you might want to switch to Music mode because the default DPLII Movie mode is optimized (especially in terms of its steering logic) for movie soundtracks with centered dialog. According to Dolby documentation, this may inadvertently center vocals that are intentionally off-center, etc. The other settings such as Panorama, Dimension, Center width control, Autobalance, etc.
For more information on these settings, you can check out Dolby Surround Pro Logic II Decoder Principles of Operation (http://www.dolby.com/assets/pdf/tech_library/209_Dolby_Surround_Pro_Logic_II_Decoder_Principles_of_Operation.pdf). The Dolby Technical Library (http://www.dolby.com/resources/tech_library/index.cfm) has several other informative articles.__________________________________
Of course you can modify ffdshow settings to your liking as well as upmixing methods with Dolby Prologic II in InterVideo Audio Processor Fx such as Movie Mode and Music Mode as UrsaMtl pointed out. Sometimes I like to check "Sample Rate" and change the samplerate from 44100 Khz to 48000 Khz.
[u]Related Threads:
Stereo to AC3 5.1? (http://forum.doom9.org/showthread.php?s=&threadid=84330)
Troubleshooting: If you have *already* gone through this guide and are having problems with setting WAVE_EXT, bit-rate, etc. Make sure the settings in ffdshow are your desired ones and then clear your Graph and create a new one. Sometimes it will take clearing your graph and starting over again to get the graph to work properly.
Regards,
Josh