AI prompts
base on RootEncoder for Android (rtmp-rtsp-stream-client-java) is a stream encoder to push video/audio to media servers using protocols RTMP, RTSP, SRT and UDP with all code written in Java/Kotlin # RootEncoder for Android
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-rtmp%20rtsp%20stream%20client%20java-green.svg?style=true)](https://android-arsenal.com/details/1/5333)
[![Release](https://jitpack.io/v/pedroSG94/RootEncoder.svg)](https://jitpack.io/#pedroSG94/RootEncoder)
[![Documentation](https://img.shields.io/badge/library-documentation-orange)](https://pedroSG94.github.io/RootEncoder)
<p align="center">
<strong>Sponsored with 💖   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:
```xml
<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>
```gradle
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>
```gradle
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.pedroSG94.RootEncoder:rtplibrary:2.2.6'
}
```
</details>
## Features:
- [x] Android min API 16.
- [x] Extra video sources minAPI 21+ (BitmapSource, CameraXSource and CameraUvcSource)
### Encoder:
- [x] Support [camera1](https://developer.android.com/reference/android/hardware/Camera.html) and [camera2](https://developer.android.com/reference/android/hardware/camera2/package-summary.html) API
- [x] Encoder type buffer to buffer.
- [x] Encoder type surface to buffer.
- [x] Audio noise suppressor.
- [x] Audio echo cancellation.
- [x] Disable/Enable video and audio while streaming.
- [x] Switch camera while streaming.
- [x] Change video bitrate while streaming (API 19+).
- [x] AV1, H264, H265, G711, AAC and OPUS hardware/software encoding.
- [x] Force video and audio Codec to use hardware/software encoding (Not recommended).
- [X] Record MP4 file while streaming (API 18+).
- [X] Set Image, Gif or Text to stream on real time.
- [X] OpenGL real time filters. [More info](https://github.com/pedroSG94/RootEncoder/wiki/Real-time-filters)
- [x] Stream from video and audio files like mp4, webm, mp3, etc (Limited by device decoders). [More info](https://github.com/pedroSG94/RootEncoder/wiki/Stream-from-file)
- [x] Stream device screen (API 21+).
### RTMP:
- [X] Get upload bandwidth used.
- [x] RTSP auth (adobe and llnw).
- [x] AV1, H265 ([Using RTMP enhanced](https://github.com/veovera/enhanced-rtmp/tree/main)), H264, AAC and G711 support.
- [x] RTMPS (under TLS)
- [x] RTMPT and RTMPTS (tunneled and tunneled under TLS)
- [x] AMF0
- [ ] AMF3
### RTSP:
- [X] Get upload bandwidth used.
- [x] RTMP auth (basic and digest).
- [x] AV1, H264, H265, AAC, G711 and OPUS support.
- [x] TCP/UDP.
- [x] RTSPS.
### SRT (beta):
- [X] Get upload bandwidth used.
- [X] H264, H265, AAC and OPUS support.
- [X] Resend lost packets
- [X] Encrypt (AES128, AES192 and AES256)
- [ ] SRT auth.
https://haivision.github.io/srt-rfc/draft-sharabayko-srt.html
### UDP (beta):
- [X] Get upload bandwidth used.
- [X] H264, H265, AAC and OPUS support.
- [X] Unicast, Multicast and Broadcast support.
- [X] MPEG2-TS support.
## 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](https://github.com/sponsors/pedroSG94) or [Paypal](https://www.paypal.com/paypalme/pedroSG94)
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
", Assign "at most 3 tags" to the expected json: {"id":"2434","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"