Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Smaller file sizes with vorbis to mp3 (Read 9839 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Smaller file sizes with vorbis to mp3

I found the following while compressing to vorbis and mp3 :

Original WAV : 35836 KB
Vorbis ogg at Qval 2 : 2415 KB
LAME MP3 -V8 --vbr-new : 2270 KB

Then I transcoded the vorbis file (2415 KB) to LAME MP3 with -V8 --vbr-new.

Result MP3 : 1981 KB (!)

So by using vorbis as a go between, I eliminated approx 12% of my MP3 filesize.
And the result was quite good.
I've had this result with every original WAV I compressed.

Now here's my question : what's going on here ?
Why is the difference so big while transcoding ?
Does MP3 compression keep too much high frequencies ?
Does vorbis compression create files that are easier to compress afterwards ?
Am I loosing quality that I'm not hearing straight away ?

Smaller file sizes with vorbis to mp3

Reply #1
What is the point? Naturally the transcoded MP3 VBR file will be a bit smaller because the intermediate wave file decoded from the heavily compressed Vorbis file is quite different from the original wave and surely contains significantly less information.

You should encode an MP3 file directly from the original wave file using LAME 3.97b with --preset 80. Compare the two 80 kbps MP3 files (the previously transcoded and this new one) with e.g. Foobar 2000 & foo_abx comparator.

Smaller file sizes with vorbis to mp3

Reply #2
I'll do some comparisons with files resulting in an average of 80 kbps during the weekend.
But I think --preset 80 is quite different from --vbr-new -V8.
V8 uses far less bits for files with silences.

Example :
Dvorak - Dumka (slow classical).wav : 54822 KB
LAME --preset 80 : 2869 KB
Vorbis Q2 and then Lame --vbr-new -V8 : 1911 KB (encoding with vorbis go between)

So while I'm using Q values for compression, I think --preset 80 tries to accomplish approx 80 kbps.
Which is not a good filosophy imo, because some files need a few more bits, and others don't.
I've never used ABR compression before, and I don't think I'll start now.

Though I understand the fact that you can accomplish higher compression by using different params, I still wonder if transcoding like this gives better quality for smaller files.
But like I said, I'll try comparing during the weekend.

Smaller file sizes with vorbis to mp3

Reply #3
Well, these differences tell you something about *objective* quality. In this case its suffering because the transcoding source is weak. Try it with something like wavpack 450k and the files will always be similar in size.

Smaller file sizes with vorbis to mp3

Reply #4
I compared the files resulting from lame --preset 80 to files resulting from vorbis q2, followed by lame --vbr-new -V8. I only did this if the resulting bitrates of these files were close or the same.
The transcoded files seem more accurate, more "dry".
On some samples they give the same artifacts, but on hi hat hiss sounds and female chorus voices the lame --preset 80 files were filled with metalic screetching, while the transcoded files weren't.
I'm not into ABX'ing, but I'd like to ask those who know how to do a more objective comparison.

I think I've found a way to decrease (low) bitrate of LAME VBR mp3's while maintaining decent quality, but I'm in desperate need of confirmation. 

If this checks out, you could combine the vorbis coding engine with LAME to make mp3's even smaller, while keeping certain quality levels.

It's possible that certain switches can do the same with lame, but I not familiar with all the tweaking switches.

(To shadowking : I'm sorry, but I haven't got a clue what you were trying to say and what wavpack has got to do with this)

Smaller file sizes with vorbis to mp3

Reply #5
Quote
I compared the files resulting from lame --preset 80 to files resulting from vorbis q2, followed by lame --vbr-new -V8. I only did this if the resulting bitrates of these files were close or the same.
The transcoded files seem more accurate, more "dry".
On some samples they give the same artifacts, but on hi hat hiss sounds and female chorus voices the lame --preset 80 files were filled with metalic screetching, while the transcoded files weren't.
I'm not into ABX'ing, but I'd like to ask those who know how to do a more objective comparison.

I think I've found a way to decrease (low) bitrate of LAME VBR mp3's while maintaining decent quality, but I'm in desperate need of confirmation. 

If this checks out, you could combine the vorbis coding engine with LAME to make mp3's even smaller, while keeping certain quality levels.

It's possible that certain switches can do the same with lame, but I not familiar with all the tweaking switches.

(To shadowking : I'm sorry, but I haven't got a clue what you were trying to say and what wavpack has got to do with this)
[a href="index.php?act=findpost&pid=332739"][{POST_SNAPBACK}][/a]


One of the fundamental principles of an abx test is that you not know which file you're listening to while you're evaluating it.  If you do, your mind will often hear what you want to hear, or perhaps what you expect to hear (i.e. your comments such as "dry, more accurate" which are very subjective).  The way to make that objective is to do blind testing.

I would think that it is possible that there are lame artifacts at 80kbps that an additional layer of encoding might eliminate, but that says more about the low quality of an 80 kbps encode than anything else.  There are probably other things about the double-encoded files that sound worse, but I doubt you are listening for them, or that you'd even notice them unless you do blind tests.

Smaller file sizes with vorbis to mp3

Reply #6
I mentioned --preset 80 only because it is an easy way to accomplish the same bitrate you got here:

Quote
Original WAV : 35836 KB
Vorbis ogg at Qval 2 : 2415 KB
LAME MP3 -V8 --vbr-new : 2270 KB

Then I transcoded the vorbis file (2415 KB) to LAME MP3 with -V8 --vbr-new.

Result MP3 : 1981 KB

because:  35836/1981=18.09  and  1440 kbps/18.09=79.60 kbps

In your second example you should use --preset 50 instead,

because:  54822/1911=28.69 and 1440 kbps/28.69=50.20 kbps

However if the sample file contains long passages of audio that compresses extremely well then ABR encoding is not the best choice because it doesn't use high enough bitrates during the difficult passages.

For making the comparison fairer you should try to find a VBR setting that produces a 1911 kB file directly from the wave file.

In any case you should perform the ABX listening test and provide a test report and lossless sample files.

Smaller file sizes with vorbis to mp3

Reply #7
Actually, I would like to know how long passages of audio data LAME ABR analyses before it makes bitrate decisions. Obviously it doesn't make anything like two-pass encodings. A two-pass LAME ABR would be very nice option for e.g. video soundtracks in case a predictable file size is needed.

Smaller file sizes with vorbis to mp3

Reply #8
Lossy compression is all about throwing information away. Basically what you're doing is using vorbis to throw away information, then use mp3 to throw away even more of what's left. The reason the files end up smaller is because there's less to begin with.

In this light, doesn't it make much more sense to use one compressor to throw away everything at once? I mean, if transcoding was better, surely you'd see it be utillised as a form of two or multiple pass compression.

When transcoding gives you a smaller file, directly encoding to a file of the same size, despite setting a lower quality in the encoder, will result in a file that is closer to the original.

But as percieved audio quality is subjective, something technically inferior can still sound better to your ears, it's personal.
Veni Vidi Vorbis.

Smaller file sizes with vorbis to mp3

Reply #9
Quote
Actually, I would like to know how long passages of audio data LAME ABR analyses before it makes bitrate decisions. Obviously it doesn't make anything like two-pass encodings. A two-pass LAME ABR would be very nice option for e.g. video soundtracks in case a predictable file size is needed.


Now that's constructive thinking. I like that.
I would also suggest developing several passes for LAME VBR compression.

I've also read
Quote
In any case you should perform the ABX listening test and provide a test report and lossless sample files.

but like I said, I'm not into ABX'ing.

Again I'm pleading for the expert ABX people (for whom I have only the deepest respect) to do some testing on some "hard" samples with transcoded files and compare them to "--preset" files.
Their ears are probably better than mine, and they usually know what to look for in certain passages.

Thanx for all the replies, guys.
-Dirk-

Smaller file sizes with vorbis to mp3

Reply #10
Quote
but like I said, I'm not into ABX'ing.


If you're not "into" ABXing then what are you doing making claims that can only be backed up with ABXing?

Smaller file sizes with vorbis to mp3

Reply #11
Quote
If you're not "into" ABXing then what are you doing making claims that can only be backed up with ABXing?


If you read this thread carefully, you'll see I'm not claiming anything.
I found a certain result while compressing and suggested that it would be investigated further.
Do realize that some people are not equipped with good ears and ABX'ing is something that experienced people can do with more ease than others. If you know which artefacts there are, it's easier to locate them and compare samples.

It was my intention to make a constructive contribution to LAME compression.
But seeing remarks like this makes you wonder if amounts to anything.

Smaller file sizes with vorbis to mp3

Reply #12
Quote
Quote
If you're not "into" ABXing then what are you doing making claims that can only be backed up with ABXing?


If you read this thread carefully, you'll see I'm not claiming anything.
I found a certain result while compressing and suggested that it would be investigated further.
Do realize that some people are not equipped with good ears and ABX'ing is something that experienced people can do with more ease than others. If you know which artefacts there are, it's easier to locate them and compare samples.

It was my intention to make a constructive contribution to LAME compression.
But seeing remarks like this makes you wonder if amounts to anything.
[a href="index.php?act=findpost&pid=335105"][{POST_SNAPBACK}][/a]

Transcoding will never give you better results than encoding from an original. Think of it as copying a picture over and over in a Xerox machine. The more copies you make the worse it gets.

Smaller file sizes with vorbis to mp3

Reply #13
You may be wanting to help but I seriously doubt that any lossy codec developer is going to want to incorporate another lossy codec into their own as a preprocessor of some kind.

The file size is going down because the quality is; you're throwing information away twice. It may be different information being thrown away each time due to MP3 and Vorbis' differing psychoacoustic models and other features, but your resulting file will still have lost more information.

Smaller file sizes with vorbis to mp3

Reply #14
Quote
The file size is going down because the quality is; you're throwing information away twice. It may be different information being thrown away each time due to MP3 and Vorbis' differing psychoacoustic models and other features, but your resulting file will still have lost more information.
[a href="index.php?act=findpost&pid=335348"][{POST_SNAPBACK}][/a]

That file size is going down with this kind of transcoding is obvious bcause information gets thrown away.
While common sense suggests that transcoding degrades quality, and while this is suspected to be true usually things might be different with such very low bitrates. If theoretically vorbis throws away just those parts of the music that are problematic to Lame things might improve.
Only abxing can show. As I know from my own initiated thread (on 320 kbps encodings) just reasoning is not helpful.
Abxing on 80 kbps shouldn't be a problem. Maybe I can contribute (but I'm busy with other things right now).
lame3995o -Q1.7 --lowpass 17

Smaller file sizes with vorbis to mp3

Reply #15
Don't forget that, by default, -V 8 causes the input samples to be resampled to 32000Hz.

Smaller file sizes with vorbis to mp3

Reply #16
Quote
Don't forget that, by default, -V 8 causes the input samples to be resampled to 32000Hz.
[a href="index.php?act=findpost&pid=335364"][{POST_SNAPBACK}][/a]

As for abr for 104 kbps and above there is no resampling.
lame3995o -Q1.7 --lowpass 17

Smaller file sizes with vorbis to mp3

Reply #17
Quote
Maybe I can contribute


Thanks, halb27. I would really appreciate further testing.

Quote
Don't forget that, by default, -V 8 causes the input samples to be resampled to 32000Hz.


That's true. But so does the abr preset at low bitrates. I would like to see an objective comparison of the transcoded files against the --preset abr files.

Quote
Transcoding will never give you better results than encoding from an original


I fully agree with halb27. Theoretically, you would quickly jump to conclusions (like Gambit has done - no offense intended). But if there is a quality improvement by switching formats, maybe this can be used as a starting point to improve LAME further.
Please try to keep an open mind on this.

Smaller file sizes with vorbis to mp3

Reply #18
OK, I was about to refute your implications by argument, but I was bored so I ran one (1) abx test.

Sample: angelic
orig -> lame -V8 --vbr-new (396144 bytes)
orig -> ogg aotuvb4 lancer q2 -> lame -V8 --vbr-new (366516 bytes)

ABX was easy: 8/8. They both sounded horrible but sample B was even worse. Turns out sample B was the transcoded one (as was of course expected). Definitely not worth the 7.5% savings.

Drawing conclusions from just one sample alone of course is not enough. In a strict sense, it is also not valid to draw conclusions about "which is better" from an abx test; we'd need some blind ranking mechanism (like ABC/HR). dirkvl, I suggest you run your own set of tests. The transcoding artifacts are quite heavy at these bitrates and easy to spot.

It is against common knowledge and sense that transcoding should improve quality. If you can show an advantage we shall discuss it. Until then you are just asking other people to waste their time on your unsubstantiated theory.

Smaller file sizes with vorbis to mp3

Reply #19
Gecko what -q did you use in the Vorbis "pass"?

Smaller file sizes with vorbis to mp3

Reply #20
Quote
Gecko what -q did you use in the Vorbis "pass"?
[a href="index.php?act=findpost&pid=336556"][{POST_SNAPBACK}][/a]

Sorry, I used -q2 as the OP suggested. I forgot to add that info after I looked up the specific Vorbis version. Post updated.

Smaller file sizes with vorbis to mp3

Reply #21
For my test I first wondered what would be of most interest for the praxis.

On one hand this means to me comparing the result of your 2-step compression against a nearly same-bitrate direct compression as suggested by Alex B the way you have performed it already.

For the samples I decided to take 'real music' and not problem samples which seems to be more adequate for a low bitrate test where I personally would accept bad behavior on problem samples.
I used Rickie Lee Jones' Under the Boardwalk and Loreena McKennitt's Night Ride Across The Caucasus, both having a very good audio quality.

The first thing I noticed is that with these samples file size decrease by your method was only 6.6% resp. 6.9% against plain -V8. Not very attractive to me.

The direct compression method I used was --preset x with x chosen (by trials) so that the sum of the files compressed by --preset x was about the same as the filesize sum achieved by your method. Actually it was --preset 82. Filesize of your method's output compared to the preset-output was 4.7% bigger on the Loreena track and 7.2% smaller with Rickie's track.

I could easily abx both methods (as well as plain -V8) on both samples against the original because of the lack in high frequencies.
I could not abx the both methods aginst each other - I'm not that great at abxing however.

So for this test there is no reason to prefer your method over --prefix x, but there is no reason to do it the other way around either.
If you like the idea that vbr might take care of problematic passages and saves bits on calm ones, and if you personally prefer the sound with your method, just do it.

But you didn't talk about your background. Why do you want to use such low bitrates? mp3 isn't good at bitrates below 100 kbps. The most obvious thing to experience is the lack in high frequencies.
I guess it's for a mobile player, but then you usually have other choices. For mobile phones you often can use AAC, and for AAC iTunes' CBR96, CBR80, or even CBR64 yields adequate quality for a mobile phone. If HE-AAC (aacPlus) is supported this is a very good solution for the phone using 64kbps (use for instance Winamp 5 to encode).

Other than that you usually can use WMA. This is a more problematic choice, and WMA doesn't have a good reputation. However for bitrates below 100kbps I would prefer it. Poor reputation (apart from Microsoft origin) might be due to the difficult choice of options. The quality oriented vbr modes are really doing not good (Guru had two tests on that with 80 and 96 kbps). My own tests showed the bitrate oriented vbr modes (something like abr I guess) are doing much better. I have some listening experience with MWA9 VBR 96 kbps, and the results were pretty good to me. Next bitrate below is unfortunately VBR 64 kbps. I didn't try that but I would give it a chance if you're out for very low bitrates.

I had to decide on that too for my mobile phone, and ended up with --preset 104.
For me this is adequate quality for my phone, and I can use the files for other purposes too. I personally wouldn't use mp3 for bitrates lower than that.
Your method applies of course to higher bitrates too, and you can use for the final compression phase for instance -V6 instead of -V8.

You sure can't use vorbis on your player because otherwise -q1 would be the obvious choice.
lame3995o -Q1.7 --lowpass 17

Smaller file sizes with vorbis to mp3

Reply #22
Quote
Quote
Transcoding will never give you better results than encoding from an original


I fully agree with halb27. Theoretically, you would quickly jump to conclusions (like Gambit has done - no offense intended). But if there is a quality improvement by switching formats, maybe this can be used as a starting point to improve LAME further.
Please try to keep an open mind on this.
[{POST_SNAPBACK}][/a]

I'm not "jumping to conclusions". Please educate yourself better. This is a simple fact, and has been discussed many times before, like in this thread:
[a href="http://www.hydrogenaudio.org/forums/index.php?act=ST&f=1&t=6410&hl=reencoding&s=]http://www.hydrogenaudio.org/forums/index....l=reencoding&s=[/url]

And don't forget that it's up to you to provide test that support your claims, otherwise you are breaking the TOS.

Smaller file sizes with vorbis to mp3

Reply #23
Quote
I would also suggest developing several passes for LAME VBR compression.


VBR isn't at all about bitrate, so n-pass is just useless. It's like a "quantizer quality" in video compression. ABR and CBR vary the quantizer quality to get in a bitrate range, with VBR you have guaranteed a fixed quality, but at the expense of variable bitrate, that's its name!!!!

Also, CBR isn't at all CBR. A part of QuickTime AAC, that is intrinsecally variable bitrate (ABR?) nonwithstanding the "CBR" setting...

MP3 CBR is made of a fixed bitrate frames, but there is a bit reservoir that can store bits for future frames needing compplex encoding. One second of music can really be encoded in 320 kbits (maybe more?) if the bit reservoir is sufficiently big!

So, --preset cbr 80 *should* give more or less the same results of full VBR with 80kbps target. Whenever the bit reservoir is large enough.

Note: *should* means: "I'm quite sure I can't prove it, but logical reasoning leads me to thinking it is a good conjecture". Nothing to do with *claims*.

Smaller file sizes with vorbis to mp3

Reply #24
Quote
So, --preset cbr 80 *should* give more or less the same results of full VBR with 80kbps target. Whenever the bit reservoir is large enough.

No really, as the bit reservoir size is limited.