IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Noisy result when compressing raw to mp3 with lame
gabriel86
post Jul 3 2009, 09:10
Post #1





Group: Members
Posts: 3
Joined: 3-July 09
Member No.: 71168



Hello everyone,

I've been trying to compress a raw file with lame encoder to mp3. The resulting file plays out some of the original sound but covered in a lot of noise.
I also imported the file into audacity using import raw, and exported as an mp3 through lame and got a clean result - no noise.

The raw and mp3 files can be found here.

While importing to audacity i use the following settings :

32 bit float
Big-endian
1 Channel (Mono)
Start Offset 0 bytes
Amount to import 100%
Sample rate 44100 Hz

The command for lame command line is

lame -m m -r --bitwidth 32 123.raw --big-endian 123.mp3

If this topic has already been discussed, i apologize for the incorrect post and please direct me to it.

Best regards,
Gabriel
Go to the top of the page
+Quote Post
Maggi
post Jul 3 2009, 14:27
Post #2





Group: Members
Posts: 122
Joined: 31-May 07
Member No.: 43892



uhm, I think MP3 is limited to 16bit samples and it seems you are trying to compress 32bit audio data

no surprise to me that you get an MP3 of noise

try with bitwidth of 16 and you should be fine


Cheers,
Maggi


update:

I just listened to your 32bit raw file and it sounds horrible on my speakers, maybe because of those fairly loud high frequency portions.

However, even after exporting it to 16bit WAV and the compressing to mp3, it still sounds awefull, but both files sound similar to the raw file and are not as heavily compressed and distorted as your mp3 file

to sum it up, I don't know what's going wrong

Sorry

This post has been edited by Maggi: Jul 3 2009, 14:45
Go to the top of the page
+Quote Post
gabriel86
post Jul 3 2009, 14:57
Post #3





Group: Members
Posts: 3
Joined: 3-July 09
Member No.: 71168



QUOTE (Maggi @ Jul 3 2009, 16:27) *
uhm, I think MP3 is limited to 16bit samples and it seems you are trying to compress 32bit audio data

no surprise to me that you get an MP3 of noise

try with bitwidth of 16 and you should be fine


Cheers,
Maggi


update:

I just listened to your 32bit raw file and it sounds horrible on my speakers, maybe because of those fairly loud high frequency portions.

However, even after exporting it to 16bit WAV and the compressing to mp3, it still sounds awefull, but both files sound similar to the raw file and are not as heavily compressed and distorted as your mp3 file

to sum it up, I don't know what's going wrong

Sorry

Hi,

I'm using lame encoder on linux could that be a problem.
Should i use a diffrent encoder?

Regards,
Gabriel
Go to the top of the page
+Quote Post
lvqcl
post Jul 3 2009, 15:26
Post #4





Group: Developer
Posts: 3328
Joined: 2-December 07
Member No.: 49183



QUOTE (gabriel86)
lame -m m -r --bitwidth 32 123.raw --big-endian 123.mp3


I think LAME treats input as 32-bit int, not 32-bit float. Convert your raw file from float type to integer and try to encode.

This post has been edited by lvqcl: Jul 3 2009, 15:29
Go to the top of the page
+Quote Post
gabriel86
post Jul 3 2009, 16:04
Post #5





Group: Members
Posts: 3
Joined: 3-July 09
Member No.: 71168



QUOTE (lvqcl @ Jul 3 2009, 17:26) *
QUOTE (gabriel86)
lame -m m -r --bitwidth 32 123.raw --big-endian 123.mp3


I think LAME treats input as 32-bit int, not 32-bit float. Convert your raw file from float type to integer and try to encode.


Hi,

That's exactly what i tried after the last post and it worked. The ideea came to me from another post on this forum.
Thank you guys, you're life savers. beer.gif beer.gif beer.gif biggrin.gif blush.gif

Regards,
Gabriel
Go to the top of the page
+Quote Post
andy09
post Sep 8 2009, 12:43
Post #6





Group: Members
Posts: 2
Joined: 8-September 09
Member No.: 73005



QUOTE
I think LAME treats input as 32-bit int, not 32-bit float. Convert your raw file from float type to integer and try to encode.


I'm having the same problem with just noise as result - how do I convert the raw file from float to int?

Go to the top of the page
+Quote Post
andy09
post Sep 8 2009, 13:09
Post #7





Group: Members
Posts: 2
Joined: 8-September 09
Member No.: 73005



Solved.
I added -x as an lame option and the noise was turned into sound.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 26th July 2014 - 00:13