ant-media/LibRtmp-Client-for-Android logo

ant-media/LibRtmp-Client-for-Android

Free

It is probably the smallest(~60KB, fat version ~300KB) rtmp client for android. It calls librtmp functions over JNI interface

FreeFree tier
Type
Open Source
Company
Ant Media

About ant-media/LibRtmp-Client-for-Android

LibRtmp-Client-for-Android is a lightweight, open-source RTMP client library for Android, designed to be one of the smallest RTMP clients available (~60KB for a single architecture, ~300KB including all CPU architectures). It uses JNI to call librtmp functions and supports both reading and publishing RTMP streams. The library includes FLV muxing for publishing H.264 video and AAC audio via RTMP, as well as local FLV file saving capabilities. It is ideal for live streaming applications where minimal footprint is critical.

Key Features

Smallest RTMP client for Android (~60KB, ~300KB with all CPU architectures)
Calls librtmp functions over JNI interface
Supports ARM, ARM7, ARM8, x86, x86-64, MIPS architectures
FLV muxing and RTMP stream publishing (writeVideo, writeAudio)
Read/Write/Seek/Pause operations for live streams
Local FLV file saving (file_open, write_flv_header, file_close)
No SSL dependency (compiled without SSL)

Pros & Cons

Pros
  • Extremely small library size (60KB base)
  • Open source with permissive license (MIT)
  • Supports multiple Android CPU architectures
  • Simple Java API for reading and publishing streams
  • Includes FLV muxer for publishing
Cons
  • Compiled without SSL support (no RTMPS or encrypted streams)
  • Limited to Android platform only
  • May not be actively maintained (last update not recent)
  • No built-in support for adaptive bitrate or advanced features

Best For

Live video streaming from Android devicesPublishing H.264 video and AAC audio over RTMPEmbedding RTMP playback in resource-constrained Android appsRecording RTMP streams to local FLV files

FAQ

What is the size of the library?
The library is about 60KB for a single CPU architecture, or approximately 300KB when including all architectures (ARM, ARM7, ARM8, x86, x86-64, MIPS).
Does the library support SSL?
No, the librtmp library is compiled without SSL support, so RTMPS or encrypted RTMP streams are not supported.
Can I publish video and audio using this library?
Yes, starting from version 0.2, the RtmpMuxer class provides writeVideo (for H.264 NAL units) and writeAudio (for AAC frames) functions for publishing streams.
How do I play a live RTMP stream?
Use the RtmpClient class: call open() with the RTMP URL and add 'live=1' for live streams, then use read() to receive data.
Can I save the stream to a local file?
Yes, the library provides file_open(), write_flv_header(), and file_close() functions to save an FLV file locally while reading or publishing.