Log in

View Full Version : AC3 -> AC3-WAV, Lossless


PhrostByte
7th December 2004, 17:40
Is it possible? I have a 2ch 192kb/s AC3 and really don't feel like losing quality on it.

KpeX
7th December 2004, 18:04
Although I haven't tried this, you could use BeSplit as described in Q23 of the besweet FAQ (linked in my sig) - something like

besplit -core ( -input "track.ac3" -output "track.wav" -addriff )

(this commandline for 0.9x versions of besplit).

tiny
14th December 2004, 18:40
The above command adds a riff header to the ac-3 file with audioformat 0x2000 (AC-3 Dolby Digital). The resulting dd-wav is is not compatible with audio-cd wave files.

The only way I have been able to create an audio-cd compatible dd-wav file is using Sonic Foundry Soft Encode. All my attemps with besweet and besplit failed.

Theoreticly, it should be possible to create an audio-cd compatible dd-wav with re-encoding the ac-3 file. But I have not yet seen an application that can do that.

Just my $0.02,

tiny

PhrostByte
15th December 2004, 00:02
KpeX's solution worked. I was ripping a DVD movie.

planet1
15th December 2004, 16:56
Well KpeX your command line doesnt work here :sly: (->crash) as well as the BeSliced (basic GUI for BeSplit) add header function, which creates a WAVE file but that isnt playable in VideoLAN VLC.
Reversing the process (DD-WAV -> AC3) also doesnt seem to work.

(btw BeSplit also refuses the job for dts streams, which would be of greater use since DTS on Audio-CD is an official standard - whereas Dolby Digital Music CD isnt :p)
BeSplit doesnt even correctly extract "old" DTS streams from wav-containers - but thats another story ....:rolleyes:

From what I know HeadAC3he is the only tool which can successfully encapsulate a AC-3 into a WAVE file (without re-enconding of course).

http://www.darkav.de.vu/

The latest version is 0.24:
http://www.geocities.com/simonsez07/hac3-024a12.zip

VideoLAN plays HeadAC3he's ac3-wavs just fine ;).
(-> so a cd-player+amplifier should do the same, at least i hope so :rolleyes: )

Isnt there a greater problem - the sampling rate? AC-3 from DVD has 48kHz so putting it on CD not only violates basic CD-Audio specs but could also create playback problems on the amplifier/receiver side ....

But hey there are even folks who record entire LaserDisc soundtracks (AC-3 44.1kHz) as PCM-WAVE then extract the dolby digital stream, so why shouldnt there be people who do the opposite :D ?




Last but not least, an authoring software which supports DD-WAV as output is Nuendo.

http://videoediting.ru/articles/dvd_edit/pictures/nuendo7.jpghttp://videoediting.ru/articles/dvd_edit/pictures/nuendo8.jpg

EDIT: added 2nd image

KpeX
15th December 2004, 23:36
VideoLAN plays HeadAC3he's ac3-wavs just fine .
(-> so a cd-player+amplifier should do the same, at least i hope so ) Well there's no guarantee on that, as you said yourself it's not a standard so no player is guaranteed to play it. I have yet to have a DVD player or CD player that plays DD/DTS cds properly.

planet1
20th December 2004, 19:32
Just in case HeadAC3he doesnt do the job right, BeSweet + BeLight might be an alternative. :sly:

LigH
7th May 2005, 10:17
As far as I can see, we'll need a 2-step processing here:

HeadAC3he created longer WAV files for 48 kHz AC3, as already mentioned in the ReadMe (*). My suspicion here is instead: 48 kHz AC3 gets filled up to the bitrate of a 48000 Hz WAV (1536.0 kbps), but then gets a WAV header with a sampling rate of 44100 Hz (1411.2 kbps), instead of only filling up to this bitrate.

When BeSweet converts input to DD-WAV, the AC3 encoder is not configurable. When I try to add the option "-ac3enc( -b 448 -6ch )", BeSweet creates a pure AC3 file, the option "-ota( -ddwav )" becomes useles. But if I omit it, BeSweet configures AC3Enc to use 640 kbps -- unfortunately, it appears that several Dolby Digital decoders are limited to those bitrates which are allowed on DVDs; they can decode AC3 up to 448 kbps only, and fail on higher bitrates.

A correctly working conversion shall require 2 steps:

Converting the sample rate of the AC3 file, while limiting the bitrate in the range valid for DVDs:

BeSweet.exe -core( -input 48000.ac3 -output 44100.ac3 ) -azid( -d 3/2 -L 0 -l 0db ) -ota( -d dvd2avi -norm 0.95 ) -ssrc( --rate 44100 ) -ac3enc( -b 448 -6ch )

Packaging the resampled AC3 file without further loss:

HeadAC3he -- Input: 44100.ac3; Output format: AC3-WAV



(*) ReadMe.txt of HeadAC3he 0.24a13:
Unfortunately the amp will play even 48kHz source AC3s as 44.1kHz, so it will sound slower.

SeeMoreDigital
7th May 2005, 11:05
Originally posted by LigH
(*) ReadMe.txt of HeadAC3he 0.24a13:

Unfortunately the amp will play even 48kHz source AC3s as 44.1kHz, so it will sound slower.Yes I noticed this too!

I wonder whether Dark Avenger would be able to adapt HeadAC3he to output 48kHz too? Especially as it's able to offer many other frequencies already: -

http://img140.echo.cx/img140/6017/headac3he7pm.gif


Cheers

LigH
7th May 2005, 11:46
Why shall HeadAC3he create 48 kHz output?

1) 48 kHz WAV is not possible on an audio CD, audio CDs always have 44.1 kHz.

2) I wonder if reducing the amout of stuffing bytes (which would fill up the WAV only up to 1411.2 kbps, not up to 1536 kbps) would still work well, or if some decoders get confused.
__

The latest version of HeadAC3he is indeed able to create AC3 files (at least) as good as BeSweet. But it would still be a 2-step job: First convert the sampling rate, second stuff it into a WAV file.

SeeMoreDigital
7th May 2005, 12:01
Originally posted by LigH
Why shall HeadAC3he create 48 kHz output?

1) 48 kHz WAV is not possible on an audio CD, audio CDs always have 44.1 kHz. I was not specifically thinking about AC3-to-WAV conversions...

From what I understand, HeadAC3he does not allow you to re-sample/change the frequency of direct AC3-to-WAV conversions anyway. However, there may be instances when changing the frequency of WAV, MP3, Vorbis, MP2, AC3 and AAC streams to 48kHz may be useful. It would just cover "all-the-bases".



Cheers

LigH
7th May 2005, 12:21
We are not interrested in "AC3 decoding to PCM-WAV" conversions here. We are interrested in "pure AC3 packaged into a fake WAV, to burn this track on a CD, have a CD player play this track digitally to an A/V receiver, and have this receiver decode the AC3 data hidden inside the audio".