$ show begeekmyfriend/yasea
Yasea is an Android live-streaming library and demo application that captures camera video and microphone audio, applies real-time GPU image filters, hardware-encodes to H.264/AAC via MediaCodec, muxes into FLV, and publishes over RTMP to servers such as SRS. The main entry point is SrsPublisher, which orchestrates SrsCameraView (an OpenGL ES preview surface), SrsEncoder (MediaCodec lifecycle and format negotiation), SrsFlvMuxer (FLV-over-RTMP publishing), and SrsMp4Muxer (simultaneous MP4 recording). The demo app (MainActivity) provides a working UI for URL entry, publish/pause, camera switching, recording, and filter selection. Architecturally, the repo is a Gradle project with two modules: a reusable Android library (library/) and a demo app (app/). The library is a monolith that bundles large vendored third-party codebases as source: Google's libyuv (native YUV/RGB conversion and scaling), mp4parser (ISO BMFF/MP4 parsing and authoring), simple-rtmp (RTMP client protocol), and MagicCamera (40+ GPU image filters with GLSL shaders). The repo's own code is the net.ossrs.yasea package, which integrates these pieces: camera frames flow through the GLSurfaceView filter chain as RGBA, are converted to I420/NV12 by the libenc JNI bridge (libenc.cc wrapping libyuv), encoded by MediaCodec, and muxed to FLV/MP4. Audio is captured via AudioRecord and encoded to AAC. Despite a recent commit, the codebase is frozen in the 2017-2020 Android era: compileSdk/targetSdk 26, Android support library 26.1.0, the deprecated Camera API, Gradle 6.5 with AGP 4.1.1, and a mips ABI that modern NDKs no longer support. The native build is commented out in library/build.gradle, and 285 open issues remain. Technical drift is high. This is purely an application/library repo - no data pipelines, notebooks, or research components.
The LLM identified 4 files worth highlighting for reuse:
Self-contained JNI bridge exposing pixel-format conversion functions (RGBAToI420, NV21ToNV12Scaled, ARGBToI420) backed by libyuv. It isolates all native conversion logic behind a small C ABI with no dependencies beyond libyuv and JNI, making it a clean, extractable example of a JNI wrapper for any Android video pipeline needing fast YUV/RGB conversion.
Complete client-side RTMP protocol implementation: handshake with digest calculation, chunk-stream encoding/decoding, AMF0 command serialization, and the publish lifecycle (connect, createStream, publish, audio/video data). Self-contained within the com.github.faucamp.simplertmp package with no Android dependencies, so it can be extracted into any Java project needing RTMP publishing.
Base class for OpenGL ES 2.0 image filters with a clean lifecycle (onInit, onInitialized, onDrawArraysPre/Post, onDestroy) and uniform/texture management. All 40+ filters in the repo extend this class, demonstrating a reusable template-method pattern for GPU shader effects. Depends only on Android GLES20 and shader resources, so it can be extracted into any OpenGL camera/filter pipeline.
Implements FLV tag muxing for H.264/AAC elementary streams, including annexb NALU demuxing (SrsRawH264Stream, SrsAnnexbSearch), sequence-header retransmission, and timestamp management. This is the repo's core streaming value-add and a useful reference implementation for FLV-over-RTMP publishing, though it is coupled to SrsAllocator and SrsEncodeHandler for buffer and callback management.