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. |
2nd July 2006, 18:16 | #1 | Link | ||
Swallowed in the Sea
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,191
|
Aften 0.0.8 is out
Just found this at HA.org...and it sounds promizing.
Quote:
Changelog of the last release: Quote:
Last edited by Kurtnoise; 10th September 2007 at 08:41. |
||
3rd July 2006, 06:03 | #2 | Link |
Registered User
Join Date: Mar 2003
Posts: 126
|
I've tested with a 6-channel WAV produced by BeSweet from an AC3 file and it worked. However I can't tell if the channels were mapped correctly because I don't have a good home theater...
__________________
VMesquita My Tools: DIKO FreeEnc: AVS->MPEG2 Encoder Get them here: http://www.vmesquita.com |
5th July 2006, 22:39 | #3 | Link |
Registered User
Join Date: Mar 2003
Posts: 126
|
Did a test using A test file and AC3Filter, and channel mapping is incorrect (relating to BeSweet output).
EDIT: I've tried to fix this in BeSweet using this: Code:
D:\Temp\besweet>BeSweet.exe -core( -input "D:\Temp\besweet\6ch.ac3" -output "D:\Temp\besweet\6ch.wav" -6chwav ) -azid( -o l,c,r,sl,sr,lfe)
__________________
VMesquita My Tools: DIKO FreeEnc: AVS->MPEG2 Encoder Get them here: http://www.vmesquita.com Last edited by vmesquita; 6th July 2006 at 00:18. |
6th July 2006, 10:20 | #4 | Link |
Swallowed in the Sea
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,191
|
Could you test this sample please ?
This is not made with BeSweet. It's just for testing channel mapping. |
7th July 2006, 02:36 | #5 | Link | |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,890
|
Quote:
|
|
7th July 2006, 14:28 | #6 | Link |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,219
|
Or you could try this sample
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
|
8th July 2006, 17:56 | #7 | Link | |
BDVD Team
Join Date: Dec 2004
Location: Rio de Janeiro - RJ/Brasil
Posts: 306
|
Quote:
See you, |
|
9th July 2006, 02:49 | #8 | Link |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,890
|
@Kurtnoise
If you want improve the aften encoder I have two suggestions 1) To make a correct channel remapping we can replace the Int to Float routine at aften.c (line 125): Code:
for(i=0; i<A52_FRAME_SIZE*wf.channels; i++) { if(i < nr*wf.channels) fwav[i] = wav[i] / 32768.0; else fwav[i] = 0.0; } Code:
if(wf.channels == 6) { for(i=0; i<A52_FRAME_SIZE*6; i+=6) { if(i < nr*6) { fwav[i] = wav[i] / 32768.0; // FL fwav[i+1] = wav[i+2] / 32768.0; // C fwav[i+2] = wav[i+1] / 32768.0; // FR fwav[i+3] = wav[i+4] / 32768.0; // SL fwav[i+4] = wav[i+5] / 32768.0; // SR fwav[i+5] = wav[i+3] / 32768.0; // LFE } else for(j=0; j<6; j++) fwav[i+j] = 0.0; } } else { for(i=0; i<A52_FRAME_SIZE*wf.channels; i++) { if(i < nr*wf.channels) fwav[i] = wav[i] / 32768.0; else fwav[i] = 0.0; } } 2) New parameters, valid values and default, to be passed to output_frame_header (a52enc.c): -c 0,1,2 Default: 0 (-3,-4.5,-6 dB) Center Mix Level -s 0,1,2 Default: 0 (-3,-6,0 dB) Surround Mix Level -d 0,1,2 Default: 0 (Ignored,Not,Yes) Dolby Surround Mode -n 0..31 Default: 31 (-0..-31 dB) Dialogue normalization |
9th July 2006, 07:12 | #9 | Link |
Registered User
Join Date: Mar 2003
Posts: 126
|
@tebasuna51
Tested the mod and now the channels are being correctly mapped for BeSweet output
__________________
VMesquita My Tools: DIKO FreeEnc: AVS->MPEG2 Encoder Get them here: http://www.vmesquita.com |
9th July 2006, 15:29 | #10 | Link | ||
Swallowed in the Sea
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,191
|
Quote:
Quote:
|
||
9th July 2006, 16:13 | #11 | Link |
Registered User
Join Date: Mar 2003
Posts: 126
|
I did a modification to add 6-WAV support. This can be useful because sometimes we want to change AC3 duration (for framerate conversions) and SoundStretch only support Mono WAVs, while BeSweet built-in SoundTouch doesn't work well in my experience. You can download sources and binary here:
http://www.vmesquita.com/files/aften_6wav.zip
__________________
VMesquita My Tools: DIKO FreeEnc: AVS->MPEG2 Encoder Get them here: http://www.vmesquita.com |
9th July 2006, 16:53 | #12 | Link | |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,890
|
Quote:
Code:
// if ((s->acmod & 0x01) && s->acmod != 0x01) bitwriter_writebits(&s->bw, 2, 1); /* XXX -4.5 dB */ if ((s->acmod & 0x01) && s->acmod != 0x01) bitwriter_writebits(&s->bw, 2, 0); // -3 dB (Dolby default) // if (s->acmod & 0x04) bitwriter_writebits(&s->bw, 2, 1); /* XXX -6 dB */ if (s->acmod & 0x04) bitwriter_writebits(&s->bw, 2, 0); // -3 dB (Dolby default) The Dialogue Normalization is a important parameter in ac3 encode, you can see: GUIDE: How To Properly Encode Dolby Digital Audio (AC3) |
|
9th July 2006, 21:07 | #13 | Link | |
nobody's nobody
Join Date: Mar 2005
Location: The Sun, somewhere around
Posts: 553
|
Good to see the Aften is having the correct AC3 channel order from the default wav-format order.
I believe the AC3 decoders are also responsible to restore the original wav-format channel order to play or transcode. However : Quote:
So as far as the mode is set to auto/surround, it decodes depending on the detected actual stream : AC3, DTS... | 5.1, 2.1,.., DPL II.. For an example, when I set the ac3 out mode in the FFDShow and change the mixer mode, it decodes all the 2.0 ch modes(DPL II, 2.0....) to DPL II mode(forced) automatically. Probably only when the DD 2.0 contains the DPL mix, the ds meta info is used for some old decoders to be automatic to switch between DPL & STEREO mode.
__________________
u know everything in the end, or now if aligned... no right(x).right(y) pls. it's confusing... : phase-shift /Jun.2006 |
|
10th July 2006, 02:17 | #14 | Link |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,890
|
At least in this thread: BeSweet + AC3Enc: Tag generated 2.0 AC3 as "surround" if downmix was used is claimed the Dolby Surround Mode flag.
I think is easy to implement, without waste resources, and why not? I make the necessary (I hope) mods to include the four parameters in Aften_mod_sources All parameters are optional, also when use: aften input.wav output.ac3 is encoded CBR with 448 Kb/s for 6 channel wav or 192 Kb/s for other number of channels. Please, if anybody can compile this sources (I don't have the appropriate compiler) I can test the result. Thanks. Edit: @vmesquita, I can't access your links. Please use http://www.mytempdir.com/ Last edited by tebasuna51; 10th July 2006 at 02:22. |
10th July 2006, 03:28 | #15 | Link | |
nobody's nobody
Join Date: Mar 2005
Location: The Sun, somewhere around
Posts: 553
|
Indeed, Dolby's doc contains some more :
Quote:
But I agree, reserving & setting the correct options are not wasting the space and certainly useful for certain decoders or any other uses..
__________________
u know everything in the end, or now if aligned... no right(x).right(y) pls. it's confusing... : phase-shift /Jun.2006 |
|
10th July 2006, 04:53 | #16 | Link |
Registered User
Join Date: Mar 2003
Posts: 126
|
@tebasuna51
EDIT: I have merged the 6 wav mod with the mods you posted, added the usage to when aften is called with no arguments, and fixed a little typo in your mod. Binary and source: http://www.mytempdir.com/794693 (I didn't test, I hope it's working correctly)
__________________
VMesquita My Tools: DIKO FreeEnc: AVS->MPEG2 Encoder Get them here: http://www.vmesquita.com Last edited by vmesquita; 10th July 2006 at 05:17. |
10th July 2006, 10:28 | #18 | Link | |
Swallowed in the Sea
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,191
|
Allright...I patched tebasuna stuff and merged it with the 0.01 version.
Quote:
|
|
10th July 2006, 12:28 | #19 | Link |
Registered User
Join Date: Mar 2003
Posts: 126
|
__________________
VMesquita My Tools: DIKO FreeEnc: AVS->MPEG2 Encoder Get them here: http://www.vmesquita.com |
10th July 2006, 18:27 | #20 | Link |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,890
|
@vmesquita
Thanks for your job, but maybe there are a problem because your aften.exe never finish to encode. Stoped with Ctrl-C, the first part is ok and after a long silence. The parameters are taken ok. @kurtnoise Your new version works fine for me. Thanks for the patch. In firsts tests I detected: Aften accept any wav type, but only work with 16 bit Int wav's. With 24,32 bit Int or float the resultant ac3 is unusable. With 8 bit Int Aften abort. Accept also WAVE_FORMAT_EXTENSIBLE (16 bit Int), then the faad output can be used directly with Aften. Tested also the pipe issue with AviSynth based Bepipe and BeHappy. Edit: More tests (not important because isn't frequently used) wav_3chan, acmod used 3 (L,C,R) needed remap [0,2,1], the acmod 4 (L,R,S) is not accesible (remap not needed) wav_4chan, acmod used 6 (L,R,SL,SR) remap not needed, the acmod 5 (L,C,R,S) is not accesible (needed remap [0,2,1,3]) wav_5chan, acmod used 7 (L,C,R,SL,SR) needed remap [0,2,1,3,4] (without LFE). Edit 2: Work also with wav > 4GB Test with wav 4.2 GB, 6 chan, 130 min. encoded in 12 min. in a P IV 2.4GHz Last edited by tebasuna51; 10th July 2006 at 21:17. |
Thread Tools | Search this Thread |
Display Modes | |
|
|