Coder Social home page Coder Social logo

xumingxin7398 / rootencoder Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pedrosg94/rootencoder

0.0 0.0 0.0 20.91 MB

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

License: Apache License 2.0

Java 42.13% Kotlin 55.79% GLSL 2.08%

rootencoder's Introduction

RootEncoder for Android

Android Arsenal Release Documentation

Sponsored with ๐Ÿ’– ย  by
Stream Chat
Enterprise Grade APIs for Feeds & Chat. Try the Android Chat tutorial ๐Ÿ’ฌ


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 (under develop):

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:

Version 2.2.6 or less

allprojects {
  repositories {
    maven { url 'https://jitpack.io' }
  }
}
dependencies {
  implementation 'com.github.pedroSG94.RootEncoder:rtplibrary:2.2.6'
}

Version 2.2.7 or more

allprojects {
  repositories {
    maven { url 'https://jitpack.io' }
  }
}
dependencies {
  implementation 'com.github.pedroSG94.RootEncoder:library:2.4.5'
}

Features:

  • Android min API 16.

Encoder:

  • Support camera1 and camera2 API
  • Encoder type buffer to buffer.
  • Encoder type surface to buffer.
  • Audio noise suppressor.
  • Audio echo cancellation.
  • Disable/Enable video and audio while streaming.
  • Switch camera while streaming.
  • Change video bitrate while streaming (API 19+).
  • AV1, H264, H265, G711, AAC and OPUS hardware/software encoding.
  • Force video and audio Codec to use hardware/software encoding (Not recommended).
  • Record MP4 file while streaming (API 18+).
  • Set Image, Gif or Text to stream on real time.
  • OpenGL real time filters. More info
  • Stream from video and audio files like mp4, webm, mp3, etc (Limited by device decoders). More info
  • Stream device screen (API 21+).

RTMP:

  • Get upload bandwidth used.
  • RTSP auth (adobe and llnw).
  • AV1, H265 (Using RTMP enhanced), H264, AAC and G711 support.
  • RTMPS (under TLS)
  • RTMPT and RTMPTS (tunneled and tunneled under TLS)
  • AMF0
  • AMF3

RTSP:

  • Get upload bandwidth used.
  • RTMP auth (basic and digest).
  • AV1, H264, H265, AAC, G711 and OPUS support.
  • TCP/UDP.
  • RTSPS.

SRT (beta):

  • Get upload bandwidth used.
  • H264, H265, AAC and OPUS support.
  • Resend lost packets
  • Encrypt (AES128, AES192 and AES256)
  • SRT auth.

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

UDP (beta):

  • Get upload bandwidth used.
  • H264, H265, AAC and OPUS support.
  • Unicast, Multicast and Broadcast support.
  • 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 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

rootencoder's People

Contributors

pedrosg94 avatar dependabot[bot] avatar marcin-adamczewski avatar hbergqvist avatar nodinosaur avatar troy-lamerton avatar fruchtzwerg94 avatar cubitspeed avatar svprdga avatar mandanai avatar mikemannox avatar tbeyou avatar dunkpi avatar mustafaboleken avatar obsidiansnoo avatar hritikutekar avatar ykenji avatar florianmlr avatar dsteve595 avatar westy92 avatar hirogakatageri avatar gsw945 avatar pascalbaljet avatar mkrn avatar miwaniec avatar marinesco avatar gizm090 avatar b95505017 avatar ekslv avatar exxkx avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.