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 > General > Audio encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 18th July 2006, 14:56   #41  |  Link
dimzon
BeHappy/MeGUI developer
 
dimzon's Avatar
 
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
Hmm. A will add this encoder to BeHappy ASAP

ADD:
Some 128*96 logo variations





Last edited by dimzon; 18th July 2006 at 16:19.
dimzon is offline   Reply With Quote
Old 19th July 2006, 01:09   #42  |  Link
dimzon
BeHappy/MeGUI developer
 
dimzon's Avatar
 
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
Now BeHappy support it


Warning! I have no time to test it so try and report
dimzon is offline   Reply With Quote
Old 19th July 2006, 13:15   #43  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,188
@jruggle, welcome to the forum and thanks for your answers to my questions.

In your web I read:
"Future Plans
...
More testing & better support for multi-channel
..."
Then maybe are you interested in full remapping (not only for 6 chan), with something like that (aften.c, line 333):
Code:
// Correct Channel mapping for all ch streams
    int remap = 0;                                        // 0 not needed
    if(status->acmod==3 || status->acmod==5 || status->acmod==7) {
       remap = 1;                                         // needed for this acmod
       channelmap(ch) ((int []){ 0, 2, 1, 4, 5, 3 })[ch]  // for 6 chan. (Syntax ??)
                           //  { 0, 2, 1, 3, 4, x }       // for < 6 chan.
       if(wf.channels != 6) {
          channelmap(3)=3;
          channelmap(4)=4;
       }
    }
    while(nr > 0) {
        if(remap == 1) {
            int j;
            for(i=0; i<A52_FRAME_SIZE*wf.channels; i+=wf.channels) {
                if(i < nr*wf.channels) {
                    for(j=0; j<wf.channels; j++) {
                        fwav[i+j] = wav[i+channelmap(j)] / 32768.0;
                    }
                } else {
                    for(j=0; j<wf.channels; j++)
                        fwav[i+j] = 0.0;
                }
            }
        } else {
...
Now work also for ac3 5.0 (without LFE)
tebasuna51 is offline   Reply With Quote
Old 19th July 2006, 14:00   #44  |  Link
daphy
Miles Freak
 
daphy's Avatar
 
Join Date: Apr 2003
Location: Europe
Posts: 652
Is there any Dolby EX support (with more than 6 channels) planed
__________________
CYA Daphy
daphy is offline   Reply With Quote
Old 20th July 2006, 01:14   #45  |  Link
jruggle
Registered User
 
Join Date: Jul 2006
Posts: 276
Quote:
Originally Posted by daphy
Is there any Dolby EX support (with more than 6 channels) planed
I don't know much about Dolby EX, but from what I gather on the website and from the specs, the extra rear-center information is matrixed into the left and right surround channels and is extracted by a Dolby EX capable decoder. The only thing the AC-3 format does in this regard is flag the stream as containing a Dolby EX stream. This can be done with the alternate bit stream syntax, which is not currently supported by Aften. I'll put that on my TODO list though.

-Justin
jruggle is offline   Reply With Quote
Old 20th July 2006, 01:26   #46  |  Link
jruggle
Registered User
 
Join Date: Jul 2006
Posts: 276
Quote:
Originally Posted by tebasuna51
@jruggle, welcome to the forum and thanks for your answers to my questions.

In your web I read:
"Future Plans
...
More testing & better support for multi-channel
..."
Then maybe are you interested in full remapping (not only for 6 chan), with something like that (aften.c, line 333):
Thank you. I definitely want to support both standard wav channel remapping and also wav_format_extensible. I'll try to get this done tomorrow or Saturday, along with 32/24/float wav support...otherwise it might not be for a week or two.

-Justin
jruggle is offline   Reply With Quote
Old 20th July 2006, 06:32   #47  |  Link
daphy
Miles Freak
 
daphy's Avatar
 
Join Date: Apr 2003
Location: Europe
Posts: 652
Quote:
Originally Posted by jruggle
I don't know much about Dolby EX, but from what I gather on the website and from the specs, the extra rear-center information is matrixed into the left and right surround channels and is extracted by a Dolby EX capable decoder. The only thing the AC-3 format does in this regard is flag the stream as containing a Dolby EX stream. This can be done with the alternate bit stream syntax, which is not currently supported by Aften. I'll put that on my TODO list though.

-Justin
Seams to me that Aften could be the first free encoder that could do more than 6 channels
__________________
CYA Daphy
daphy is offline   Reply With Quote
Old 20th July 2006, 08:13   #48  |  Link
jruggle
Registered User
 
Join Date: Jul 2006
Posts: 276
Hello,
Aften 0.03 has been released.
http://jbr.homelinux.org/aften/

Aften now supports 8/16/24/32/float/double for wav input.
Also, I added a more complete channel remapping.

I don't have a lot of multi-channel wav files to test with, so just let me know if I broke anything.

Thanks,
Justin
jruggle is offline   Reply With Quote
Old 20th July 2006, 08:27   #49  |  Link
Kurtnoise
Swallowed in the Sea
 
Kurtnoise's Avatar
 
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,182
Great ...A build for testing.
Kurtnoise is offline   Reply With Quote
Old 20th July 2006, 08:56   #50  |  Link
Rockaria
nobody's nobody
 
Join Date: Mar 2005
Location: The Sun, somewhere around
Posts: 553
Wow, very fast integrations!!!!
Quote:
-Dynamic range compression (DRC):
...
-Surround channel processing->90 degree phase shift
-Surround channel processing->3 dB atenuation
AFAIK, there are three places to enable the DRC : DD encoding time, DD decoding time and decoded PCM DRC solutions(AC3filter..)
I am not sure how much these DD encoding/decoding time DRC(film, music, speech...) are related : actual range alteration in encoding time or just setting the desired DRC option tag info. I hope somebody put some clarification on this...

In addition to the discrete DD 5.1 encoding, the DPL (II) encoding also might be very useful to some multi-platform users.
The (old commercial) softEncode generated perfect 90 deg shifted surrounds when I tested. So if this ffmpeg lib(or anyhow) supports this routine, I believe it can even (invert) matrix mix the DPL II PCM for any destinations : DD2.0, WAV, STDOUT...

It will also complete the purpose of the surrounds-90deg-shifts and the DS mode meta tag for the play/encoding time DPL(II) downmix.
a) play time DPL(II) downmix : the stream contains original multi channel(DD5.1)
- the encoder performs the 90 deg shift(s) on S or SL/SR
- the player performs simple stereo(Lo/Ro), DPL(Lt/Rt), DPL II downmix for a DPL(II)/stereo only-receiver.
- the player simple stereo mixer performs simple stereo downmix(Lo/Ro) for a stereo receiver.
- the player DPL downmix performs invert on S : Lt = (L, 0.707(C, LFE), -0.707S), Rt = (R, 0.707(C, LFE), 0.707S)
- the player DPL II downmix performs invert on SurroundCoefs : Lt = (L, 0.707(C, LFE), -(0.866Ls, 0.5Rs), Rt = (R, 0.707(C, LFE), (0.866Rs, 0.5Ls))
b) encoding time DPL(II) downmix : the encoder also performs the required downmix to 2ch PCM

Well, I have been looking for a 90 deg phase shift(all-pass filter) plugin for avisynth with no success. Hope Aften is going to include it for a FULL Dolby support..
Rockaria is offline   Reply With Quote
Old 20th July 2006, 11:18   #51  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,188
Quote:
Originally Posted by Rockaria
AFAIK, there are three places to enable the DRC : DD encoding time, DD decoding time and decoded PCM DRC solutions(AC3filter..)
I am not sure how much these DD encoding/decoding time DRC(film, music, speech...) are related : actual range alteration in encoding time or just setting the desired DRC option tag info. I hope somebody put some clarification on this...
DRC at encoding time
For each block (256 audio samples, 5.33 ms. if 48 KHz) in ac3 stream there are:
(from ATSC Standard: Digital Audio Compression (AC-3), Revision A)
Code:
5.4.3.3 dynrnge:-Dynamic range gain word exists, 1 bit 
If this bit is a 1, the dynamic range gain word follows in the bit stream.

5.4.3.4 dynrng: Dynamic range gain word, 8 bits 
This encoder-generated gain word is applied to scale the reproduced audio as described in Section 7.7.1.
The solution for free encoders is set always dynrnge = 0 (DRC = None). Commercial encoders can calculate the appropriate value for dynrng byte for each block, in function of selected DRC (film, music, ...)

DRC at decoding time
A decoder can offer to the user:
a) Ignore the DRC info in ac3 stream and apply, or not, a new DRC analyzing the signal (Ac3Filter).
b) Accept the DRC info in ac3 stream and:
b1) Apply the full dynamic range (Azid-none, NicAc3Source(), PowerDVD-Quiet)
b2) Apply the DRC encoder-calculated (ffdshow, Azid-normal, NicAc3Source(DRC), PowerDVD-Normal)
b3) Modify the DRC encoder-calculated (Azid-Light, Azid-Heavy, PowerDVD-Noisy)

If an ac3 don't have DRC info (DRC=none, free encoders), b1) = b2) and the ac3 is always reproduced at full dynamic range in players without specifics DRC algorithms.
tebasuna51 is offline   Reply With Quote
Old 20th July 2006, 14:40   #52  |  Link
jruggle
Registered User
 
Join Date: Jul 2006
Posts: 276
Quote:
Originally Posted by jruggle
Aften 0.03 has been released.
I forgot to mention that I changed the VBR and auto-bandwidth settings as well. Default quality is now 220 instead of 200. Also, bandwidth is not reduced quite as much as it was before.

-Justin
jruggle is offline   Reply With Quote
Old 20th July 2006, 17:10   #53  |  Link
Rockaria
nobody's nobody
 
Join Date: Mar 2005
Location: The Sun, somewhere around
Posts: 553
@tebasuna, that seems to be the (almost) complete explanation on the existing DRC solutions, and thanks for the link.
The DD encoding time dynrnge/dynrng values do not seem to be the actual range alteration but the desired/calculated level appliable and adjustable in decoding time. In the '7.7 Dynamic Range Compression' section of the same document :
Quote:
...While this satisfies the needs of much of the audience, it removes the ability of some in the audience to experience the original sound program in its intended form. The AC-3 audio coding technology solves this conflict by allowing dynamic range control values to be placed into the AC-3 bit stream.
The dynamic range control values, dynrng, indicate a gain change to be applied in the decoder in order to implement dynamic range compression. Each dynrng value can indicate a gain change of 24 dB. The sequence of dynrng values are a compression control signal. An AC-3 encoder (or a bit stream processor) will generate the sequence of dynrng values. Each value is used by the AC-3 decoder to alter the gain of one or more audio blocks....
One of my h/w receivers has the DRC option (0.0/1.0/0.5 : I guess none/full/light) manually adjustable. The other has no control, maybe FULL.

So this original DD DRC option seems not as flexible as that of the AC3Filter but still must be a necessary option for those who have the H/W receivers(no s/w ac3filter) and not so quite listening environment but wish not to miss the details at the cost of the reduction of the scale(range)...
Like DPL II, this FULLY considered DRC is regarded as a must option to some while none of the interest to others(like DD EX to me atm).
__________________
u know everything in the end, or now if aligned... no right(x).right(y) pls. it's confusing... : phase-shift /Jun.2006
Rockaria is offline   Reply With Quote
Old 20th July 2006, 18:31   #54  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,188
Quote:
Originally Posted by jruggle
Hello,
Aften 0.03 has been released.

Aften now supports 8/16/24/32/float/double for wav input.
Also, I added a more complete channel remapping.
I think this can improve WAVE_FORMAT_EXTENSIBLE, at wav.c line 101:
Code:
...
                wf->bit_width = read2le(fp);
                wf->filepos += 2;
                if(wf->bit_width == 0) return -1;
                chunksize -= 16;
// WAVE_FORMAT_EXTENSIBLE data
                int chmask = 7;
                if(wf->format == WAVE_FORMAT_EXTENSIBLE && chunksize > 0) {
// chmask isn't after bit_width, before there are CbSize and ValidBitsPerSample (4 bytes)
                    read4le(fp);
                    wf->filepos += 4;
// Now ChMask
                    chmask = read4le(fp);
                    wf->filepos += 4;
// And now we can read the SubFormat valid if WAVE_FORMAT_PCM or WAVE_FORMAT_IEEEFLOAT
                    wf->format = read2le(fp);
                    wf->filepos += 2;
                    chunksize -= 10;
                }
                // determine channel mode
                if(wf->channels == 1) {
                    wf->ch_mode = CH_MODE_1_0;
                } else if(wf->channels == 2) {
                    wf->ch_mode = CH_MODE_2_0;
                } else if(wf->channels == 3) {
                        if(chmask & 0x7) wf->ch_mode = CH_MODE_3_0;
                        else wf->ch_mode = CH_MODE_2_1;
                } else if(wf->channels == 4) {
                        if(chmask & 0x7) wf->ch_mode = CH_MODE_3_1;
                        else wf->ch_mode = CH_MODE_2_2;
                } else if(wf->channels == 5) {
                    wf->ch_mode = CH_MODE_3_2;
                } else if(wf->channels == 6) {
                    wf->ch_mode = CH_MODE_3_2_1;
                } else {
                    wf->ch_mode = CH_MODE_OTHER;
                }
tebasuna51 is offline   Reply With Quote
Old 20th July 2006, 20:21   #55  |  Link
jruggle
Registered User
 
Join Date: Jul 2006
Posts: 276
Thank you! It seems I read through the specs a little too quickly. Your changes have been applied to the current development version.

-Justin
jruggle is offline   Reply With Quote
Old 21st July 2006, 03:57   #56  |  Link
NorthPole
Registered User
 
Join Date: Jan 2006
Posts: 141
Quote:
Originally Posted by jruggle
Aften 0.03 has been released.
Aften now supports 8/16/24/32/float/double for wav input.
Also, I added a more complete channel remapping.
Thanks Justin for your work! Works good so far.
NorthPole is offline   Reply With Quote
Old 21st July 2006, 04:02   #57  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,547
i'm trying out this version:
http://forum.doom9.org/showthread.ph...847#post853847

CBR appears broken? i type in -b 224 and it says "error initialising encoder". that might be my fault though.

also, it seems that when a very high -q is selected (400), it'll refuse give this error a lot:

Error encoding frame xxxx
bitrate: 640 kbps too small

it seems this would be simple to fix?

i'm watching this encoder thanks for developing it.

[edit]

oh, i forgot: P4 with hyperthreading
__________________
sucking the life out of your videos since 2004

Last edited by Mug Funky; 21st July 2006 at 04:04.
Mug Funky is offline   Reply With Quote
Old 21st July 2006, 04:28   #58  |  Link
jruggle
Registered User
 
Join Date: Jul 2006
Posts: 276
Quote:
Originally Posted by Mug Funky
i'm trying out this version:
http://forum.doom9.org/showthread.ph...847#post853847

CBR appears broken? i type in -b 224 and it says "error initialising encoder". that might be my fault though.
The bitrate needs to be specified in bps, not kbps. So you need to use "-b 224000".

Quote:
Originally Posted by Mug Funky
also, it seems that when a very high -q is selected (400), it'll refuse give this error a lot:

Error encoding frame xxxx
bitrate: 640 kbps too small

it seems this would be simple to fix?
I fixed this earlier today, so the current development version should work. Now it will continue lowering the quality for each frame to values below the selected quality until the data fits in a 640kbps frame. Before it was returning an error instead of going below the requested quality setting.

-Justin
jruggle is offline   Reply With Quote
Old 21st July 2006, 05:57   #59  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,547
haha! sweet. i read the bitrate thing earlier in the thread, but it didn't occur to me

thanks for the quick reply.
__________________
sucking the life out of your videos since 2004
Mug Funky is offline   Reply With Quote
Old 21st July 2006, 17:28   #60  |  Link
guada2
Registered User
 
Join Date: Jun 2005
Location: Lyon
Posts: 194
Great job Kurtnoise13

Just 2 questions:
* nero show time 2 information: 2.1 (Why?)
* Media player classic: 6.1 (Right)

Vlc doesn't play your file ac3, your opinion ?

Bye.
guada2 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 00:05.


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