Skip to main content

Topic: Pro Logic II matrixing? (Read 6163 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • mjkerpan
  • [*]
Pro Logic II matrixing?
I've recently been getting into multichannel music and I've been wondering if it's possible to downwix discrete 5.1 sound to Pro Logic II matrixed stereo. That would allow me to store music on my portable media player and get multichannel playback when I hook it up to a receiver with analog Pro Logic II decoding. Handbrake can do this for video soundtracks, but I don't think that it handles audio files... Any hint?

  • DVDdoug
  • [*][*][*][*][*]
Pro Logic II matrixing?
Reply #1
Quote
Handbrake can do this for video soundtracks, but I don't think that it handles audio files... Any hint?
You might go-ahead and try Handbrake.  If Handbrake will accept the audio file as input and generates an audio/video file with blank video, you can use a demultiplexing tool to strip-out the audio.

I don't know of any free Dolby Surround (Pro Logic) encoders.  And, I didn't know Handbrake could do it.  (The SurCode encoder costs $600 USD!!!!)  I've "faked it" before with phase-inversion and delays, and Audacity has a Hilbert Transform tool (which I haven't tried).  That should work for doing it "manually" (assuming you know how the +90 and -90 degree phase-shifts and level relationships are used to encode the surround channels).

You can get unpredictable results converting discrete 5.1 (or 7.1) to matrix encoding.  Pro Logic (in the movie mode) works by "steering" the sound and if you have multiple sounds coming from multiple directions at the same time, the sounds can be steered to the wrong speakers.    (Dolby recommends monitoring through a Pro Logic decoder while mixing to make sure the decoding and steering is working properly.)     

Regular movie-mode Pro logic Surround is rarely used with music.  There are various Pro Logic Matrix, Music, or Soundfield settings intended to "enhance" regular stereo music rather than "decoding" 5.1 surround.  These modes don't actively steer the sound so the surround effect isn't as "dramatic", but for music they are usually more natural-sounding (and more consistent/predictable).
  • Last Edit: 08 December, 2014, 02:22:05 PM by DVDdoug

  • kudabird
  • [*]
Pro Logic II matrixing?
Reply #2
You could also consider XMedia-Recode which is what I use but I don't have a 5.1 source to hand to double check but I'm sure I recall DPLII downmix option. I expect regardless of your method you will need to demux so I'd suggest MKV container and then use MKVToolNix to extract your audio stream. Both XMedia-Recode and MKVToolNix are available in portable format. Unless Handbrake and/or XMedia-Recode can transcode to your final lossy codec then perhaps downmix to FLAC as an intermediate and convert from there in Foobar.

If you're familiar with AVISynth then the follow function should work. Note that LFE is dropped.

Code: [Select]
Function DownmixDPLII(Clip AudioStream)
{
  Front = GetChannel(AudioStream, 1, 2)
  Center = GetChannel(AudioStream, 3, 3)
  RearLeft = GetChannel(AudioStream, 5)
  RearRight = GetChannel(AudioStream, 6)
  SurroundLeft = MixAudio(RearLeft, RearRight, -0.2818, -0.1627)
  SurroundRight = MixAudio(RearLeft, RearRight, 0.1627, 0.2818)
  SurroundMixed = MergeChannels(SurroundLeft, SurroundRight)
  FrontCenter = MixAudio(Front, Center, 0.3254, 0.2301)
  Return MixAudio(FrontCenter, SurroundMixed, 1.0, 1.0)
}

Actually, EAC3To also has an DPLII downmix option so that would be worth testing as well.

  • mjkerpan
  • [*]
Pro Logic II matrixing?
Reply #3
Looks like eac3to will do the trick. Since it handles FLAC, I'll try ripping one of my DVD-As to FLAC and then downmixing the resulting files. With any luck, I'll report back on results once I have a chance to test out the resulting files on the surround system that I have access to.

  • mjkerpan
  • [*]
Pro Logic II matrixing?
Reply #4
Sorry for the double post, but I figured folks might want an update: I tried out the eac3to method and it worked like a charm. I got Surround Sound out of my Sansa Clip!
  • Last Edit: 10 December, 2014, 10:07:51 PM by mjkerpan

Pro Logic II matrixing?
Reply #5
FYI, you could also accomplish this using FFmpeg:

 
Code: [Select]
ffmpeg.exe -i source.vob -acodec pcm_s16le -ac 2 -af "aresample=matrix_encoding=dplii" output.wav


It should work on all discrete multi-channel audio sources, regardless of codec, as long as they're supported by FFmpeg.


  • Mach-X
  • [*][*][*][*]
Pro Logic II matrixing?
Reply #6
Regular movie-mode Pro logic Surround is rarely used with music.  There are various Pro Logic Matrix, Music, or Soundfield settings intended to "enhance" regular stereo music rather than "decoding" 5.1 surround.  These modes don't actively steer the sound so the surround effect isn't as "dramatic", but for music they are usually more natural-sounding (and more consistent/predictable).


That's not quite correct. Movie mode is actually closer to a straight-up matrix mode than game or music. It does not enhance the surround channels at all. What it DOES do is steer slightly off center midrange audio to the center speaker (voice). Undesirable for music which can sometimes have slightly off center vocals. Desirable for movies because vhs tapes can sometimes have off center dialog due to age/wear and tear, etc.

Music mode allows for soundstage adustment (front/back, as well as center width), and also does NOT force off center vocals to the center speaker. Otherwise same as movie mode.

Game mode is also similar to the others but it ignores the highpass filter used in the other modes and pushes full range audio to the surrounds for a 'more dramatic effect'.

There is no such thing as '5.1' or '2.0' pro logic. Pro Logic is simply the decoder that takes any multichannel source and outputs a specified number of channels. Dolby Surround encoding is no different than stereo encoding for all intents and purposes, although it allows you to put a cool logo on your product. It is two channel no matter what. In fact dolby pro logic can also decode certain types of quadrophonic albums since they work on the same principles. It can also decode Qsound recordings (verified this with Madonna's Immaculate Collection).

There is a lot of serious misunderstanding regarding Dolby Pro Logic. It adds nothing to the sound mix that was not already present. It isn't some type of 'voodoo'. It simply takes a 360 degree stereo mix and steers it appropriately. Just like a hafler circuit (in fact it uses analog servos to steer sounds, no digital processing at all), but a little more sophisticated.

Pro Logic II matrixing?
Reply #7
Downmixing can be tricky.  A good encoder may handle this, but the inverted component of the surround channels will dematrix to the center channel (front).