Home

Awesome

RootEncoder for Android

Android Arsenal Release Documentation

<p align="center"> <strong>Sponsored with 💖 &nbsp by</strong><br /> <a href="https://getstream.io/?utm_source=github.com/pedroSG94/rtmp-rtsp-stream-client-java&utm_medium=github&utm_campaign=oss_sponsorship" target="_blank"> <img src="https://stream-blog-v2.imgix.net/blog/wp-content/uploads/f7401112f41742c4e173c30d4f318cb8/stream_logo_white.png?w=350" alt="Stream Chat" style="margin: 8px" /> </a> <br /> Enterprise Grade APIs for Feeds & Chat. <a href="https://getstream.io/tutorials/android-chat/?utm_source=https://github.com/pedroSG94/rtmp-rtsp-stream-client-java&utm_medium=github&utm_content=developer&utm_term=java" target="_blank">Try the Android Chat tutorial</a> 💬 </p> </br>

RootEncoder (rtmp-rtsp-stream-client-java) is a stream encoder to push video/audio to media servers using protocols RTMP, RTSP and SRT with all code written in Java/Kotlin

Note: The library was renamed from rtmp-rtsp-stream-client-java to RootEncoder after add SRT protocol because the name has no sense anymore

iOS version:

https://github.com/pedroSG94/RootEncoder-iOS

Wiki

https://github.com/pedroSG94/RootEncoder/wiki

Permissions:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />

Compile

To use this library in your project with gradle add this to your build.gradle:

<details open> <summary>Last version</summary>
allprojects {
  repositories {
    maven { url 'https://jitpack.io' }
  }
}
dependencies {
  implementation 'com.github.pedroSG94.RootEncoder:library:2.5.5'
  //Optional, allow use BitmapSource, CameraXSource and CameraUvcSource 
  implementation 'com.github.pedroSG94.RootEncoder:extra-sources:2.5.5'
}

</details> <details close> <summary>Old versions (2.2.6 or less)</summary>
allprojects {
  repositories {
    maven { url 'https://jitpack.io' }
  }
}
dependencies {
  implementation 'com.github.pedroSG94.RootEncoder:rtplibrary:2.2.6'
}
</details>

Features:

Encoder:

RTMP:

RTSP:

SRT (beta):

https://haivision.github.io/srt-rfc/draft-sharabayko-srt.html

UDP (beta):

Other related projects:

https://github.com/pedroSG94/RTSP-Server

3rd party projects:

Projects related with the library developed by other users. Contact with user owner if you have any problem or question.

https://github.com/FunnyDevs/rtmp-rtsp-stream-client-java-recordcontrollers

Real time filters:

NOTE:

In library version 2.0.9, the filters was refactored. Check the wiki link to migrate your implementation.

https://github.com/pedroSG94/RootEncoder/wiki/Real-time-filters

Looking for sponsors

This library need sponsors to get new devices or pay platforms to test and debug errors. Any donation or sponsor is welcome! If you are interested. You can contact me by email or donate directly on Github or Paypal Thank you!

Use examples:

Rotation example

This is the recommend way to use the library. This example support screen rotation, stream orientation (vertical, horizontal) filters and change video/audio sources on fly: https://github.com/pedroSG94/RootEncoder/tree/master/app/src/main/java/com/pedro/streamer/rotation

Screen example

Example to stream using Screen as video source using a service to stream in background: https://github.com/pedroSG94/RootEncoder/tree/master/app/src/main/java/com/pedro/streamer/screen

From file example

Code example to stream using a video file as video/audio source: https://github.com/pedroSG94/RootEncoder/tree/master/app/src/main/java/com/pedro/streamer/file

Old Api example

Code example for low API devices (Android API 16+): https://github.com/pedroSG94/RootEncoder/tree/master/app/src/main/java/com/pedro/streamer/oldapi