logo Sign In

Doctor M's Stereo to 5.1+ Dolby Prologic II Upmix Guide

Author
Time
 (Edited)

2.0 to 5.1+ Dolby Prologic II Upmix Guide

Sometimes you want to upmix Dolby 2.0 or PCM to more channels.  Sometimes you may have an mp3 file or audio CD with content you want to add to an edit you are working on, but you don't want to work in stereo.

This guide will help you do that.

The best part is dialog will be in the center speaker and reduced or removed from your other channels, rear channels will have ambience and your subwoofer should kick a little.


Software needed:

ffdshow (http://sourceforge.net/projects/ffdshow-tryout/files/) is a DirectShow filter that supports pretty much any audio/video format you can imagine.  It's constantly being updated, so grab the latest version.
This guide was tested with Beta 7 revision 3154.  Other versions may or may not work as well.

GraphStudio (http://blog.monogram.sk/janos/tools/monogram-graphstudio/ is a fork of GraphEdit.  While there is nothing wrong with the original, as far as I know it hasn't been updated in almost a decade.

The Method:

0) Rip your audio source to your computer.  I hope you know how.

Install ffdshow and unpack GraphStudio.
Your source audio file can be just about anything as long as you can play it in a directshow player.

You should not need to set up ffdshow as the audio decoder for your source file, we won't be using that component.

1) Start GraphStudio, select file/render media file.  Find your source audio and open it.

2) You will now see a graph that shows how the decoding components are chained together.  Delete "Default Directshow Device" box by selecting it and hitting the "Delete" key.  If "ffdshow Audio Decoder" is present, delete that as well.

3) Select Graph/Insert Filter.
Select "ffdshow Audio Processor", and click insert.
Select "File Writer", and click insert.
You will be prompted for a location to save your file.  Find a directory with enough space and make sure your file ends in .ac3.
Click the 'X' at the top of the window to close the filter selection screen.

4) Double click "ffdshow audio processor".
(Except for the options below, all other filters in the left column should be unchecked.)

If your source is a flavor of Dolby to start with, click "Decoder Options" on the left and uncheck "Apply dynamic range compression if available" on the right.

In the left column select "Dolby Decoder".  On the right:
Check "Apply Dolby Pro Logic II decoding to all stereo sources".  The default 'Rear channel delay' is 20ms.  You can adjust it if you want.

On the left click "Volume".  On the right:
Click the check box for "Volume".
Move the "Master volume" slider to 50%.

You might need the volume even lower.  Since the center channel will be louder than your left/right channels currently are, you must soften the volume or you will overdrive the sound and it will clip.

If the source was not originally DVD (CD, mp3, etc.) try 25% first.

If your source is not DVD, click "Resample" on the left. On the right:
Check "Resample"
"Resample to" select 48000 Hz.
"Mode" select "libavcodec highest quality".
Check "Resample always".

On the left, click "LFE Crossover".  One the right:
120Hz is a good lowpass frequency.  You may want to experiment.

If you want more subwoofer activity, you can adjust your gain, otherwise set it to 0db.

If you want you can remove the crossed-over audio from the rest of your channels, but it's not necessary.

On the left click "Mixer".  On the right:
Check "Mixer".
Set the "Output speaker configuration" as desired.
"3/0/2 - 5 Channels" and checking "LFE" will give you DD5.1.
"3/2/1 - 6 Channels" with LFE is DD6.1 EX
"3/2/2 - 7 Channels" with LFE is DD7.1 EX
You get the idea. You can go lower, or have no LFE as desired.

Everything else should be unchecked.

The "Custom Matrix" is good if you want to do some custom audio mixes.  Say you want only the dialog channel, you can output the center and leave the rest blank.  Or say you want all the audio WITHOUT the center channel... you can do that too.

On the left click "Output". On the right uncheck everything except:
"Supported output sample formats", check (S/PDIF encode mode) & select your "Bitrate" as desired.

448 is good for 5.1, 384 is acceptable if you want to save space, 640 is acceptable but extreme.

Check "Allow direct-to-file output".

5) Your source file box should already be connected to a decoder of some sort (it will vary by source).  Find the last filter in the chain and using your mouse, drag from the out/output tab of that filter to the 'In' on the 'ffdshow Audio Processor'.  An arrow should appear connecting them.

Additional filters may be automatically added.  That's fine, just make sure they don't have strange settings that will interfere.  If 'ffdshow Audio Decoder" has been added to the chain, go into the options (double click) and clear every checkbox (especially the mixer & Decoder Options).  If the audio is pre-processed it may not upmix properly.

Drag a line from the 'Out' of 'ffdshow Audio Processor' to the 'In' of your output file (the box will be whatever you named it).

6) Click the |> (play arrow) at the top.  It will grey out.  Wait until it reappears.

You should have a file to your specifications just where you wanted it.  Give it a listen, you may need to make tweaks and try again.

Notes:

If there is interest, I may revisit this guide with info on outputting wave audio for encoding with 3rd party encoders (like Soft Encode or DTS).  You can also use PowerDVD in a similar manner to access their official DPL2 decoder and DTS Neo:6.

The Doom9 guide can give you additional (if out of date) information. http://forum.doom9.org/showthread.php?t=83384

Are screenshots needed?

5/18/2010 by Doctor M
Please do not repost this on other forums... at least until we've worked the bugs out.

Dr. M

Author
Time

(also reserved)

Let me know how your results turn out.

Dr. M

Author
Time

Thanks Dr M for this, and hell yea screen shots would be great, if it is not to much trouble.

Thanks again

Author
Time

Hey Dr. M were you gonna add some screens to this baby?

Author
Time
 (Edited)

Doctor M said:

Um, maybe?

Sorry man, just responding to your,

"Are screenshots needed?"

screens are always good, especially for people doing this for the first time.

Author
Time

I was upmixing some stuff today and my own guide wasn't working.

Here are somethings I ran into:

AC3 file wouldn't load.  I have no idea why, it might be that I need AC3.ACM updated or something, but GraphStudio threw an error.

The older version of the program GraphEdit had no issues.  I opted to decode the 2.0 DD to WAV via BeLight (BeSweet).  GraphStudio was fine with .wav audio.

The outputted AC3 file was unplayable.  I finally checked the file with DelayCut (an AC3 file fixer) and pretty much the entire thing was frame errors.  Once corrected the file played just fine.

The reason: newer versions of ffdshow encode improperly.  The last "stable version", Beta7, while fairly old does produce errorless output.

So you may have to downgrade your ffdshow to make this work.  I'll see if I can let the authors of the software know.

Dr. M

Author
Time

Thanks for the heads up DrM, I bet that is why jdobbs uses an old version of ffdshow for BD-Rebuilder, I have not run into any of the errors you had, probably because I have an old version installed for BD-RB.

Author
Time

Welllll, after a friendly chat with the ffdshow folks, our problem is a feature not a bug. ;-)

They tell me that the AC3 is in a S/PDIF wrapper and the files plays back fine if you use AC3Filter.  Just not with ffdshow(?)

They did ask me to see if I could figure at what version the change was made, so they MAY fix the problem (unless for some reason it is necessary for people that actually use that feature for what it was intended).

Anyway, on the bright side there is a work around for the newest builds that involves an extra filter and the extra step of creating a 5.1 (or however many channel) wave file and then using your favorite DD encoder on it.

On the up side, it gives MAJOR flexibility to the guide to allow for more modern forms of DD, DTS and/or lossless tracks.  (Which I suppose I could have included in the guide earlier).

I can't see asking people to install a 2009 build of ffdshow just for upmixing, so I'll give the ffdshow devs a chance to fix things.  If that doesn't pan out this guide will get overhauled.  (Probably with screenshots.)

@dark_jedi - I think jdobbs' reason might be that Beta7 is the most recent 'official' stable build of ffdshow.  The rest are test builds.

Yeah, it's been quite a while since the last official release.

Dr. M

Author
Time

Well so far the above works well for me, but as I said it is probably because I am using the ffdshow that is required for BD-RB, but if and when you update the post, please let me know so I can copy your version 1 guide first, then grab the new, can't get enough guides LOL.

Thanks DrM

Author
Time

Very nice guide, thanks Doctor M.  I would also think it's safe to say that when dealing with audio that one should try to have the best audio quality available as a source for doing these things.....I mean, you just can't polish a turd no matter how you paint it.....LOL

:) 

Author
Time

True, but this is a frequently asked question by editors and preservationists.

Deleted content is frequently not DD5.1.  Non-DVD sourced audio can be very high quality but 2-channels is the medium's limit.

Most automatic upmix procedures can produce poorly localized dialog and other unpleasant side effects.

So sometimes, yeah, even really bad sources need to be upmixed.

Dr. M

Author
Time

So would it be safe to think that one wanting to do this using various sources (i.e. deleted scenes and such) should probably try use matching audio source quality to keep the output as consistent as possible?

 

Author
Time
 (Edited)

Jetrell Fo said:

So would it be safe to think that one wanting to do this using various sources (i.e. deleted scenes and such) should probably try use matching audio source quality to keep the output as consistent as possible?

 

Holy Cow! it is not rocket Science, deleted scenes are not going to be as good of quality as the movie source, but when the movie source is 5.1 and the deleted scene is 2.0 this guide will show you how to make that crappy 2.0 into an acceptable 5.1 to mix into your edit, that is ALL this guide does, no more, no less.

And it is NOT about polishing a turd as you put it, it is about keeping an edit predominantly true 5.1, which would probably be about 99% of the edit, aside from the upmixed deleted scenes, and OBVIOUSLY you want to use the best source you can, but when it comes to deleted scenes you are at the mercy of what is available to you, are you not?

Author
Time
 (Edited)

Doctor M said:

Sigh.  Don't feed the trolls.

Sorry DrM, but you are absolutely right, but it just seemed to me like he was somewhat bashing your guide, and that is just uncalled for, this is a GREAT guide, and very helpful, if you take the time and learn how to use it.

1 more thing, it is FAR better to have the deleted scenes upmixed to 5.1, than do downgrade the entire audio to 2.0, now that is just plain stupid if you ask me, make the WHOLE movie suffer because you can't upmix a few small sections of film.

Author
Time

ffdshow devs tell me the problem is fixed in rev 3835.  When that's actually released I'll give it a try.

They also suggested that ffdshow may not be the most suitable program to use in this manner.

Unfortunately, they closed the bug report so I can't reply to get specifics why they said that.

It's has me still considering rewriting to go to lossless 5.1 in this guide, but it's just a much bigger pain.

5.1 wave is an awkward format, the channel order is different from DD 5.1 so you have to re-arrange the channels, it takes an extra link in GraphStudio and an extra step to encode the final output.

If anyone following this thread has specific knowledge why ffdshow isn't a good Dolby encoder, I'd like to find out more.

Dr. M

Author
Time

Doctor M said:

If anyone following this thread has specific knowledge why ffdshow isn't a good Dolby encoder, I'd like to find out more.

Maybe this question would be better asked at Doom9.

Author
Time
 (Edited)

Is it possible that, instead of encoding to ac3, the output would be 6 (or 7, or 8) mono wav files?

[EDIT]: Having tried a lot to get it right, I just end up with an ac3 file with FL, FR, LFE and three empty channels. Something doesn't work here. I'm using the latest version of ffdshow...

[EDIT 2]: I got it. ac3filter needed some tinkering first...

Author
Time

TK-949 said:

Is it possible that, instead of encoding to ac3, the output would be 6 (or 7, or 8) mono wav files?

[EDIT]: Having tried a lot to get it right, I just end up with an ac3 file with FL, FR, LFE and three empty channels. Something doesn't work here. I'm using the latest version of ffdshow...

[EDIT 2]: I got it. ac3filter needed some tinkering first...

Honestly, I've been on the fence with this.

Doom9's original guide (which is sadly out of date) outputs to mono wav files and then lets you re-encode with your software of choice.

The advantage is you can then do DTS or more modern flavors of encoding.  Also it wouldn't matter what version of ffdshow you are using.

Besides, I've got to assume that ffdshow's on the fly encoder can't be nearly as good quality as dedicated encoders.

I think I may write an appendix that explains that method.

Also, you shouldn't need ac3filter at all.

Dr. M

Author
Time
 (Edited)

Hey DrM just curious if you were planning any more updates to this whether it be with better methods, updated software, and you mentioned adding screens?

Thanks

edit - actually thinking on it I think it would be great to have both your guides updated complete with screens and have a downloadable pdf version to use when offline, but that is just me lol, anything you could do would be great.

Author
Time

I wouldn't know where to start with a pdf version.  But yeah, both guides do need an update.


I was trying to talk the author of eac3to into adding dpl2 upmix to his program so it would all be one step and this guide would be pointless.

Other people weren't exactly clamoring for it so I wouldn't hold my breath.  It's a bit of a shame since eac3to pretty much can do everything else.

Dr. M

Author
Time
 (Edited)

Well I know I would just love an updated version DrM so if you can this would be great and with screens, I will figure out how to take your info and create an offline pdf file for sharing, but hopefully you will update all programs, or maybe I am not updated lol, I know some of the options you mention I did not see on my program, like this one,

"On the left click "Output". On the right uncheck everything except:
"Supported output sample formats", check (S/PDIF encode mode) & select your "Bitrate" as desired."

Thanks DrM and looking forward to what you do here, and as I said, maybe I need to update on my end lol, but to this day I still use this, hell I just now created a custom DD 5.1 track for my Fright Night 2 BD, so thank you.

Author
Time

Hi Dr. M

 

I have followed your guide and created the following configuration , with minor tweaks for stereo/5.1 audio playback on MPC-HC .

ffdshow decoder configuration registry file :[url]https://docs.google.com/file/d/0B0VPdRXBFmzqWE9vUnBsT2YyczA/edit?usp=sharing[/url]

Requesting a small review of the settings, if the restored MP3 audio is close to original CD quality.

You are most welcome to provide any tweaks.

 

Kushal

"Music rediscovered..."