begeekmyfriend/yasea

Question PCM Buffersize in SrsEncoder.java

JDBae opened this issue · 5 comments

JDBae commented

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);

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

JDBae commented

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.

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 commented

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....

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