View Full Version : 2-pass Audio encoding, possible ?
kastro68
29th March 2002, 03:53
Is 2 pass encoding available for either mp3 or ogg vorbis yet?
Would it be possible to implement 2 pass encoding for audio? If it is possible, would there be any improvement in audio quality?
Neo Neko
29th March 2002, 05:43
If I am not mistaken Headac3 has it. Possibly even Besweet. As far as gains in quality when it comes to VBR 2-pass should always be a boon.
tangent
29th March 2002, 08:11
Headac3 and besweet uses 2-pass decoding to determine normalising gain when decoding from AC3, not when encoding to MP3.
There is no 2-pass VBR for audio compression. The closest you have now is Ogg Vorbis bitrate peeling which is still under developement and testing.
Neo Neko
29th March 2002, 20:51
Doh! I am mistaken!
RadicalEd
31st March 2002, 07:43
@Tangent
uum... I think I remember having an old Lame GUI that offered 2pass, are you positive about that? I'll take your word though, it was awhile ago that I had that and god knows my memory is far from accurate.
tangent
31st March 2002, 08:02
Lame currently doesn't do any 2-pass in the CLI. I believe that the GUI you used probably 2-pass for another purpose such as normalization.
The current experimental --nspsytune2 by Naoki Shibata in LAME does use 2-pass, but there is for the purpose of tonality estimation.
Note that there can be different objectives for a 2-pass. I believe, the objective being discussed is a 2-pass VBR to get the best VBR quality at a particular exact bitrate.
outlyer
1st April 2002, 02:31
I don't really know but IMHO it has not very sense to use two pass for quality purposes in VBR, as you don't set a bitrate. What you set, in MP3 as in Vorbis, is a quality factor, and if I'm not wrong 2 pass "for quality" is needed to respect a (mean) bitrate and use it the better possible.
athos
2nd April 2002, 14:28
Hey, maybe there could be an options to set a desired bitrate or desired final filesize for 2-pass encoding, just like with video encoding...
ookzDVD
6th September 2002, 08:20
@forum,
I really want to ask,
is that possible to do 2-pass audio encoding,
so we could get the perfect target size ?
thank you.
pacohaas
6th September 2002, 16:33
A while back, when --r3mix was first becoming obsolete, i wanted to keep the low bitrates that it gave, but everyone suggested that at these bitrates, ABR would yield higher quality, so i devised a small(non-automated) 2-pass method:
pass1: --r3mix
pass2: --alt-preset <r3mix bitrate>
now, in pass 1, i suppose you could use any VBR line you wish, such as --nspsytune -V9 -mj -h --athtype 3 --ns-sfb21 2 -Z -Y, then just take the bitrate that gives you and to an ABR at that bitrate. This will give you your constant quality over all your rips and higher quality than just doing the first VBR pass(at these lower bitrates)
Now if you want something to come out to a particular size, you can use my ABR bitrate calculator and just use the given ABR. The problem is that with such long audio files, the ABR is sometimes off by a few kbps and this results in the wrong filesize. But then you can guesstimate what to try as your new ABR in a second pass to get the right filesize, example:
I want a file to come out to 100MB, say this requires a bitrate of 117kbps so i use --alt-preset 117. When it's finished, i see the file is only 90MB, so in the second pass I will try --alt-preset 120 or something larger than 117.
Now if someone wants to do a bunch of tests on large audio files ( >1h20m ) we could start to see a relationship between the set ABR and the actual ABR and I could write a quick calculator that will tell you what ABR to use to get the filesize you want. Of course this will vary from movie to movie, so there could be a setting for "action movie" and "drama" or something.
Now my question is...is this really worth all that testing? Can't you just process your audio first, then use 2-pass video to fill your CD's?
pandv
6th September 2002, 17:02
to do a bunch of tests on large audio files ( >1h20m ) we could start to see a relationship between the set ABR and the actual ABR and I could write a quick calculator that will tell you what ABR to use to get the filesize you want
I used a lot of --alt-preset 96 for transcoding mp2 to mp3. My conclusion is: there are not fixed relationship. Normally the enconde is less than 96, but between 78 and 90. Some encode has been 98.
So, it depends of the concrete stream to encode.
pandv.
pacohaas
6th September 2002, 18:32
Originally posted by pandv
I used a lot of --alt-preset 96 for transcoding mp2 to mp3.I assume you do this for lower bitrate? It will only lose quality and anything that can play mp3 should be able to play mp2, but i see your point if you are going from 224kbps mp2 to 96kbps mp3.
Normally the enconde is less than 96, but between 78 and 90. Some encode has been 98.
So, it depends of the concrete stream to encode.that's what i figured, each case is different, so you're better off just doing 2 or 3 tries until you get it close enough.
alx
7th October 2002, 05:56
Hi ppl, i just wondering if theres a program to make "audio 2-passes", just like the xvid or divx codecs does, to achieve better vbr results, at a expected filesizes...
Thanks a lot if anyone can tell me something about this.
Alx.
DoC hEx
3rd March 2003, 10:35
Do any of the current Codec(x)->MP3 do 2-Pass VBR encoding? Or is there only 1-Pass VBR?
Dh
symonjfox
3rd March 2003, 13:55
Yes, there's NO 2pass encoder for audio (for now). Why?
It's a nice question.
I know that using a fixed quantizer the quality is the same for all file, but using 2 pass VBR it would be possible to create a REAL ABR file and analize the file as well, so the bitrate allocation would be better.
Mango Madness
3rd March 2003, 15:15
it'd also be useful for aiming for specific filesizes for dvd backup creations.
DoC hEx
3rd March 2003, 23:11
When I encode things I like the Audio tract to only take up about 10% of the complete AVI file size, no matter how long the Track is. I understand from reading the above replies that it’s possible to calculate a VBR that will generate a file that is just about the exact size I require.
But the reason I’m so interested in this is because when I moved from VBR single pass on Video to 2-pass the quality jump was very impressive. I had hoped that the same leap in quality might be available for the Audio as well. I normally would use a 96Kb/s rate for audio, from watching the on screen information I can see at times it goes up to about 128Kb/s, and as low as about 80Kb/s. I was hoping that there might be some software out there that analyse the complete track, and then allocates the total file size more effectively. Then just the current on the fly guessing.
Would this functionality be difficult to implement? As all it is, is a bastardisation of the current 2-pass logic, kind of like the now old Nandub & 3.11 DiVX ;) encored.
Another reason why I want this but it’s not required is that I’m currently working on a simple program that will do Audio and Video encoding to automate some of the more time consuming or tedious parts. I know there are currently many pieces of good software available that do what I hope to achieve. But it’s a pet project so I can learn more about the complete workings of the Video and Audio encoding. One of the feature’s I find missing in almost all these software is that of Credit encoding of Video to a lower rate but not the audio. While I know this Kb/s saved will not make for a better Video quality it would lead to better audio through out the actual movie.
Dh
symonjfox
4th March 2003, 13:13
Originally posted by DoC hEx
But the reason I’m so interested in this is because when I moved from VBR single pass on Video to 2-pass the quality jump was very impressive. I had hoped that the same leap in quality might be available for the Audio as well.
Are U sure? I know that 1 pass VBR at fixed quantizer gives Much more quality than 2 pass VBR, the fault is that you cannot know the file size until it finished the encoding.
2 pass VBR is good just for 2 things:
1- if you have a MAX, MIN and AVERAGE bitrate to respect (such SVCD)
2- if you have to create file long XXX bytes.
The only goal is to better allocate the bitrate trough all the file (and it is a good thing)
tangent
6th March 2003, 06:58
I have explained many times why you probably won't be seeing 2-pass encoding in audio in the following HA threads, you might all be interested to check them out.
http://www.hydrogenaudio.org/index.php?act=ST&f=1&t=2454
http://www.hydrogenaudio.org/index.php?&act=ST&f=9&t=5279
http://www.hydrogenaudio.org/index.php?act=ST&f=16&t=4581
DoC hEx
6th March 2003, 10:32
Originally posted by symonjfox
Are U sure? I know that 1 pass VBR at fixed quantizer gives Much more quality than 2 pass VBR, the fault is that you cannot know the file size until it finished the encoding.
2 pass VBR is good just for 2 things:
1- if you have a MAX, MIN and AVERAGE bitrate to respect (such SVCD)
2- if you have to create file long XXX bytes.
The only goal is to better allocate the bitrate trough all the file (and it is a good thing)
Thanks for the info, that's answer a number of questions I had
justin
20th May 2003, 01:32
Hi everyone,
I was wondering if it was possible to do a two pass encode for audio (specifically the ogg vorbis format) for encoding movies. I know windows media has two pass encoding now and 5.1 surround. But is it possible to do a two pass audio encode and have exactly the same quality as 1.4 vbr ogg, but have the average bitrate much lower.
:confused:
yup
23rd September 2003, 07:57
Hi pejple!
I need programm for multipass encoding mp3 or ogg. I have som expirience with video encoding. For video quality increase very large during multipass encoding. For audio I find only WM9 but with Microsoft format may be many problem.
With kind regards yup.
Teegedeck
23rd September 2003, 08:17
There's no such thing.
Tuning
23rd September 2003, 08:25
Never heard of such thing in audio encoding.I think VBR encoding is what u want.;)
yup
23rd September 2003, 08:42
Tuning and Teegedeck! Thank You for fast reply. I try ABR and VBR Lame and OggVorbis. But! during encoding encoder have information about small block data not all song and as result we have different quality depending on music saturation.
With kind regards yup.
SeeMoreDigital
13th June 2004, 14:07
I guess the title says it all.
I'm interested because when generating 1pass and 2pass WMA9 streams the differences are quite apparent!
Cheers
EDIT: Title change
Tuning
13th June 2004, 17:25
But is it possible currently?
I dont remember any tool capable of this.:(
I would like comment that 2pass encodes also helps size prediction.
Now the Nero encoder is heavily optmized for AAC generation ( Thanks to Ivan & Menno ) there will be not much improvement in quality side if you go for 2 pass. (IMO)
The question is more valid in case of normal LC AAC enoders like FAAC Winamp etc..
Only some thoughts...:rolleyes:
Bye.
SeeMoreDigital
13th June 2004, 21:00
Originally posted by Tuning
Now the Nero encoder is heavily optmized for AAC generation ( Thanks to Ivan & Menno ) there will be not much improvement in quality side if you go for 2 pass. (IMO) That maybe true when generating 2Ch encodes but surely 6Ch LC and HE encodes might benefit from the extra processing!
Just a thought...
Cheers
niamh
13th June 2004, 21:53
HeadAC3he has a two pass setting for AAC if I'm not mistaken?
2-pass mode in the GUI, hybrid, float, dumb.. as for quality, don't ask me, i'm an audio dummy :D
hans-jürgen
13th June 2004, 22:31
Originally posted by niamh
HeadAC3he has a two pass setting for AAC if I'm not mistaken?
2-pass mode in the GUI, hybrid, float, dumb.. as for quality, don't ask me, i'm an audio dummy :D That's only meant for normalizing the volume/gain in two steps, not VBR encoding. I already suggested to DeXT to include this option for FAAC in winLAME, because it would probably be a good addition and improvement in sound.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.