PDA

View Full Version : I need a decent AC3 encoder


InuyashaSama
22nd August 2005, 01:57
Since the AC3 encoder from BeSweet ac3enc.dll has an extremely low output volume, I used the 5.1 WAVE output. But this generates a file larger than 4GB, therefore neither Dolby Soft Encode nor DVD-Lab Pro recognizes it correctly.

Is there some decent AC3 encoder somewhere? I need to convert an ATSC/A52 audio file (6 channel) to AC3 with a good volume level.

Matthew
22nd August 2005, 05:03
If you demux the wav (e.g. using besplit) into 6 wavs, then you should be able to use Soft Encode. Besweet also supports outputting 6 wavs in the first place.

InuyashaSama
22nd August 2005, 06:27
Thanks, I did that just minutes after posting. But for some reason Soft Encode doesn't work, all I get during preview is a very annoying noise. I have tried several WAV files and different encoding settings without success. I have even tried with different sound cards and speakers configurations.

Is there some other settings I need to change to preview and encode AC3 properly in Sonic Foundry?

daphy
22nd August 2005, 08:08
try the latest wavewizard (http://forum.doom9.org/showthread.php?t=95265) - it supports AC3 the low level problem is AFAIK completely fixed :)

tebasuna51
22nd August 2005, 13:43
I assume you want encode to ac3, with Soft Encode, a wav 5.1 > 4 GB.
Then you must to demux it in 6 mono wav like Matthew say.
I know a few methods to do this job:

1) BeSweet: don't work with WAVE_FORMAT_EXTENSIBLE (WAVE_EX) and PCM 16 bit > 2GB

2) BeSplit: can demux in 6 mono wav all type of wav, but:
a) If wav is WAVE_EX, maintain the same header and Soft Encode can't open it (you must change the header field AudioFormat from 0xFFFE to 1 if PCM 16 bit, or 3 if FLOAT 32 bit)
b) Because a reported bug of BeSplit, the header field BlockAlign is set to 6, in PCM 16 bit must be 2. Then if you open this wav in Soft Encode it is 3 times short an distorted (maybe your problem InuyashaSama, sorry Matthew)

(3) WaveWizard 0.53: Sorry Daphy, but at this moment, can't demux all wav (WAVE_EX/Canonical > 4 GB) in 6 mono wav Canonical. See my post (http://forum.doom9.org/showthread.php?t=95265&page=3&pp=20), Johnman may correct this in next release.)

Edited:
3) WaveWizard 0.53: can demux all wav (WAVE_EX/PCM> 4 GB) in 6 mono wav PCM. (Sorry, I test with 0.52)

4) Tranzcode: I test only PCM 16 bit WAVE_EX/Canonical. Can demux in 6 mono wav PCM 16 bit Canonical like need Soft Encode.
Soft encode accept AudioFormat 1 (PCM 16 bit) and 3 (Float 32 bit) but not 0xFFFE (WAVE_EX).

Them you can use Tranzcode (TranzGUI), use the new release of WaveWizard, use BeSplit and correct AudioFormat and BlockAlign with WinHex (I have a little utility if you insist in use BeSplit) or use BeSweet with Float 32 bit (double size than PCM 16 bit).
Don't forget the samplerate (48 KHz for DVD) and channel remapping if necessary.

InuyashaSama
22nd August 2005, 19:31
Thanks. I tried the following without success:

1. Tranzcode simply cannot open the original 6 channel WAV in ATSC/A52 format.
2. I used WaveWizard to convert the 6 separate waves into 16 bit int, 24 bit int, 32 bit float PCM and even RAW mode. Soft Encode can open most of them correctly, but it cannot encode properly. This simply doesn't make sense. Why I receive no warning from Soft Encode? What's wrong with this files exactly?? I'm really pissed off with this piece of software, no wonder why it's been discontinued.

Last, I'm using the "BeSweet GUI 0.6 b61 by DD" and I don't have the Float 32 bit option you mentioned anywhere. I also tried the AC3 Machine GUI and it doesn't have such option neither.

The format supported by this Sonic Foundry Soft Encode simply does not exists. I'm wasting time since 3 days ago without success, please help anyone. Sometimes I even forget what I'm doing, because I have lots of programs and WAV files all around. (and all useless for now)

Edit: I've also decoded the file to a 6 channel WAV and generated 6 waves with Tranzcode, but the same problem occurs when using Sonic Foundry. This must be a problem related to Soft Encode only.

johnman
22nd August 2005, 21:35
3) WaveWizard 0.53: Sorry Daphy, but at this moment, can't demux all wav (WAVE_EX/Canonical > 4 GB) in 6 mono wav Canonical. See my post (http://forum.doom9.org/showthread.php?t=95265&page=3&pp=20), Johnman may correct this in next release.


If this problem is the one you mentioned earlier where the wav outputed was to short, i already fixed it from v0.52 to v0.53. link (http://forum.doom9.org/showthread.php?p=697590#post697590) . If it is a new bug, can you describe it a little more pls? i dont know what canonical is.

this is from dictionary.com, which seems unrelated to what u describe:


1. Of, relating to, or required by canon law.
2. Of or appearing in the biblical canon.
3. Conforming to orthodox or well-established rules or patterns, as of procedure.
4. Of or belonging to a cathedral chapter.
5. Of or relating to a literary canon: a canonical writer like Keats.
6. Music. Having the form of a canon.

johnman
22nd August 2005, 21:42
2. I used WaveWizard to convert the 6 separate waves into 16 bit int, 24 bit int, 32 bit float PCM and even RAW mode. Soft Encode can open most of them correctly, but it cannot encode properly. This simply doesn't make sense. Why I receive no warning from Soft Encode? What's wrong with this files exactly?? I'm really pissed off with this piece of software, no wonder why it's been discontinued.


whats is the problem exactly? Why do you think its not ok?

If you describe it a little more, maybe i can fix it :-)


EDIT
And you dont need to use ww to convert the file to 16b int or whatever and then add the files in surcode. ww can use surocode with the help of conversion batcher. I dont know if you were already aware of this, but it seems like u added the monowavs manualy. You can just add a 6 channel wav to ww and configure the surcode settings for conversion batcher in ww.

Austin Forgotten
22nd August 2005, 23:57
InuyashaSama wrote: 1. Tranzcode simply cannot open the original 6 channel WAV in ATSC/A52 format.

Huh? You are mixng to things in one sentence. A 6 channel WAV (multichannel wav having 6 channels) is one which has interleaved samples for 6 channels having a file extension .wav, has nothing to do with ATSC/A52 format. A term I've seen here used alot "DeMux" when applied to multichannel wavs would "Split" the multichannel wav into mono wavs, and in this case 6 of them, which can be readily used to for re-encoding into other multichannel formats (i.e. .ac3, .dts). Transcode can split a multichannel wav into individual mono wavs, and can also decode dts to mono wavs, and soon will decode ac3 into mono wavs (32 bit float) in the next ver (but still need to work on ddwavs however).

As for ATSC/A52 format (not sure about the term ATSC), but A52 refers to .ac3. So if you meant to say that Transcode cannot "Decode" .ac3 into either multichannel or mono wavs then you are correct. However I do have this working already on an unreleased ver., which needs more testing (it differs in output when compared with that of Azid, also need to test for other formats beside 5.0 & 5.1), also I will be incorporate resampling and dithering (thru the use of SSRC source code - thanks to Johnman's help).

Depending on what I can actually get done, and what other features I plan to include in Transcode, I can't really say when v4.0 will be ready :-).

[Sorry about being quite inactive on the board, I didn't reply to some requests etc. cause I just couldn't help at the time. I needed the time to hunt/find/test and decipher available source code and be able to modify it to fit my needs and get it working of course :-), and since my poor old brain is still learning new stuff along the way, you will need to bare with me folks and wait till I make the new version ready.]

Kind regards, Austin Forgotten.

tebasuna51
23rd August 2005, 05:16
@InuyashaSama
There are new (and expensive) encoders like Sony Vegas-Acid Pro, Surcode, ..., but I can't help you with them.
Only my method with the old Sonic Foundry Soft Encode.
From the beggining (say me if you use another tool in each step):

1) ATSC_A52.wav -> old.ac3
Like I say you in another post:
BeSplit -core( -input g:\a52.wav -prefix g:\old -type ddwav -fix )

2) Old.ac3 -> PCM_16bit_6chan_5GB.wav
I use Foobar2000, and you?

3) PCM_16bit_6chan_5GB.wav -> 6 PCM_16bit_mono.wav
You can use Tranzcode or WaveWizard (sorry Johnman)

4) Edit the 6 mono.wav (you want amplify the volume)
Use Audacity, Goldwave, CoolEdit, SoundForge, ...
Amplify, resample to 48 KHz if you need, verify the equal length of channels...

5) 6 mono.wav -> new.ac3
I have Sonic Foundry Soft Encode Version 1.0 (Build 19) and can work with PCM_16bit without problems.

@Johnman
Sorry, I forget test the last version. WaveWizard 0.53 can demux wav_6_chan > 4 GB in 6 mono wav.
Only the LFE channel with SoftEncode don't work.
About "canonical" header I read this word in http://ccrma.stanford.edu/courses/422/projects/WaveFormat/
referenced in http://www.audiocoding.com/modules/wiki/?page=WAV

johnman
23rd August 2005, 05:40
@Johnman
Sorry, I forget test the last version. WaveWizard 0.53 can demux wav_6_chan > 4 GB in 6 mono wav.
Only the LFE channel with SoftEncode don't work.
About "canonical" header I read this word in http://ccrma.stanford.edu/courses/422/projects/WaveFormat/
referenced in http://www.audiocoding.com/modules/wiki/?page=WAV

No problem, i used the header u posted and i got the same problem with my wav as you described, and it was fixed in the new version, so it is ok. I also fixed the lfe bug in surcode by adding an invert option in cb so that DOES work now correctly.

And thx for the explanation of canonical. If i understand correctly, it means the simplest wav possible, with only a fmt and data chunk

InuyashaSama
23rd August 2005, 09:13
Well I finally got it to work somehow, now I used the extracted AC3 instead of the extracted WAV from VirtualDub (using the Demux button instead of Save WAV).

Then I splitted it into 6 waves with BeSweet.

Soft Encoder sometimes crashes in the middle of the encoding process, this is very rare, I think there's some setting which causes this. And when it works, the generated AC3 has a really low volume, I wonder if there's some advantage in using Soft Encoder instead of BeSweet after all. Both generate AC3 with terribly low volumes.

Rockaria
24th August 2005, 20:27
Both generate AC3 with terribly low volumes.Well, if you want a WYHWYG manner with a little bit different approach with the gain control(decoding time DRC), try the method described here. (http://forum.doom9.org/showthread.php?p=666230#post666230)
The ffdshow ds filter can decode the ac3 and has many DSP features among which you can use the volume control to apply the volume gain and the DRC.

Paulcat
25th August 2005, 18:01
I have noticed a severe drop in volume going from mp3 to ac3 with BeSweet/BeLight. For stereo, I convert the mp3 to stereo wav, and then go from stereo wav to ac3. The volume seems to increase slightly going to wav and decrease going back to ac3, with the final output being close to the original volume.

Rockaria
25th August 2005, 21:01
I corrected the ffdshow method link above.
Depending on the decoding module and player, the volume can be different making it hard to tell, at least to me.

The best & clear gain processing I've achieved is from the foobar2k replay gain(to intermediate wave or AAC transcodings).

BoNeCrUsHeR
13th February 2007, 20:01
Thanks, I did that just minutes after posting. But for some reason Soft Encode doesn't work, all I get during preview is a very annoying noise. I have tried several WAV files and different encoding settings without success. I have even tried with different sound cards and speakers configurations.

Is there some other settings I need to change to preview and encode AC3 properly in Sonic Foundry?

I know this is an old post, but just wanted to update it, for googlers...
I was bothered by this and couldn't find an answer.
It turns out the answer was as simple as looking in the help file!

From SoftEncode Help File:
Nothing but noise when playing back an encoded Dolby Digital file

If you are playing back an encoded Dolby Digital file through your computer’s sound card into a Dolby Digital decoder and hearing nothing but noise, do not panic, the encoded file is most likely fine.
When you play a Dolby Digital file out of your computer’s sound card, the data that is passed, even though it is really data information, gets an audio data bit tacked on to the stream. In a professional Dolby Digital decoder, this audio bit is ignored and the signal is decoded without issue. However, in most consumer decoders the audio bit is not ignored and the data is passed as audio (noise).

There is really only one solution to this problem presently: buy a professional level decoder. The other option is to have the audio card strip out the audio bit prior to outputting the signal. However, no cards currently support this feature.

So as it says, your file was probably ok to begin with. (Maybe not?) But the preview function doesn't work without a highend sound-card/Professional DD-AC3 Decoder installed.

Should encode to 5.1 ok, though...

-bC
:o