StreamPack: Open-Source Android Live Streaming SDK (RTMP & SRT)
StreamPack is a powerful, open-source Android live streaming SDK built entirely in Kotlin. Designed for high-performance and low-latency video broadcasting, StreamPack allows developers to seamlessly integrate RTMP, RTMPS, and SRT streaming protocols into their mobile applications.
By leveraging modern Android Camera2 and hardware-accelerated MediaCodec APIs, this library delivers a highly efficient and battery-friendly broadcasting experience. Its highly modular and extensible architecture makes it easy to plug in custom streaming protocols, custom audio/video sources, or build specialized applications like screen recorders and professional mobile broadcast tools.
β¨ Features
π₯ Video
- Sources: Cameras, Screen Recorder, or build your own custom video source.
- Codecs: HEVC/H.265, AVC/H.264, VP9, and AV1.
- Configuration: Fully configurable bitrate, resolution, frame rate (up to 60fps), encoder level, and profile.
- Camera Settings: Auto-focus, exposure, white balance, zoom, flash, and experimental HDR support.
- Dynamic: Switch between video sources on the fly. Portrait, landscape, and Video-only modes are supported.
ποΈ Audio
- Sources: Microphone, internal device audio, or a custom audio source.
- Codecs: AAC (LC, HE, HEv2) and Opus.
- Configuration: Configurable bitrate, sample rate, stereo/mono, and data format.
- Processing: Built-in noise suppression and echo cancellation. Audio-only mode is also supported.
- Dynamic: Switch between audio sources seamlessly.
π‘ Streaming (RTMP & SRT)
- SRT: Ultra low-latency streaming based on SRT with a built-in network adaptive bitrate mechanism.
- RTMP: Standard and Enhanced RTMP broadcasting.
πΎ File Recording
- Formats: TS, FLV, MP4, WebM, Fragmented MP4, or custom output.
- Flexibility: Record to a single file, split into multiple chunk files, or record and stream simultaneously.
π€ Contributing & Support
β If you like this project, donβt forget to star it!
π Want to support its development? Consider becoming a sponsor.
π οΈ Contributions are welcomeβfeel free to open issues or submit pull requests!
π License
Copyright 2021 Thibault B.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.