Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question PCM Buffersize in SrsEncoder.java #825

Open
JDBae opened this issue Sep 1, 2021 · 5 comments
Open

Question PCM Buffersize in SrsEncoder.java #825

JDBae opened this issue Sep 1, 2021 · 5 comments
Labels

Comments

@JDBae
Copy link

JDBae commented Sep 1, 2021

in the SrsEncoder.java, I like to know the reason ..

  • add 8191 and divide by 8192
    I send RTMP stream to AWS Medialive then audio get popcorn sound.
    If popcorn sound is from latetenancy, then I would like to adjust more precisely....

private int getPcmBufferSize() {
int pcmBufSize = AudioRecord.getMinBufferSize(ASAMPLERATE, AudioFormat.CHANNEL_IN_STEREO,
AudioFormat.ENCODING_PCM_16BIT) + 8191;
return pcmBufSize - (pcmBufSize % 8192);

@begeekmyfriend
Copy link
Owner

You might use ffmpeg to stream your test file to the AWS with authenticated URL to verify the rightness of codec format.

@JDBae
Copy link
Author

JDBae commented Sep 2, 2021

Using your source, most of thing i used it as you make.
In the scenario, I hear the tick noise and popcorn sound.

  • Play music in phone
  • get the music sound using mic
  • get video from camera
  • and streaming to AWS medialive

Would you guide me on this ?
It is happen in android.

@begeekmyfriend
Copy link
Owner

begeekmyfriend commented Sep 3, 2021

Would you please changing a mobile phone? Or did you run on other Android devices? Besides you can use recording function to hear whether there is tick noise.

@JDBae
Copy link
Author

JDBae commented Sep 3, 2021

I tested it LG phone and Samsung and others.. it is happened ....
Actually I can hear popcorn sound and tick noise.
During test I did not touch phone at all.
really I don't know... how it can be solved....
Yes, I test with wowza , then it is ok
But AWS medialive, it have that sound.
Another facts to be consider is IOS is fine with AWS medialive....

@begeekmyfriend
Copy link
Owner

begeekmyfriend commented Sep 3, 2021

Maybe there should be some configuration mismatch between AWS and yasea. Could this #554 (comment) help you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants