Log in

View Full Version : GK and audio@96 kbps


yotsuya-san
28th August 2003, 14:52
Hi all! I've recently made a divx with GK (2.8.5.2) and I set the audio at 96 kbps. In Audio1 tab I've selected "MP3, 96 kbits constant bitrate" and the "Downsample to 44,1 khz", althought it is grayed out, is ticked. So I thought that the output mp3 should have been 96 kbps@44.1 khz, but it is 32 khz.
I know that it is due to Lame, that resamples 96 kbps encodings to 32 khz. But why is "Downsample to 44,1 khz" ticked, then?
I also know that I can use "MP3, custom parameters" and add the string "--resample 44.1", but is it correct? Will my low 96 encoding sound better or worse? I've read about possible synchronization problems with 32 khz encodings, so should I care and resample to 44.1 or let 32 khz encoding muxed with the avi and sleep (and hear) well?

Thanks, Fede.

(Sorry for my bad english)

KpeX
28th August 2003, 15:58
Lame will automatically downsample to 32KHz at low bitrates. I don't believe (although I could be wrong) that this can be overridden with any parameters. Resampling shouldn't cause any sync problems. Not to be a troll, but if you really want to use that low of a bitrate, I'd recommend trying an audio format that's more tuned to it, such as Vorbis or AAC (HE). hth,

yotsuya-san
28th August 2003, 17:24
Originally posted by KpeX
Lame will automatically downsample to 32KHz at low bitrates. I don't believe (although I could be wrong) that this can be overridden with any parameters.

Hi KpeX, as I said in first post, if you add "--resample 44.1" to Lame command line, it resamples to 44.1 khz, whatever bitrate you specify. Obviously there no need of it if you encode from a 44.1 khz source, but in case of AC3 (48 khz) you could need it.

Resampling shouldn't cause any sync problems.

That's what I want to hear! :D

Not to be a troll, but if you really want to use that low of a bitrate, I'd recommend trying an audio format that's more tuned to it, such as Vorbis or AAC (HE). hth,

Oh yes, I know about OGG and OGM. I will try them, and I also hope GordianKnot will soon include them. My doubt is that all the Divx I've seen, with audio encoded at 96 kbps, are at 44.1 khz. Probably they are not encoded with GordianKnot (and Lame), but I'd like to know if they sound better than 32 khz or not. I'm half deaf ;), so I can't say it by myself...

Thanks, and bye.

KpeX
28th August 2003, 18:13
No one can determine for sure exactly how thing will sound, but if your ears can tolerate MP3 @96 kbps, i'm sure you can deal with 32Khz sampling rate. IIRC some tests have shown that virtually noone can distinguish higher sampling rates than 44 or 48 khz. There are reasons lame automatically downsamples at these bitrates, it makes the encoder more efficient, you can think of the sampling rate being analagous to resolution of a video - less samples per unit time will equal more quality at the same bitrate. You downsample audio for low bitrates just as you would probably not want to use a high resolution for low bitrate video.

Slogra
30th August 2003, 10:57
Well, the problem is that 32khz mp3 doesn't work very well in avi's. It'll cause the movie to speed up...

Besweet doesn't seem to like the --resample 44.1 command line. So what i do is just make a 44.1khz wav with Besweet (+ gui) and then encode it to lame with the --resample 44100 option.

yotsuya-san
30th August 2003, 16:43
Originally posted by Slogra
Well, the problem is that 32khz mp3 doesn't work very well in avi's. It'll cause the movie to speed up...

Too late...just burned to cd-rom :( I've seen the avi and it seems that it has no problem, but I'll see when I'll watch the complete movie.

Besweet doesn't seem to like the --resample 44.1 command line. So what i do is just make a 44.1khz wav with Besweet (+ gui) and then encode it to lame with the --resample 44100 option.

I've just tried to encode through GK an ac3 track with "--alt-preset 96 --resample 44.1" in MP3 custom parameters and it does it well. There will be some problems in the mp3?

Anyway, the reason I post in the GK forum is that in Audio tab there's a "Downsample to 44.1khz" and it doesn't work, at least with a 96 kbps encoding. But I'm not an expert and I don't know if it's better to resample through Besweet (with ssrc) or through Lame. I'll try (with my next film ;) ) your suggestion, Slogra. Thanks.

bond
31st August 2003, 20:07
guys, ever thought about that there is a reason why lame downsamples to 32khz when encoding at low bitrates ;)

believe me thats not a bug or so, lame is so well tuned, you can be sure that the settings are as they should be...

and as KpeX already wrote:
if you want to use 96kbps (or even lower) use vorbis or aac (quicktime or nero) as these codecs will produce a much better result at that bitrate...

yotsuya-san
31st August 2003, 20:48
@bond: it's obvious that Lame is tuned to be better with 32 khz at such low bitrates...but that's not my main concern (if not, I would have posted in Audio forum).
I am worried about possible problems in my avis due to 32 khz (if any). If there are problems, I could use other MP3 encoders. I use MP3 just for compatibility, if I care about audio in my dvd I go for higher bitrates for sure ;)
And I'm asking you about a possible bug of GordianKnot (not Lame, of course): if I select "Downsample to 44.1khz" when encoding at, for example, 96 kbps, the mp3 is not downsampled to 44.1 khz, but 32 khz (so, selecting or not that option is the same).

Anyway, it's time for me to know a "little" more about ogg and aac. :D

bond
31st August 2003, 21:02
i dont know why there should be problems with 32khz and avi if there are none with 44.1 or 48khz...

--alt-preset is just something like a short form of many different settings for lame
--alt-preset 96 includes --resample 32 so it will of course not work to use --resample 32 together with --resample 44.1 (the --alt-preset options are preferred)

btw. this --resample 44.1/48 thingie was already discussed a long time ago, search the forum for more info...

yotsuya-san
31st August 2003, 21:30
OK. I've read almost all posts that discuss about "--resample". I've read that it's not that simple to make "GK" resample correctly (http://forum.doom9.org/showthread.php?s=&threadid=50033&perpage=20&highlight=resample%2044.1&pagenumber=11 so the easy way is to manually add "--resample 44.1".
It seems that I still have no problems with sync both with 32khz 96 cbr and "--alt-preset 96 --resample 44.1" (@bond: why do you say that it does not work? Try it :) There are many people in that posts that mention it).

bond
1st September 2003, 09:29
Originally posted by yotsuya-san
@bond: why do you say that it does not work? Try it :) There are many people in that posts that mention it).because i already tried it a long time ago (with gknot 0.26) and it didnt work, that was the old discussion i pointed you to, but it seems that this already has been fixed :)

yotsuya-san
3rd September 2003, 10:17
Hi all! Just to say that I've found a setting that will no bother you again.
Lame (abr) resamples to 32 khz from a bitrate of 102 to lower. From 103 or higher it keep 44.1 khz. The same applies to --alt-preset.
I've done some tests and I've found that "--abr 103 -h" (GK default@abr 103) is more undersized than "--alt-preset 103", which uses more 112 kbps frames. ap 103 has also a higher lowpass, about 15500 hz, while --abr 103 has a 13200 one.
Anyway, I'll try "--alt-preset 103" as minimum audio bitrate.
Bye.