begeekmyfriend / yasea

RTMP live streaming client for Android
MIT License
4.86k stars 1.32k forks source link

Question PCM Buffersize in SrsEncoder.java #825

Open JDBae opened 2 years ago

JDBae commented 2 years ago

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

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

begeekmyfriend commented 2 years ago

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

JDBae commented 2 years ago

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

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

begeekmyfriend commented 2 years ago

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 2 years ago

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 commented 2 years ago

Maybe there should be some configuration mismatch between AWS and yasea. Could this https://github.com/begeekmyfriend/yasea/issues/554#issuecomment-372936272 help you?