Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: AC3 Decoding (Read 7587 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

AC3 Decoding

Lately I've been interested in creating audio CD's from my music DVD's. I'm starting to achieve some really good results.

My preferred method is to just extract the 2 channel AC3 stream from the DVD, then convert this to a WAV file. I've found that the conversion from AC3 to WAV is really the critical part in the process. Some converters produce a WAV file that sounds like crap. Some do really well.

BeSweet is the program I'm using at the moment for the conversion. Good grief, there sure are a lot of options. All I want to do is get the best quality 2 channel 44.1 KHz WAV file from a 2 channel 48KHz AC3 file.

I'm assuming that AC3 is a lossy compression. How does it compare? How much loss is there, and is it worth making audio CD's from AC3 files in the first place?

Thanks,

Brett
flac > schiit modi > schiit magni > hd650

AC3 Decoding

Reply #1
I thought music DVDs usually have LPCM audio, which is lossless? Anyway, if you want a quick way to decode AC3 into WAV just use DVD2AVI and choose Decode instead of Demux.

AC3 Decoding

Reply #2
Depends on whether indybrett means "DVD-videos with music on them" or "DVD-audio discs".
Shiki is right on the DVD2AVI though; I am not sure how good its resampling is though. Might be worth using DVD2AVI to decode to 48KHz wav, and then use ssrc or something to resample.

I've always had a lot of success with besweet though - it uses Azid (good ac3 decoding and downmixing) and ssrc (good resampling) so you may not be able to get any better.

gnoshi
happiness comes in brown paper bags.

AC3 Decoding

Reply #3
I think if you just want to listen the audio in computer. I suggest to get AC-3 bitstream from DVD-video instead of converting them into 2 channel wave file for audio CD. In my experience, downmixing operation for AC-3 sounds really make the sounds poorer then multi-channel sounds.

AC3 Decoding

Reply #4
DVD2AVI is my preferred AC3 to WAV conversion tool; BeSweet has more options, but since I also use the VFAPI reader codec for video the ability to decode and resample an AC3 stream in one pass is a nice feature. And DVD2AVI does offer scalable quality in the resampling. However, in order to best use this feature you need to be working from VOBs, rather than an already demuxed AC3 stream. I haven't used other extraction programs very often, but DVD Decrypter (a personal favourite) allows stream processing, so you can select which components you want the final VOBs to contain, as they are written to the hard-drive. If all you want is the audio, simply select the proper stream before beginning extraction.

  The simplest method to do a high-quality AC3 to WAV conversion requires only a few steps.

  1) Open the resulting VOB(s) in DVD2AVI, and select "Audio" > "Channel Format" > "Auto Select."

  2) Go to "Audio" > "Dolby Digital" and make sure both "Decode" and "Dolby Surround Downmix" are checked.

  3) Go to "Audio" > "48 -> 44.1KHz" and make sure "UltraHigh" is checked.

  4) Press "F5" to begin a preview of the material (you can stop the preview by pressing "Esc"). If DVD2AVI properly detected the audio stream, it will display the audio properties in a side panel. If you don't see the audio properties, go back to "Audio" > "Track Number" and select a different track.

  5) This is the one that's hardest to remember; instead of telling DVD2AVI to "Save AVI," you want to tell it to "Save Project" (or simply press "F4"). If you save an AVI, your audio will be embedded within the AVI. By saving a "project," your audio will be written in a separate WAV file, and another file will be created which contains additional information about the contents of the VOBs. If all you want is the audio, you can stop at this point; the WAV file you just created can be split in CDWave, edited in any decent wave editor, or sent directly to a compressor program. Caveat: Most DVDs are mastered with the audio at a lower level than you would expect from a commercial CD, so the next step you might want to consider is using WaveGain to adjust the volume.

  To address your other questions, yes, AC3 is a lossy compression scheme. In North America (and many other parts of the world) it is the predominant format used for the audio portion of video DVDs. It is never (to my knowledge) used on pure audio DVDs, although the specs would allow such an AC3 audio DVD to be manufactured. Instead, it is occasionally used in the video directory of audio DVDs, so that DVD-Video-only players can still provide a level of playback for DVD-Audio discs... although in such cases, the listener is only hearing the AC3 stream, and not what they supposedly payed the extra dollars/Yen/Euros to enjoy. Convoluted, isn't it?

  In terms of quality AC3 is worse than AAC, better than most MP3, and can sneer at RealAudio with the best of 'em. But if you are asking whether it is worth making an audio CD from an AC3 program, the question you need to ask yourself is, "Do I want to listen to this program on my CD player, and is AC3 the best format in which I'll find this performance?" If the answers are both "Yes," then you would be doing yourself a disservice not to make your CDs. Audio quality aside, why deprive yourself of an enjoyable listening experience? I assume you enjoyed the DVDs from which you sourced the AC3 streams, so you will in all liklihood enjoy your audio CDs as well.

    - M.

AC3 Decoding

Reply #5
Thanks everyone. I think that pretty much answers all of my questions. I was referring to Video DVD's, not DVD Audio.

They all seem to have two AC3 tracks. Usually a 2 channel track, and a 6 (or was it 5) channel track. I will be playing the resulting CD's on a standard CD player. No surround, just L & R.

The method M details seems a bit easier than what I have been doing with BeSweet. I'm wondering, which audio stream will DVD2AVI select for the conversion? If given a choice, which one should I go with?

Brett
flac > schiit modi > schiit magni > hd650

AC3 Decoding

Reply #6
For this type of task I like to use SmartRipper to rip the AC3 from the DVD disc.  Then I use a program called HeadAC3he to decode and/or encode the AC3 file.  It decodes to WAV using Azid, which is the best in my opinion.  It allows you to take a 5.1 AC3 and do whatever you wish to it.  Make it a Dolby Surround II compatible WAV file, 5.1 ogg file, or you can make 6 WAVs of each channel, among other things.
Every passing minute is another chance to turn it all around.

AC3 Decoding

Reply #7
If the dvd has a 2-channel track, use that. That way it has been mastered for stereo etc, and you don't need to screw around with downmixing.

that's my opinion, anyways.

gnoshi
happiness comes in brown paper bags.

AC3 Decoding

Reply #8
Quote
They all seem to have two AC3 tracks. Usually a 2 channel track, and a 6 (or was it 5) channel track.... I'm wondering, which audio stream will DVD2AVI select for the conversion? If given a choice, which one should I go with?

Brett

Hi Brett. If you already have the choice of a 2-channel track, use that one (DVD2AVI will show you how many channels the audio track-number you have selected contains; if you are working from the straight VOBs the program defaults to the first audio stream, so you may need to select "Track 2" instead). By using the 2-channel track instead of the 5.1-channel version, no downmixing is necessary - although you may safely leave the DVD2AVI settings as they were - since the program has already been mixed in stereo. 48 -> 44.1 KHz conversion is still necessary, to ensure the audio is Red Book (audio CD) compatible.

    - M.

Edit: Oops... looks like gnoshi beat me this time. 

AC3 Decoding

Reply #9
I have a similar question, I can't find any information.  Which track would be better to ABR mp3 at 128
English (Dolby Digital 2.0 Surround) or English (Dolby Digital 2.0 Stereo)

AC3 Decoding

Reply #10
Quote
I have a similar question, I can't find any information.  Which track would be better to ABR mp3 at 128
English (Dolby Digital 2.0 Surround) or English (Dolby Digital 2.0 Stereo)

Hmm... one of the L.A.M.E. experts can probably give you a better answer on this one. My first choice would probably be the "Stereo" version, because "Surround" mixes - although essentially glorified stereo - often rely on tricking the ear by shifting things slightly out-of-phase, or reinforcing specific frequencies at the expense of others. Both of those are valid approaches to creating a stereo mix, but they make analyzing the audio signal that much more difficult for any compression codec. If you go with the "Dolby Digital 2.0 Stereo" signal and encode with joint-stereo, you will at least be getting the intended stereo mix, without (hopefully) any unpredictable artifacts. But that's just my opinion, and I'll yield to Dibrom or any of the other dev's who care to chime in.

    - M.

AC3 Decoding

Reply #11
As far as I know the AC3 format has no real bit-depth setting like a WAV file has (similar to MP3). I use Azid to decode AC3 to WAV and then SSRC to downsample the material to 44.1 KHz. One question arises. I see two methods of converting the material:
  • saving the AC3 stream to WAV using 16 bit int and then using SSRC without changing the bit-depth any further
  • saving the AC3 stream to WAV using 32 bit int and then using SSRC with changing the bit-depth to 16 bit int
The result in both cases would be a 16/44.1 file. But which method is better regarding quality?

My command line parameters I use at the moment are as follows:

azid.exe -s stereo -F wav32 <input file> <output file>

ssrc_hp.exe --rate 44100 --bits 16 --twopass --dither 1 --pdf 1 1 <input file> <output file>

So I currently use the latter method. The AC3 file in this case is a 2ch file without a specified surround setting, so downmixing is of no importance here and the stereo setting should also be okay.

Edit: From what I can tell, the first method produced a louder sound.