begeekmyfriend / yasea

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

Adaptive Streaming - question #240

Open oantajames opened 7 years ago

oantajames commented 7 years ago

@begeekmyfriend is there a way to change the bitrate and resolution while streaming ? In the encoder part you set the bitrate before the streaming starts . Thanks! public boolean start() { . . . setEncoderBitrate(vBitrate)

begeekmyfriend commented 7 years ago

Yes but you have to restart the encoder after changing the parameters with connection keeps working.

davidarchi commented 7 years ago

Could you tell details with code text, I am also looking for it Thanks

begeekmyfriend commented 7 years ago

@davidarchi See SrsPublisher.java where there are APIs.

nikhilkilivayil commented 7 years ago

But, restarting encoder is a time taking task. It will show one black screen and it will restart. So, bitrate changing time will loss any frame data?

begeekmyfriend commented 7 years ago

@nikhilkilivayil libx264 provides some encoding models for adaptive streaming, while hard encoding of Android does not.