Log in

View Full Version : Is there any way for 2pass audio encoding other than using neroaacenc.exe?


aiyunyi
16th May 2006, 16:01
nero provides a 2pass encoding way, is there another way?

shon3i
16th May 2006, 16:22
I think only WMA have 2pass option.

aiyunyi
16th May 2006, 16:23
Neroaacenc(The free aac encoder just released by nero) really provides the 2 passs way !

is there anyway using avisynth or besweet??

buzzqw
16th May 2006, 16:39
is there anyway using avisynth or besweet??

using avisynth is more difficult but possible
using avs2wav you can build a temporary wav (with nicaudio plugin for example) and then neroaccenc!

using besweet you must however build the temporary wav (2 or more channel) and then pass to neroaacenc.

remember that isn't possible piping with 2 pass encoding

BHH

aiyunyi
16th May 2006, 17:07
using avisynth is more difficult but possible


How?? Can you give me an example??

Rockaria
16th May 2006, 17:36
http://forum.doom9.org/showpost.php?p=823923&postcount=99
The foobar2k diskwriter will automatically(-i %s) generate a temp wav file to feed to the cli encoder.

http://forum.doom9.org/showpost.php?p=823989&postcount=104

As for avisynth related, the middleware(bepipe,avs2wav...) must be able to handle the stdout>wav first.
Feeding the wav to cliencoder is another job, possibly can be done through dos shell redirecting or piping(I didn't test).

The ideal way would be handling the -twice stdout on both side(not implemented yet) : middleware & cli encoder.

[edit] But the real question seems to be :
-any other (AAC) encoder which can do -2pass VBR encoding?

The answer is : it totally depends on the encoder.

imcold
16th May 2006, 18:19
2 pass VBR is useless; when using VBR, you set the quality parameter and encoder uses that quality on every audio frame (It's like 2 pass video encoding with when you set constant quantizer)

2 pass is useful with ABR; when using it, encoder modifies the quality through the file to hit the target bitrate. In 1st pass it analyses the audio file and using the statistics helps him to better distribute the bits (use appropriate quality levels) where they are really needed in the 2nd pass (same as 2-pass in video compression - you aim at specific bitrate).

IMHO 2pass should help a bit when using CBR too, because AAC CBR isn't "strict" CBR (or how should I say it) due to usage of bit reservoir: the bitrate fluctuates a bit in this mode too.

Simple NeroAacEnc GUI (http://forum.doom9.org/showthread.php?t=110970) uses AviSynth+BePipe to pipe data to neroaacenc, thus you don't need the intermed. wav file.

Rockaria
16th May 2006, 20:05
2 pass VBR is useless;
2 pass is useful with ABR;:confused:
To be honest, it sounds like simple parroting of some informal definitions and theory. I am answering because it seems toward me.
As discussed in that thread, you should firstly establish a formal basis of your point(no informal definitions!).

We all know everybody has own theory & beliefs and can declare any INTERESTS in bold, large-size, red-colors... to impress.
But in order to make it reasonablly(independantly) accepted, I suggest you to provide the links of the most forrmal definitions for your basis, not the personal theory(even the interests) in unbelievably assertive expressions(with no 'believe', 'think', 'guess'...)....

http://forum.doom9.org/showpost.php?p=825151&postcount=164
http://forum.doom9.org/showthread.php?p=825855#post825855
http://forum.doom9.org/showthread.php?p=826008#post826008
http://forum.doom9.org/showpost.php?p=826906&postcount=202

SeeMoreDigital
16th May 2006, 20:14
I think only WMA have 2pass option.Indeed.... It's the only genuine 2-pass audio encoder I'm aware of.

imcold
16th May 2006, 22:31
Sorry I didn't mean to offend you in any way, I want to discuss - and as a matter of fact, I'm going a bit OT, sorry.

I should be more precise:
"2 pass VBR is useless" - should be "2 pass quality based VBR"
http://forum.doom9.org/showpost.php?p=825334&postcount=177
that's the reason that -q and 2pass will be disabled in next version.


But, on the other hand, you are sometimes unprecise too:

Ivan:
" * Support for CBR, VBR, 2-PASS CBR and ABR"

few posts later (Rockaria):
"And while this version seems to support 4 bitrate modes : CBR(bitrate), VBR(quality/bitrate) and VBR(bitrate) 2pass with optional average segment period adjustment, I wonder if the last mode is anyhow related to the ABR or if the ABR mode is actually not released yet."

bitrate based VBR -> ABR. And why not yet released, when it was there.

---
http://forum.doom9.org/showpost.php?p=824236&postcount=118
"The ABR keeps the equal bit rate per second time frame, but allocates bits variably within the frame based on the complexity. It allocates equal bits to each second."

in ABR(-br, no 2 pass) mode the encoder indeed tries to keep the average bitrate it has been given; but not strictly within one second - so not equal bits to eaxh second (I got fluctuation of +-5 kbps in my splitted test sample(-br 96000) splitted to 1 sec samples). Yup, everybody has own theory & beliefs.

And "guess" < exactly the word you use very often:

http://forum.doom9.org/showpost.php?p=825151&postcount=164
http://forum.doom9.org/showpost.php?p=826906&postcount=202

---
so.. the real question seems to be: "any other (AAC) encoder which can do 2pass bitrate based VBR / ABR encoding?" if you want to correct him ;)

Rockaria
16th May 2006, 23:13
Ha! I didn't want to correct anybody here, unlike you are doing to somebody, pointlessly.
Because it's certainly off topic, I suggest you to move your post to the corresponding thread. I can possibly answer there.;)
Let's not spread the uncertain things to everywhere.

shon3i
16th May 2006, 23:24
Indeed.... It's the only genuine 2-pass audio encoder I'm aware of.
But only via Windows Media Encoder.

Sharktooth
17th May 2006, 02:10
Ha! I didn't want to correct anybody here, unlike you are doing to somebody, pointlessly.
Because it's certainly off topic, I suggest you to move your post to the corresponding thread. I can possibly answer there.;)
Let's not spread the uncertain things to everywhere.
Please stop it. You're the only one offending here and spreading "uncertain" information like YOUR OWN (wrong) definitions.
VBR is useless with 2 passes coz, by definition, VBR is VARIABLE BIT RATE so it cant be fixed to fit a final bitate. If you force to do it you will obtain ABR. For example, xvid 2pass VBR is basically ABR.
ABR is AVERAGE BIT RATE so you can instruct the rate control to hit an AVERAGE BIT RATE.
CBR is CONSTANT BIT RATE, and this one is pretty easy to undrstand.

Correct Definitions:
VBR: http://en.wikipedia.org/wiki/Variable_bit_rate
ABR: http://en.wikipedia.org/wiki/Average_bit_rate
CBR: http://en.wikipedia.org/wiki/Constant_bit_rate

Rockaria
17th May 2006, 02:38
Please stop it. You're the only one offending here and spreading "uncertain" information like YOUR OWN (wrong) definitions.
VBR is useless with 2 passes coz, by definition, VBR is VARIABLE BIT RATE so it cant be fixed to fit a final bitate. If you force to do it you will obtain ABR. For example, xvid 2pass VBR is basically ABR.
ABR is AVERAGE BIT RATE so you can instruct the rate control to hit an AVERAGE BIT RATE.
CBR is CONSTANT BIT RATE, and this one is pretty easy to undrstand.
...

If you want to continue here, where certainly the VBR/ABR is not the issue..
I have the basis of my theory while some don't have any beside the informal but prevailing beliefs.

It proves obviously you didn't read all my related threads.
http://forum.doom9.org/showpost.php?p=824236&postcount=118
If you have different opinions, you should have expressed it in that thread, not HERE!
Also If you think yourself is representing the MOD, let me know. I'll respect that.


The keyword seems to be variable bit rate per second.

http://en.wikipedia.org/w/index.php?title=Average_bit_rate&oldid=44638008


Average bit rate refers to the average amount of data transferred per second. This is commonly referred to for digital music or video. An mp3 file, for example, that has an average bit rate of 128 kbit/s transfers, on average, 128,000 bits every second. It can have higher bit rate and lower bit rate parts, and the average bit rate is obtained by dividing the sum of the bit rate of each sample by the number of samples. Bit rate is not the only measure of audio/video quality, as some formats such as wma and Vorbis produce higher sound quality than the standard mp3 format at the same bit rate.

http://en.wikipedia.org/w/index.php?title=Variable_bit_rate&oldid=47326883


Variable bit rate (VBR) is a term used in telecommunications and computing that relates to sound or video encoding. As opposed to constant bit rate (CBR), VBR files vary the amount of output data per time segment. VBR allows a higher bit rate (and therefore more storage space) to be allocated to the more complex segments of sound files while less space is allocated to less complex segments. The average of these rates is calculated to produce an average bit rate for the file that will represent its overall sound quality.

MP3, WMA, Vorbis, and AAC files can optionally be encoded with VBR.


An interpretation identical to some recent definitions or trends..

http://www.hydrogenaudio.org/forums/index.php?showtopic=30553&st=0&p=264475&#

Nature of modes:
CBR - gives you constant bitrate through stream and predictable size. Quality can vary through the stream.
VBR - gives you constant quality through the stream (is controled via number of parameters) and completely unpredictable size.
ABR - gives you more constant quality than CBR while maintain some control over bitrate.
Note: actually, many new standarts like for example AAC have no CBR mode at all. They always working in ABR, using bit reservoir. If bit reservour depth is no more than defined in standart for used mode, then such a mode is called "CBR" while technically it is not.


My understanding based on the more formal definition so far is that :

. The ABR keeps the equal bit rate per second time frame, but allocates bits variably within the frame based on the complexity. It allocates equal bits to each second.

. So using the ABR for streams having variable bit rates over each second frame sounds quite confusing.

. If allocating even bits(ABR) on each unit(period/segment/frame/reservoir : sample<second<file) but distributing variably depending on the complexity within is the goal, we can safely say ABR is a subset of bitrate based VBR which has both controls over size(overall) and even quality(inside).

Although we are given the freedom of creative expression, if anybody wanna influence the majority reasonably with the new definitions, please update the Wikipedia.

Would you provide any 'more formal' links(definitions) for me to be understood reasonably?

Sharktooth
17th May 2006, 03:10
it's just a matter of interpretation.
the most logical one is VBR by definition means Variable Bit Rate in relation to the wanted quality. That suggests VBR is a "quality" based encoding mode coz if it is "Variable" it cant be set to a wanted value unless you "Average" it.
In that case ABR comes into play meaning that you can set an Average Bit Rate the encoder has to converge to.
Limiting the averaging procedure in "units" means restricting the definition of Average Bit Rate.
The most obvious meaning of Average Bit Rate is what it exactly means... at the end of the encoding you get the desired average bitrate.

Rockaria
17th May 2006, 03:31
it's just a matter of interpretation. I totally agree on that. But do you think yourself or anybody has the right to force me not to express the 'bit rate based VBR' being the superset of bit rate based ABR?
If you read through the related links, the initial confusions was caused by a guy from Nero is calling the -q mode as VBR not specifically as 'Quality based VBR' while Ivan is redefing the -2pass as bitrate based VBR which I agree.

http://forum.doom9.org/showthread.php?p=825612#post825612


. in order to be called as ABR the interval should be 1 sec, equal amount of allocated bits to distribute inside of each unit, by current definition, otherwise, I'd call it as VBR like CBR when it is technically ABR.

. when the -2passperiod is possible, so should be -1passperiod logically for the -br, which is just adding/adjusting some more intervals on the units possibly to improve the distribution quality.

. the averaging(distributing) with the target bitrate actually happens on all the modes except the -q mode theoretically, which of course, does not fully qualify the mode to be ABR.
I even started to think even the -q mode is doing the averaging(or even quality loss distributing).

http://forum.doom9.org/showpost.php?p=826906&postcount=202

I really suggest you to read the full contents of related threads and post any 'GOOD Explanation' than the dictionary in the related thread, or update the Wikipidia for everybody not limited to Audio area only.

Rockaria
17th May 2006, 04:28
If anybody has different opinions, please provide the formal basis of your statements, not just expressing like useful/useless... which is totally subjective and violating the 'freedom of expression' and absurd especially when it is strongly based.

Secondly, limit it in the corresponding thread, not here to depreciate any reasonable discussions people exchange.
And sorry for any confusion aiyunyi, and other people here. I could have been more soft, if I were not that keen on the issue( possibly you will understand why, if you read through the related thread).

So please stop spreading the un-based theory anywhere except the related one.
Also if you specifically believe in Ivan, you can safely use 'Bitrate Based VBR' for -2pass -br.

aiyunyi
17th May 2006, 04:37
so complicated? but still waiting for the conclusion

Rockaria
18th May 2006, 02:54
Unavoidably,
If you mean ABR/VBR stuff, there seems to be no responsibility, no reasoning, whatever we call, the louder voice wins.
If you mean 'aac -2 pass vbr (cli) encoder', the nero one is the first try, fresh build, and you know what I mean with this.