返回排行榜

pedroSG94/RootEncoder

Kotlin

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

rtmpandroidrtspjavaencoderstreamfiltersstreamingamfkotlinrtpsrt
Star 增长趋势
Star
3k
Forks
925
周增长
Issues
232
1k2k3k
2017年2月2020年3月2023年5月2026年7月
README

RootEncoder for Android

Android Arsenal Release Documentation

Sponsored with 💖   by
Stream Chat
Enterprise Grade APIs for Feeds & Chat. Try the Android Chat tutorial 💬


Recall.ai - Mobile Recording SDK

If you’re looking for a hosted mobile recording API, consider checking out Recall.ai, an API that records phone calls and in-person meetings.


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:

Last version
allprojects {
  repositories {
    maven { url 'https://jitpack.io' }
  }
}
dependencies {
  implementation "com.github.pedroSG94.RootEncoder:library:2.8.0"
  //Optional, allow use CameraXSource and CameraUvcSource 
  implementation "com.github.pedroSG94.RootEncoder:extra-sources:2.8.0"
}
Old versions (2.2.6 or less)
allprojects {
  repositories {
    maven { url 'https://jitpack.io' }
  }
}
dependencies {
  implementation 'com.github.pedroSG94.RootEncoder:rtplibrary:2.2.6'
}

Features:

  • Android min API 16.
  • Extra video sources minAPI 21+ (BitmapSource, CameraXSource and CameraUvcSource)

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

RTSP:

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

SRT:

  • 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:

  • Get upload bandwidth used.
  • H264, H265, AAC and OPUS support.
  • Unicast, Multicast and Broadcast support.
  • MPEG2-TS support.

WHIP (beta):

  • Get upload bandwidth used.
  • H264, H265, AV1, G711 and OPUS support.
  • WHIP auth (bearer token).

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

相关仓库
FFmpeg/FFmpeg

Mirror of https://git.ffmpeg.org/ffmpeg.git

COtherffmpegvideo
ffmpeg.org
62.3k14k
ossrs/srs

SRS is a simple, high-efficiency, real-time media server supporting RTMP, WebRTC, HLS, HTTP-FLV, HTTP-TS, SRT, MPEG-DASH, and GB28181, with codec support for H.264, H.265, AV1, VP9, AAC, Opus, and G.711.

C++MIT Licensertmplive-streaming
ossrs.io
29.1k5.7k
Guovin/iptv-api

⚡️IPTV直播源自动更新工具:自动采集、校验、测速并生成可播放结果,支持 M3U/TXT/API 输出、自定义频道、IPv4/IPv6、Docker、GitHub Actions、CLI 与 GUI 多端部署

PythonPyPIOtheriptvtvbox
24.7k7.2k
bluenviron/mediamtx

Ready-to-use Media-over-QUIC / SRT / WebRTC / RTSP / RTMP / LL-HLS / MPEG-TS / RTP live media server and media proxy that allows to read, publish, proxy, record and playback real-time video and audio streams.

GoGo ModulesMIT Licensertsprtp
mediamtx.org
19.6k2.3k
ZLMediaKit/ZLMediaKit

WebRTC/RTSP/RTMP/HTTP/HLS/HTTP-FLV/WebSocket-FLV/HTTP-TS/HTTP-fMP4/WebSocket-TS/WebSocket-fMP4/GB28181/SRT/STUN/TURN server and client framework based on C++11

C++Otherrtsprtmp
docs.zlmediakit.com
17.3k4.1k
AlexxIT/go2rtc

Ultimate camera streaming application

GoGo ModulesMIT Licenseffmpeghassio
go2rtc.org
13.5k1.2k
owncast/owncast

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

GoGo ModulesMIT Licensevideostreaming-video
owncast.online
11.4k1.2k
daniulive/SmarterStreaming

业内为数不多致力于极致体验的超强全自研跨平台(windows/linux/android/iOS)流媒体内核,通过模块化自由组合,支持实时RTMP推流、RTSP推流、RTMP播放器、RTSP播放器、录像、多路流媒体转发、音视频导播、动态视频合成、音频混音、直播互动、内置轻量级RTSP服务等,比快更快,业界真正靠谱的超低延迟直播SDK(延迟低至100~200ms)。

JavaMavenrtmp-pusherrtmp-player
daniusdk.com
11.2k2.8k
gwuhaolin/livego

live video streaming server in golang

GoGo ModulesMIT Licenselivestreamgolang
10.2k2k
illuspas/Node-Media-Server

A Node.js implementation of RTMP/HTTP-FLV Media Server

JavaScriptnpmApache License 2.0nodejsflv
npmjs.com/package/node-media-server
6.2k1.5k
0voice/audio_video_streaming

音视频流媒体权威资料整理,500+份文章,论文,视频,实践项目,协议,业界大神名单。

webrtcrtmp
6.2k1.4k
xufuji456/FFmpegAndroid

FFmpeg实现视频裁剪、水印、转码、编解码、转Gif动图;FFmpeg本地推流、H264与RTMP实时推流直播;OpenGL滤镜特效,视频拍摄。音视频学习路线,音视频知识总结、流媒体协议

Cffmpegtranscode
5.8k1.4k