Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > (HD) DVD, Blu-ray & (S)VCD > (HD) DVD & Blu-ray authoring

Reply
 
Thread Tools Search this Thread Display Modes
Old 11th March 2007, 01:37   #981  |  Link
drmpeg
Registered User
 
Join Date: Jan 2003
Location: Silicon Valley
Posts: 455
Quote:
Originally Posted by zgx View Post
Perfect lossless LPCM 5.1 to FLAC conversion
Excellent! Although 6-channel (3/2+lfe) is the most common format on current discs, here's the channel mapping for all the LPCM formats:
Code:
mono     M1    X
stereo   L     R
3/0      L     R    C    X
2/1      L     R    S    X
3/1      L     R    C    S
2/2      L     R    LS   RS
3/2      L     R    C    LS    RS    X
3/2+lfe  L     R    C    LS    RS    lfe
3/4      L     R    C    LS    Rls   Rrs  RS   X
3/4+lfe  L     R    C    LS    Rls   Rrs  RS   lfe
X = zero samples, Rls = Rear left surround, Rrs= Rear right surround

Ron
__________________
HD MPEG-2 Test Patterns http://www.w6rz.net
drmpeg is offline   Reply With Quote
Old 11th March 2007, 02:28   #982  |  Link
Rectal Prolapse
Registered User
 
Join Date: Mar 2005
Posts: 433
Strange - when I play back a WAV in MediaCoder, the center speaker track is sent to the Rear Left speaker! I hope this doesn't screw up encoded audio either.

Anyways - I took a DD+ track from an HD-DVD, passed it to Sonic Audio Decoder 4.2 and Dump. Then I took the resulting WAV file and ran it through Sox, then I ran WaveWizard with the channels remapped as suggested. I hope this is the right procedure for HD-DVD DD+ files?

Anyways, I will be doing some tests tonight...

EDIT: Remapping the channels appears to be a BAD idea! There is no need to remap with WaveWizard it appears, in my testing.

Last edited by Rectal Prolapse; 11th March 2007 at 03:35.
Rectal Prolapse is offline   Reply With Quote
Old 11th March 2007, 02:50   #983  |  Link
Rectal Prolapse
Registered User
 
Join Date: Mar 2005
Posts: 433
Hmmm I think I've run into a snag - if the WAVs are 24 bit and encoded into FLAC, the filters I have seem to choke on it. Maybe this only works if you downconvert to 16 bit first?
Rectal Prolapse is offline   Reply With Quote
Old 11th March 2007, 03:23   #984  |  Link
Chumbo
Registered User
 
Chumbo's Avatar
 
Join Date: Feb 2005
Posts: 585
Quote:
Originally Posted by madshi View Post
Do you mean "DTS/AC3/DD+ Source -> Sonic Audio Decoder 4.2 -> AC3Filter -> Dump"? No, I've not tried that yet. Is there a specific reason why you prefer AC3Filter over ffdshow?
Yep, exactly. I've always just used it because it's been solid and I've had no issues. It's also real easy to configure on the fly. I mentioned it because you said you had a problem with a specific version of ffdshow right? I figured AC3Filter may be a good alternative.
__________________
Chumbo
Chumbo is offline   Reply With Quote
Old 11th March 2007, 03:31   #985  |  Link
Rectal Prolapse
Registered User
 
Join Date: Mar 2005
Posts: 433
I can play back FLAC files in GraphEdit now. I had to install the oggcodecs. More details here:

http://forum.inmatrix.com/index.php?showtopic=4959
Rectal Prolapse is offline   Reply With Quote
Old 11th March 2007, 04:25   #986  |  Link
Rectal Prolapse
Registered User
 
Join Date: Mar 2005
Posts: 433
Okay, I think I got FLAC working with HD-DVDs' DD+ soundtracks. Again, many thanks zgx for the guide.

1) Use EVOdemux.exe to demux the desired DD+ audio track.
2) Use EVOdemux.exe to rebuild an EVO that ONLY contains the desired video stream.
3) Use the previously posted instructions to create an MKV file, using GraphEdit, Haali Media Splitter, and Haali Muxer.
4) Use Sonic Audio Decoder 4.2 in GraphEdit to Dump a (huge) .raw file onto your hard drive (look at previous posts on how to do this).
5) Use Sox to convert this into a .WAV file (again, look at previous posts - just make sure to use the -3 option). With DD+ this should result in a 24 bit multichannel WAV file.
6) As per zgx's instructions, convert this to flac with MediaCoder (so far as I can tell, you do NOT need WaveWizard. When I used WaveWizard to remap, it seemed that the center channel got remapped to the left rear speaker! I hope someone can confirm this for me.)
7) Use MKVMerge GUI to mux in the flac stream into a new MKV.

Now, surprisingly, I did not need to figure out the audio delay. I had to do this before, when I was encoding to AC3, but not this time! I don't know why - maybe the encoder I used ignores silence? Anyways, this is a good thing - makes things simpler!

If you use FFDShow Audio Decoder, make sure that FLAC is enabled in the codecs settings.

Enjoy!

For reference, I used the Harry Potter Goblet of Fire HD-DVD. The re-encoded 640kbps DD5.1 soundtrack was ~730MB, which is exactly the same as the DD+ soundtrack. The FLAC lossless soundtrack takes up 1300 MB of space. Pretty good!

Naturally, the FLAC/DD+ soundtrack sounds far better than the AC3 one - because I used FFDShow to create the AC3 one, which isn't very good - the volume was too low!
Rectal Prolapse is offline   Reply With Quote
Old 11th March 2007, 05:12   #987  |  Link
Rectal Prolapse
Registered User
 
Join Date: Mar 2005
Posts: 433
Hmm there appears to be a problem with massive stuttering and audio dropouts. I'll blame MKVMerge for this one.
Rectal Prolapse is offline   Reply With Quote
Old 11th March 2007, 06:38   #988  |  Link
Rectal Prolapse
Registered User
 
Join Date: Mar 2005
Posts: 433
More caveats: It appears that the delay setting in mkvmerge (2.0.2) does not work for FLAC audio tracks.
Rectal Prolapse is offline   Reply With Quote
Old 11th March 2007, 09:53   #989  |  Link
zgx
Registered User
 
Join Date: Feb 2007
Posts: 94
@Rectal Prolapse:
Just as you have notcied you don't need to remap the channels for a Sonic Audio Decoder dump. That is just something needed with a LPCM "xport file".

You can actually decode Blu-ray LPCM with the Sonic Audio Decoder but I don't trust that filter completely so I rather go with xport even if it takes a little longer.

Sorry to hear about stuttering and audio dropouts. I did some tries with FLAC about a week ago when I muxed the MPEG2 streams from Blu-ray together with FLAC audio and I did not experience any stuttering or dropouts. Not 100% sure if I used mkvmerge or gdsmux when I created the files.

About the delay setting i mkvmerge please let me know what you find out. Could you perhaps also try if it works better with Wavpack instead of FLAC?


When it comes to DD+ there are some movies that feature very high bitrate soundtracks. I played around with such a movie yesterday. It featured a ~2 Mbps DD+ soundtrack. The output I got from Sonic Audio Decoder was 24 bit/48 kHz. I put AC3filter in the chain to downsample to 16 bit and then made a FLAC. Out of the result I got a nice sounding 1100 Kbps FLAC. The question is if the DD+ soundtrack was 24 bit (and I just got a downsampled FLAC) or if that was just something Sonic Audio Decoder decided to output? What's the easiest way to check the bit depth of an EAC3 file?
zgx is offline   Reply With Quote
Old 11th March 2007, 09:58   #990  |  Link
MichalHabart
Registered User
 
Join Date: Mar 2006
Posts: 135
Quote:
Originally Posted by Rectal Prolapse View Post
Strange - when I play back a WAV in MediaCoder, the center speaker track is sent to the Rear Left speaker! I hope this doesn't screw up encoded audio either.

Anyways - I took a DD+ track from an HD-DVD, passed it to Sonic Audio Decoder 4.2 and Dump. Then I took the resulting WAV file and ran it through Sox, then I ran WaveWizard with the channels remapped as suggested. I hope this is the right procedure for HD-DVD DD+ files?

Anyways, I will be doing some tests tonight...

EDIT: Remapping the channels appears to be a BAD idea! There is no need to remap with WaveWizard it appears, in my testing.
Of course, remapping should be used only for LPC? track, definitely not for DD+
MichalHabart is offline   Reply With Quote
Old 11th March 2007, 10:15   #991  |  Link
Rectal Prolapse
Registered User
 
Join Date: Mar 2005
Posts: 433
Thanks guys - I just realized LPCM is different.

gdsmux? I might give that a try.

I haven't confirmed yet if it is a problem with FFDShow's FLAC decoding. I put a FLAC file into a .mka container and it had the same audio glitch issues as when it was in a .mkv with a VC-1 video stream. After more testing I realized that there was no video stutter - only the audio glitches.

I am using FFDShow-tryouts revision 964 (February 2007). What are you using for FLAC playback, zgx (and anyone else who got this working)?

Thanks again!

(For the time being I used MediaCoder to make me an AAC track using the FAAC encoder, just for fun! AAC Lossless doesn't work - I get a 4K file everytime! And WMA Lossless in MediaCoder crashes out on me.)
Rectal Prolapse is offline   Reply With Quote
Old 11th March 2007, 10:32   #992  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
How does flac compare to MLP, if you convert directly without changing the bit depth? Just curious whether it's a worthwhile savings. (The ease of playability might outweigh that anyway.)
foxyshadis is offline   Reply With Quote
Old 11th March 2007, 10:39   #993  |  Link
KoD
Registered User
 
Join Date: Mar 2006
Posts: 567
Rectal Prolapse, does your soundcard support 24 bits input in hardware ? Because if it's only accepting 16 bits, then there's a downsampling being performed by the drivers or by windows without you knowing. And soundcards can choke on high bitrate, even more when it's multichanneled. I'm afraid you might be asking more from your hardware than it can do and you're blaming software for it.
KoD is offline   Reply With Quote
Old 11th March 2007, 12:07   #994  |  Link
Darth Pinous
Registered User
 
Darth Pinous's Avatar
 
Join Date: Feb 2007
Location: In a galaxy far, far away
Posts: 51
Quote:
Originally Posted by Rectal Prolapse View Post
More caveats: It appears that the delay setting in mkvmerge (2.0.2) does not work for FLAC audio tracks.
You should try WavPack instead of FLAC. You can delay a WavPack soundtrack in mkvmerge.
Darth Pinous is offline   Reply With Quote
Old 11th March 2007, 14:05   #995  |  Link
MichalHabart
Registered User
 
Join Date: Mar 2006
Posts: 135
Quote:
Originally Posted by madshi View Post
Hey guys,

I've written a little tool named "eac3toac3", which is able to convert E-AC3 files to AC3. **WAIT**. Before you rejoice: The tool really does nothing but what was already suggested in this thread (E-AC3 -> RAW -> WAV -> AC3). Basically it automates what you have to do with GraphEdit and running all the various tools like sox and aften etc. Anyway, the tool works fine for me and makes the conversion process a bit more comfortable.

http://madshi.net/eac3toac3.zip

Code:
eac3toac3 v1.0, freeware by madshi.net

Usage: eac3toac3 srcFilename.eac3 destFilename.ac3

This tool can convert a 2.0 or 5.1 channel E-AC3 file to AC3.

For this to work correctly you need these filters to be installed:
(1) DTS/AC3/DD+ Source
(2) Sonic Audio Decoder 4.2
(3) ffdShow Audio Processor
(4) Dump filter

Furthermore these tools must be located in the same folder as eac3toac3:
(1) sox 13
(2) aften revision 449
Please note that newer ffdShow tryout versions make problems for me. I have things working correctly with the ffdShow tryouts build from December 2006. Here are some download links for the neccesary freeware tools/filters:

http://ffdshow-tryout.sourceforge.net/
http://sourceforge.net/project/showf...ease_id=485785
http://win32builds.sourceforge.net/aften/index.html

The "eac3toac3" tool has a few tricks up it's sleeve:

(1) It automatically detects whether the E-AC3 file is really an E-AC3 file, how many channels it has and which sampling rate etc.
(2) It automatically changes the Sonic Audio Decoder settings to deliver the needed channels.
(3) It automatically finds out whether the intermediate raw audio file has a bitdepth of 16 or 24 bits and adjusts the "sox" parameters accordingly.

If you don't want to convert to AC3, but to something else, you can use ".wav" or ".raw" as destination extensions. The eac3toac3 tool will then simply stop when the ".raw" respectively ".wav" file is done. Intermediate files are automatically deleted. Only the source and destination file are left on the harddisk after the tool has run through.
Hm, it is not working. I tried with Casino DD+ track this is what is got:

eac3toac3.exe h:\casino.dd+ g:\test.ac3
The file extension of the source file must be ".eac3", ".dd+" or ".wav".

When i rename dd+ track to eac3, it is recognised by that program
Can you tell me what i am doing wrong?
MichalHabart is offline   Reply With Quote
Old 11th March 2007, 14:18   #996  |  Link
orbitlee
Registered User
 
Join Date: Apr 2006
Posts: 78
Quote:
Originally Posted by MichalHabart View Post
Hm, it is not working. I tried with Casino DD+ track this is what is got:

eac3toac3.exe h:\casino.dd+ g:\test.ac3
The file extension of the source file must be ".eac3", ".dd+" or ".wav".

When i rename dd+ track to eac3, it is recognised by that program
Can you tell me what i am doing wrong?

Under DOS or Windows, you can't name file with '+' inside. It is reserved by command processor(cmd.exe).
BTW, I noticed that in DD+ audio files have .ddp extension name in Scenarist SCA, .ec3 in Scenarist ACA.

Last edited by orbitlee; 11th March 2007 at 14:21.
orbitlee is offline   Reply With Quote
Old 11th March 2007, 14:25   #997  |  Link
MichalHabart
Registered User
 
Join Date: Mar 2006
Posts: 135
Quote:
Originally Posted by orbitlee View Post
Under DOS or Windows, you can't name file with '+' inside. It is reserved by command processor(cmd.exe).
BTW, I noticed that in DD+ audio files have .ddp extension name in Scenarist SCA, .ec3 in Scenarist ACA.
So, madshi, is it possible to change aec3toAC3 program so it will take ddp instead of dd+ files?
And something more, what bitrate will your final ac3 have? Is there some possibility to add there parameter for final bitrate of ac3 (i mean 448 or 640)?

Last edited by MichalHabart; 11th March 2007 at 17:28.
MichalHabart is offline   Reply With Quote
Old 11th March 2007, 18:52   #998  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by MichalHabart View Post
So, madshi, is it possible to change aec3toAC3 program so it will take ddp instead of dd+ files?
Yes, of course, I'll do that. I'll also try to use Chumbo's suggestion to use the AC3Filter instead of ffdShow.

Quote:
Originally Posted by MichalHabart View Post
And something more, what bitrate will your final ac3 have? Is there some possibility to add there parameter for final bitrate of ac3 (i mean 448 or 640)?
I'm always using 640 for 5.1 audio tracks. For 2.0 audio tracks I'm using 384, unless the E-AC3 track has a higher rate than that. In that case I'm using 640, too. I guess I can add a parameter, but is there anybody who would want to use 448, anyway? I mean we want best possible quality, don't we?
madshi is offline   Reply With Quote
Old 11th March 2007, 18:54   #999  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by zgx View Post
About 25% of the original. For "16 bit/48 kHz/6 channel" movie soundtracks I have gotten files from 1100 to 1900 Kbps so it doesn't take more space then a 1.5 Mbps DTS track does. The only downside is that you need 6 analog RCA cables or HDMI in order to get lossless sound to your transciever. You can of course let AC3filter transcode to AC3 for S/PDIF ouput. Then it won't be lossless but will still sound really good.
That's mighty cool! How does that compare to TrueHD or DTS Master HD Audio? Does FLAC compare well with those two codecs? I mean in that case FLAC would really be a great alternative, as many players already support it, even some hardware media streamers, while TrueHD and DTS Master HD Audio support is still very rare both in software and hardware...
madshi is offline   Reply With Quote
Old 11th March 2007, 19:17   #1000  |  Link
zgx
Registered User
 
Join Date: Feb 2007
Posts: 94
Quote:
Originally Posted by madshi View Post
That's mighty cool! How does that compare to TrueHD or DTS Master HD Audio? Does FLAC compare well with those two codecs? I mean in that case FLAC would really be a great alternative, as many players already support it, even some hardware media streamers, while TrueHD and DTS Master HD Audio support is still very rare both in software and hardware...
FLAC, Wavpack, LPCM, MLP, TrueHD and DTS-HD Master Audio should all sound exactly the same since they are all lossless.

Any difference in "quality" has to do with the source that was used for the encode or because of differences in software/hardware used in playback.

DTS-HD Master Audio has a small plus beeing able to output a 1.5 Mbps DTS core stream over S/PDIF while all the other formats needs to re-encode to example AC3 in realtime for S/PDIF usage.

But I think that on a HTPC there are many advantages in using FLAC or Wavpack.
zgx is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 16:59.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.