Coder Social home page Coder Social logo

Comments (32)

SakethSathuvalli avatar SakethSathuvalli commented on July 21, 2024 2

All I am saying is when You apply a gain of 2.0 or more on this output(pcm_sample = pcm_sample * 0.5), the samples will get clipped.

The sample values exceed the range [-1.0, 1.0] by a very marginal value(< 1e-2). This is due to the implementation and is expected. Also this can happen even if the encoder takes care of clipping.

Thanks!

from libmpegh.

SakethSathuvalli avatar SakethSathuvalli commented on July 21, 2024 1

Hi @sclsj,

Try once with our latest commit - 3b23f65

Thanks!

from libmpegh.

sclsj avatar sclsj commented on July 21, 2024 1

from libmpegh.

SakethSathuvalli avatar SakethSathuvalli commented on July 21, 2024

Hi,

Please refer to our https://github.com/ittiam-systems/libmpegh/blob/main/docs/IA-MPEG-H-3D-Audio-Dec-GSG.doc and
https://github.com/ittiam-systems/libmpegh/blob/main/docs/IA-MPEG-H-3D-Audio-Dec-API.doc if any information is available for your use case.

Thanks!

from libmpegh.

sclsj avatar sclsj commented on July 21, 2024

I'm sorry, I'm not very literate in this topic. I tried to read the guide but can't really understand it and so I can't find revevant information. Am I correct in understanding that this is not something I can do with the command-line program but something that might be possible by using the library?

from libmpegh.

SakethSathuvalli avatar SakethSathuvalli commented on July 21, 2024

Hi @sclsj,

Please refer to the entries in tables 3-1 and 3-2 of the API document. These tables have details about the buffers that carry the object audio information when external rendering is enabled. The interfaces are provided as per the specification for MPEG-H and expects the user of this data to have prior knowledge of programming and digital audio formats(PCM data of multichannel).

Thanks!

from libmpegh.

sclsj avatar sclsj commented on July 21, 2024

Unfortunately I do not know any programming language. Is there a demo or sample code that allows extraction of object data (i.e. MPEG-H 3d mp4 --> adm bwf) anywhere?

from libmpegh.

SakethSathuvalli avatar SakethSathuvalli commented on July 21, 2024

Hi @sclsj,

We have recently added a wiki page on external rendering interfaces. Can You please check if it helps you with the issue you are facing?

Thanks!

from libmpegh.

sclsj avatar sclsj commented on July 21, 2024

Hi @SakethSathuvalli

It definitely helped. However, it seems like I'm getting a lot of popping noises, perhaps due to some problems with the limiter, for example limiter not applied and resulting in heavy clipping. How can I set a lower global gain (for example, multiple every gain for object by 0.5x so it won't clip)? Or maybe disable DRC for objects completely? I can't find an option for either.

from libmpegh.

sclsj avatar sclsj commented on July 21, 2024

Below is an example. See the first 2 channels that are heavily clipped/limited.

截屏2023-01-31 11 21 26

from libmpegh.

sclsj avatar sclsj commented on July 21, 2024

I think these weird samples are why there are constant popping sounds. It seems like the clipped samples become negative? I'm not sure what's happening but it's definitely because the signal clipped.

截屏2023-01-31 11 21 22

from libmpegh.

SakethSathuvalli avatar SakethSathuvalli commented on July 21, 2024

I think these weird samples are why there are constant popping sounds. It seems like the clipped samples become negative? I'm not sure what's happening but it's definitely because the signal clipped.

截屏2023-01-31 11 21 22

@sclsj, Can You please let know if the waveform shown above is of the audio data file generated using -ext_ren:1 flag ?

from libmpegh.

sclsj avatar sclsj commented on July 21, 2024

Hi @sclsj,

Try once with our latest commit - 3b23f65

Thanks!

It definitely worked.

However, the objects are still peak limited. How can I set a lower gain for objects?

For the channel output, I messed around with files containing "gain" and lowered the gain (therefore disabling DRC) by modifying all gain in impeghd_peak_limiter.c to 0.1. What would be the corresponding edit that would set a lower object gains (perhaps times a factor of 0.1)?

from libmpegh.

SakethSathuvalli avatar SakethSathuvalli commented on July 21, 2024

Hi @sclsj,

The DRC effect will not be applied on the external renderer interfaces PCM output. It appears that the original content itself is peak limited in nature.

Thanks!

from libmpegh.

SakethSathuvalli avatar SakethSathuvalli commented on July 21, 2024

Hi @sclsj,

We would like to close this issue if You can confirm that you are able to extract individual objects with the -ext_ren: switch.

Regarding the gain, the decoder does not have a provision to apply desired gain on decoded objects.

Thanks!

from libmpegh.

sclsj avatar sclsj commented on July 21, 2024

Thank you for all your help! Yes, I was able to use the ext_ren switch. Just want to confirm again that no processing is done to the decoded objects for extren, and all the drc metadata and such are included in the bitstream file?

from libmpegh.

sclsj avatar sclsj commented on July 21, 2024

Hi @sclsj,

Try once with our latest commit - 3b23f65

Thanks!

I'm still curious why that happened. From my experience you can exceed 0 dB in 24 bits? E.g. if I record in QuickTime the peak usually > 0dB and I have to apply like a -10dB gain. Even if 16 bit (e.g. convert from 24 bit to 16 bit in-place in Audition on file with >0dB peak), shouldn't be audio just be clipped? I thought that's the normal behavior?

And also why would that happen in the first place? Shouldn't the encoded objects be peak normalized/limited in the first place (by the encoder)?

And could you explain how did you fix this (e.g. lower the gain?)?

from libmpegh.

sclsj avatar sclsj commented on July 21, 2024

Also, it seems like the new version of libmpegh fails to decode 360 RA files from Deezer.

ia_mpeghd_testbench -ext_ren:1 -ifile:/Users/jin/Music/deemix\ Music/YOASOBI\ -\ THE\ BOOK\ 2/07\ -\ もしも命が描けたら.mp4 -ofile:mingdeemix.wav
-ifile:/Users/jin/Music/deemix Music/YOASOBI - THE BOOK 2/07 - もしも命が描けたら.mp4 -ofile:mingdeemix.wav 
                       ITTIAM SYSTEMS PVT LTD, BANGALORE
                             http:\\www.ittiam.com
                      IA_MPEG_H_3D_AUD_DEC_ARM $Rev: 1.2 $
                                        

fatal error: Ittiam mpegh_dec  core coder module :Initialization: : Initialization fatal error

from libmpegh.

SakethSathuvalli avatar SakethSathuvalli commented on July 21, 2024

Also, it seems like the new version of libmpegh fails to decode 360 RA files from Deezer.

ia_mpeghd_testbench -ext_ren:1 -ifile:/Users/jin/Music/deemix\ Music/YOASOBI\ -\ THE\ BOOK\ 2/07\ -\ もしも命が描けたら.mp4 -ofile:mingdeemix.wav
-ifile:/Users/jin/Music/deemix Music/YOASOBI - THE BOOK 2/07 - もしも命が描けたら.mp4 -ofile:mingdeemix.wav 
                       ITTIAM SYSTEMS PVT LTD, BANGALORE
                             http:\\www.ittiam.com
                      IA_MPEG_H_3D_AUD_DEC_ARM $Rev: 1.2 $
                                        

fatal error: Ittiam mpegh_dec  core coder module :Initialization: : Initialization fatal error

The failure could be because the stream configurations may not be supported by our decoder. Example the stream could belong to a higher profile level.

from libmpegh.

SakethSathuvalli avatar SakethSathuvalli commented on July 21, 2024

Hi @sclsj,
Try once with our latest commit - 3b23f65
Thanks!

I'm still curious why that happened. From my experience you can exceed 0 dB in 24 bits? E.g. if I record in QuickTime the peak usually > 0dB and I have to apply like a -10dB gain. Even if 16 bit (e.g. convert from 24 bit to 16 bit in-place in Audition on file with >0dB peak), shouldn't be audio just be clipped? I thought that's the normal behavior?

And also why would that happen in the first place? Shouldn't the encoded objects be peak normalized/limited in the first place (by the encoder)?

And could you explain how did you fix this (e.g. lower the gain?)?

The fix is related to limiting the upper and lower limits of a 24-bit data. These are referred to as saturation fixes.

from libmpegh.

sclsj avatar sclsj commented on July 21, 2024

Hi @sclsj,
Try once with our latest commit - 3b23f65
Thanks!

I'm still curious why that happened. From my experience you can exceed 0 dB in 24 bits? E.g. if I record in QuickTime the peak usually > 0dB and I have to apply like a -10dB gain. Even if 16 bit (e.g. convert from 24 bit to 16 bit in-place in Audition on file with >0dB peak), shouldn't be audio just be clipped? I thought that's the normal behavior?
And also why would that happen in the first place? Shouldn't the encoded objects be peak normalized/limited in the first place (by the encoder)?
And could you explain how did you fix this (e.g. lower the gain?)?

The fix is related to limiting the upper and lower limits of a 24-bit data. These are referred to as saturation fixes.

Can you tell me a bit more? I failed to get more information with basic search. Did you just clip the samples?

from libmpegh.

SakethSathuvalli avatar SakethSathuvalli commented on July 21, 2024

Hi @sclsj,
Try once with our latest commit - 3b23f65
Thanks!

I'm still curious why that happened. From my experience you can exceed 0 dB in 24 bits? E.g. if I record in QuickTime the peak usually > 0dB and I have to apply like a -10dB gain. Even if 16 bit (e.g. convert from 24 bit to 16 bit in-place in Audition on file with >0dB peak), shouldn't be audio just be clipped? I thought that's the normal behavior?
And also why would that happen in the first place? Shouldn't the encoded objects be peak normalized/limited in the first place (by the encoder)?
And could you explain how did you fix this (e.g. lower the gain?)?

The fix is related to limiting the upper and lower limits of a 24-bit data. These are referred to as saturation fixes.

Can you tell me a bit more? I failed to get more information with basic search. Did you just clip the samples?

Yes, the samples will be clipped to maximum / minimum value if they are found to exceed.

from libmpegh.

sclsj avatar sclsj commented on July 21, 2024

Got it. What should I do if I don't want it to clip? Is it possible to reduce the gain or to output as 32-bit float, which wouldn't have this problem?

from libmpegh.

SakethSathuvalli avatar SakethSathuvalli commented on July 21, 2024

For the individual objects it is not possible to apply gain.

from libmpegh.

SakethSathuvalli avatar SakethSathuvalli commented on July 21, 2024

Even when float output is given the values exceeding [-1.0, 1.0] will be clipped. However, support for float output is currently not available

from libmpegh.

sclsj avatar sclsj commented on July 21, 2024

But is it possible to solve this one way or another? Clipping is still bad, although not nearly as bad as inverted samples.

from libmpegh.

sclsj avatar sclsj commented on July 21, 2024

Even when float output is given the values exceeding [-1.0, 1.0] will be clipped. However, support for float output is currently not available

I'm asking about float since QuickTime Player on macOS records in 24-bit float and every time I record most of the samples are > 0dB. I just do a -12dB volume reduction and it's ready to be used.

from libmpegh.

SakethSathuvalli avatar SakethSathuvalli commented on July 21, 2024

A not so clean way is to tap the output before clipping. This has to be done in the code. Please check the fix given for saturation overflow. It can help you with the buffer containing audio data that is not clipped.

Thanks!

from libmpegh.

sclsj avatar sclsj commented on July 21, 2024

Emm... I just replaced that with pcm_sample = pcm_sample * 0.5f and it seemed to work... Other than increased noise floor, what problems might that cause?

from libmpegh.

SakethSathuvalli avatar SakethSathuvalli commented on July 21, 2024

When You try to apply gain on the output again the clipping behavior will be seen again when the data is stored as 16/24 bit PCM. Other than this I don't see any other implications.

Thanks!

from libmpegh.

sclsj avatar sclsj commented on July 21, 2024

I don't think I understood you. Could you please explain more? Are you saying that if this 0.5 gain is not low enough for certain files, the ext_ren pcm will still be clipped?

Also, why would the encoded objects be greater than 0dB? Shouldn't the encoder clip any values exceeding [-1.0, 1.0]? I don't understand why, if the encoded objects can be greater than 1.0, the decoded output can't be with a significantly higher bitrate. I'm sorry if this question seems silly.

Thank you for all your help!

from libmpegh.

sclsj avatar sclsj commented on July 21, 2024

Hello again! You locked #38 due to off-topic, so I'm unable to delete or hide my comment. You have my consent to delete or hide my comment.

from libmpegh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.