/srs-sea

The SEA(Stream Encoder for Android) publish live stream to SRS over HTTP-FLV.

Primary LanguageJavaMIT LicenseMIT

SEA

The SEA(Stream Encoder for Android) publish live stream to SRS over HTTP-FLV.

Download

The latest dev apk http://ossrs.net/apks/sea.latest.apk, or scan the below code:
SEA APK

Usage

The step to use the SEA:

  1. [Optional] Make sure your android is 4.1+, see Requirements
  2. [Optional] Check your MediaCodec info, see MediaCodec
  3. [Required] Download the SEA apk.
  4. [Required] Push to ossrs.net http://ossrs.net:8936/live/sea.flv, or read Stream Caster.
  5. [Required] Play the RTMP stream
  6. [Required] Play the FLV stream
  7. [Required] Play the HLS stream, or scan the below code:
    SEA HLS stream

Remark: Change the url if use your server, for instance:

Publish: http://yourserver:8936/live/sea.flv
RTMP URL: rtmp://yourserver:1935/live/sea
FLV URL: http://yourserver:8080/live/sea.flv
HLS URL: http://yourserver:8080/live/sea.m3u8

For more information about config of SRS, read StreamCaster.

Features

  • Only java files, without any native code.
  • Realtime live streaming, similar to RTMP.
  • Stable for POST HTTP FLV stream to SRS.
  • Hardware encoding with low cpu usage.

Requirements

Android SDK level 16+, Android 4.1, the JELLY_BEAN

Supported Devices

The following android device is test ok, others should be ok.

Company Band Android Codec
Huawei AscendG7 4.4 qcom
Huawei Honor6 4.4 -
Huawei Mate7 4.4 -
mi.com MI3 4.4 nvidia
魅族 mx4 pro 4.4.4 exynos(三星)
三星Media Galaxy Tab S T700 5.0.2 exynos(三星)
酷派 大神F2-8297 4.4.2 MTK(联发科)
小米 mi-4c 5.1.1 qcom

Please report your device if srs-sea is ok for your phone.

MediaCodec

To show your android media codec info, download the app, or scan the below code:
MEDIACODEC APK

About more information please read more.

WorkFlow

The workflow of the android publisher is:

  1. Setup the Camera preview, callback with the YUV(YV12) image frame.
  2. Setup the MediaCodec and MediaFormat, encode the YUV to h.264/avc in annexb.
  3. Remux the annexb to flv stream.
  4. HTTP POST the flv stream to SRS.

For more information, read the blog.

Low Latency

The latency is same to RTMP, 0.8s in lan and 3-5s in wan.

0.8s latency

Lightweight

800kbps

CPU 13% for publishing live to SRS over HTTP FLV, bitrate is 800kbps, fps is 25 and gop is 10s.

125kbps

CPU 6% for publishing live to SRS over HTTP FLV, bitrate is 125kbps, fps is 15 and gop is 5s.

Links

Projects from SRS-ORG:

Others:

Winlin 2015.5