TakuSemba / RtmpPublisher

Rtmp client on Android. Live Video Streaming.
Apache License 2.0
623 stars 149 forks source link

latency and lag #2

Closed lordmen99 closed 6 years ago

lordmen99 commented 6 years ago

I have test with 2 phone, streaming play its good. but for latency still have late few second, and sound how make clear sound in viewers. its have some echo and noise

TakuSemba commented 6 years ago

There should be some latency of few seconds as long as you are using RTMP protocol. If you make the latency less than like 1 sec, you might be able to try WebRTC or something else.

When you put two phones close too much, it echos. because the player play the received audio and the publisher catch the audio and publish them again. try to put your receiver and sender far enough.

Please reopen this if you still have problems.

chengsam commented 5 years ago

@TakuSemba Thanks for this library! But the presence of echo is not much related to the distance of two phones, e.g. A and B are talking at the same time, the voice of A is played on B's device through speaker, then B talks at the same time, the voice of B and the voice of A played will be caught by B's phone and sent to A. As a result, A will hear his own voice. Any idea how this can be avoided?