Menu

#106 Noise in between while playing 8 bit file

1.8.1
closed-invalid
nobody
mpg123 (104)
5
2009-10-08
2009-08-06
Sreejith
No

Hi,

I am generating pcm raw data from mp3 file by using the command line
mpg123 -s --8bit xxx.mp3 > xxx.pcm

I tried playing it in 2 different players and i could hear some noise during playback.
The version of mpg123 i am using is 1.8.1
on intel pc

Discussion

  • Thomas Orgis

    Thomas Orgis - 2009-08-06

    Please define "some noise". Is this related to bug 2805665?
    And, are we talking about https://bugs.gentoo.org/show_bug.cgi?id=56765 here, too?

     
  • Sreejith

    Sreejith - 2009-08-06

    thanks for the reply. Please find my replies inline
    >>Please define "some noise"
    By "Some noise", i meant just like a hissing sound in the background of actual audio. This hissing sound was not present in the original mp3 file.
    >>Is this related to bug 2805665?
    I had seen this bug also. But in that bug you have mentioned that mpg123 -s --8bit command is working properly. That's why i thought of asking this in a different thread.

    >>And, are we talking about https://bugs.gentoo.org/show_bug.cgi?id=56765
    here, too?
    The bug you mentioned is the same.

     
  • Thomas Orgis

    Thomas Orgis - 2009-08-06

    OK, so again, to make it crystal clear:

    1. You here the normal decoded sound.
    2. There is some additional hissing in the background, all the time.

    So clearly not total static noise (like in the opening of the gentoo bug). And:

    3. The output of mpg123 --8bit -s file.mp3 > file.raw sounds different than mpg123 --8bit -w file.wav file.mp3, or plain playback, even?

     
  • Sreejith

    Sreejith - 2009-08-06

    OK, so again, to make it crystal clear:

    >>1. You here the normal decoded sound.
    Yes. Correct
    >>2. There is some additional hissing in the background, all the time.
    Audible when mainly at the start of playback. Not distinguishable when the music is heavy( when all the instruments are playing in the background)

    >>So clearly not total static noise (like in the opening of the gentoo bug).
    And:
    3. The output of mpg123 --8bit -s file.mp3 > file.raw sounds different
    than mpg123 --8bit -w file.wav file.mp3, or plain playback, even?

    Plain playback of the mp3 file doesnt have this hissing sound.
    The wav file is also having this hissing noise.

     
  • Thomas Orgis

    Thomas Orgis - 2009-08-07

    Hm, what I hear is a somewhat increased noise floor... can you give an example file (piece of)?
    original mp3 + decoded 8 bit

    Perhaps then I can know what your are talking about exactly. Attaching a few 100K should be OK here.

     
  • Sreejith

    Sreejith - 2009-08-07

    i will update this .
    Mean while can i send u the test file? instead of uploading to the site?

     
  • Thomas Orgis

    Thomas Orgis - 2009-08-08

    send it to maintainer@ ...

     
  • Sreejith

    Sreejith - 2009-08-10

    @... ?

     
  • Thomas Orgis

    Thomas Orgis - 2009-08-10

    maintainer@mpg123.org ... sorry

     
  • Sreejith

    Sreejith - 2009-08-10

    i have send the file

     
  • Thomas Orgis

    Thomas Orgis - 2009-08-11

    Well, I hear the same kind of distortion with any type of output with the --8bit flag: writing to WAV file, writing RAW data and output via ALSA all sound the same.
    Is this not the case for you?

    What I can confirm is the added noise, that seems odd especially during the silent moments. I can fix these silent moments by changing the 16->8bit conversion routine a bit, but overall crackling quantisation noise remains there.
    I have to investigate how much of that is necessary (I must admit that I am not using the 8bit mode personally).

    But before dismissing this as a feature enhancement (more high-quality requantization to 8bit), I want to get a note from you about you getting different sound with plain output with --8bit and WAV file writing. Are we talking of the same thing or am I still missing the real bug (in that case: please send me a decoded piece as WAV / raw).

    And then, out of curiosity: What are you using the 8bit mode for? Is there a technicål requirement?

     
  • Sreejith

    Sreejith - 2009-08-11

    >>
    But before dismissing this as a feature enhancement (more high-quality
    requantization to 8bit), I want to get a note from you about you getting
    different sound with plain output with --8bit and WAV file writing. Are we
    talking of the same thing or am I still missing the real bug (in that case:
    please send me a decoded piece as WAV / raw).

    I will send u the decoded piece also. but i think we are talking about the same issue..

    >>And then, out of curiosity: What are you using the 8bit mode for? Is there
    a technicål requirement?

    Yes..i would like to use the 8 bit version also.

     
  • Thomas Orgis

    Thomas Orgis - 2009-08-12

    The way I see it now is that we are talking about quantization noise in the 8bit conversion. This can be lessened a bit by proper rounding instead of truncation, but it will stay... one can paint it over with dithering, adding artificial noise.
    That is what sox does when converting to 8bit (it sounds like that at least), and that is what we do when converting from internal floating point to 16 bit in the dithered decoders.

    Again, to be absolutely sure: You hear this "noise in between" also for plain playback with mpg123 when you use the --8bit switch? Please answer Yes or No.

    If the answer is no, then please attach the console printout of
    mpg123 -vvv --8bit file.mp3

    I want to be sure about what output format we talk there.

    And, then back to the motivation of 8bit output: This is a historic feature of mpg123 to support audio hardware that only accepts 8bit samples (u-law coding and friends, too). It is rarely needed nowadays -- at lest the mpg123 team is not aware of the uses. The task of getting output at all is achieved by the method we have, quick and dirty. For not too silent loudness level, the distortions are not bad -- judging by the fact that nobody complained before.

    Is there really a technical reason for you to use 8bit output? Since the 8bit conversion is some form of postprocessing inside mpg123, too (on 16bit samples), you may be better off applying your preferred 8bit conversion outside mpg123 (in a pipe, possibly letting mpg123 write out floating point samples to round to 8bit integer).
    When we enhance the 8bit conversion with dithering and all the fun, we should know that there are really people needing it, otherwise it's bloat to enhance quality for a very low-quality sample format.

     
  • Sreejith

    Sreejith - 2009-08-15

    i havenot tried the plain playback yet with 8 bit switch.
    The reason why i am using 8bit switch is that , i am unable to play 16 bit in my hardware due to some other reasons. So i was testing with 8 bit lpcm and i was using --8bit switch to produce lpcm.

     
  • Sreejith

    Sreejith - 2009-08-15

    Also, is there any support for live decoding of mp3 to lpcm.
    I was using mpg123_open_feed and getting a buffer and giving the buffer to mpg123_decode.
    Is it the real procedure to do?

    Also, whenver i am setting a format with mpg123_format() and trying to get it with mpg123_getformat(), i am getting the older value only. Ie, mpg123_format() setting dint get affected.. Is it the real behavior of these 2 API's?

    I dont know whether this is the right channel to ask this question. but, i would appreciate any help given.

     
  • Sreejith

    Sreejith - 2009-08-15

    Thanks.. Yes the same question... But i am yet to get your reply by mail.
    i have nt got any mail from the list.. may be they are in my spam folder..let me check it..
    I thought of asking here only because i dint get the answer from anyone.
    Can you answer the first question also.. regarding mpg123_open_feed()??

     
  • Sreejith

    Sreejith - 2009-09-07

    I am sorry for posting this here. But i need some help. Mailing list is not helping me. This is the mail i sent one week back to the users mailing list.
    Please reply to this or suggest what is happening to my mailing list subscription?

    Hi,

    This is my second mail regarding the same topic. I am sorry for the repeated mails. I am not getting any mails from the mailing list. Usually i check the mail archives to see if anyone
    has replied to my mail. But this time,i couldnt see my prev mail in the mail archive as well. I dint
    get any failure report as well.

    I have some doubts doubt regarding mpg123_decode().
    This is a case where the inmemory is always a fixed size.

    1. What happens when the outmemory doesnt have the enough space for holding the decoded data? What is the error returned at this point? Is it MPG123_NO_SPACE? If yes, how do i get the fully decoded data from inmem after getting this error?

    2. What happens when the outmemory size is more than the size needed after decoding? Which means some space of outmemory is still wasted/ all zeores.Will i get the error MPG123_NEED_MORE error in this case?

    -Sreejith

     
  • Thomas Orgis

    Thomas Orgis - 2009-10-08
    • status: open --> closed-invalid
     

Log in to post a comment.