/LiveTalk

Integrate yasea and ijkplayer to demonstrate one-to-many real-time live streaming scenario

Primary LanguageJava

Requirements

Overview

Installation

  • git clone the code

  • Import Module jjdxm_ijkplayer from Android Studio with jjdxm_ijkplayer repo and name as jjdxm_ijkplayer

  • Comment root.project.* in jjdxm_ijkplayer/build.gradle, use your app configuration instead.

  defaultConfig {
        minSdkVersion 9
        targetSdkVersion 23
        /*minSdkVersion rootProject.ext.jjdxm_minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode rootProject.ext.jjdxm_versionCode
        versionName rootProject.ext.jjdxm_versionName*/
    }
  • Import Module from ossrs and name as ors.yasea

How to use

  • Setting up your local RTMP and LiveTalkServer location in app/build.gradle
debug {
            buildConfigField "String", "API_HOST", "\"http://10.0.3.2:10010\""
            buildConfigField "String", "RTMP_HOST", "\"rtmp://10.0.3.2/live/%s\""
            buildConfigField "String", "API_TOKEN", "\"Ss-^3EnbsM`Mbp(#ou2})&wXYn|Pu\""
        }
  • Create Room by clicking + floating button or clicking list item for join the room
  • Enjoy !!!

Screenshots

Use Opensources

jjdxm_ijkplayer

ossrs

Test

Subscriber

  • GenyMotion Google Nexus 5X API Level 23 Android 6.0.1
  • Redmi Note 3

Publisher

  • Xiaomi Note 2 Android 6.0.0
  • Redmi Note 3

Others

ijkMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "probsize", 4096);
ijkMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "fflags", "nobuffer");
// disable the buffer can shorten the RTMP latency

Know Issues

yixia/VitamioBundle#321

...maybe replace vitamio

TODO

  • Replace Vitamio, because of continus playing make cause accumulated buffer and lead to latency issue
  • Add Chat came from subscriber
  • Check Streaming Audio is fine

Useful information

RTMP latency