explaingit

microshow/rxffmpeg

4,719CAudience · developerComplexity · 3/5Setup · moderate

TLDR

An Android library that wraps FFmpeg so mobile developers can add video and audio editing to their apps, trim clips, add subtitles, convert formats, and more, with a single Gradle dependency.

Mindmap

mindmap
  root((rxffmpeg))
    What it does
      Trim and join clips
      Add subtitles
      Convert formats
      Mix audio
    Tech stack
      FFmpeg core
      RxJava2
      X264 encoding
      OpenSSL
    Use cases
      Video editing apps
      File compression
      Format conversion
    Audience
      Android developers
      Mobile app builders
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add video trimming, speed change, and subtitle overlay to an Android app without writing FFmpeg command-line wrappers yourself.

USE CASE 2

Compress video files before uploading them from a mobile app to reduce bandwidth and storage costs.

USE CASE 3

Convert a series of images into a video slideshow inside an Android application.

USE CASE 4

Mix background music into a recorded video clip or strip its audio track entirely.

Tech stack

CAndroidFFmpegRxJava2X264OpenSSL

Getting it running

Difficulty · moderate Time to first run · 30min

Requires an Android project with Gradle, choose the standard or lite variant depending on how much app size you can spare.

In plain English

RxFFmpeg is an Android library for editing audio and video on a mobile device. It wraps the open-source FFmpeg tool and several companion encoding libraries (X264, mp3lame, fdk-aac, opencore-amr, and OpenSSL) into a single package that Android developers can add to their apps with a Gradle dependency. The README is written in Chinese. The library covers a wide range of video and audio operations: joining clips, transcoding between formats, compressing file size, trimming, adding intro or outro segments, separating audio from video, changing playback speed, overlaying static or animated sticker images, adding subtitles, applying filters, mixing in background music, reversing a clip, trimming audio, and converting a series of images into a video. It also includes a built-in video player component described as lightweight and fast-starting. HTTPS support is included via OpenSSL. For developers, commands are executed using a reactive programming style through RxJava2, with callbacks for progress, completion, cancellation, and errors. A synchronous execution mode is also available for cases where that fits better. Running commands can be interrupted mid-execution. The library exposes a helper class for building command strings safely, which avoids common problems with file paths that contain spaces. All the FFmpeg sub-modules are compiled into a single shared library file, so developers do not need to bundle the many separate FFmpeg .so files that a raw FFmpeg integration would normally require. The library supports four processor architectures: armeabi-v7a, arm64-v8a, x86, and x86_64. Hardware-accelerated encoding and decoding is enabled via Android's MediaCodec. A lite variant of the package is also available that removes less common codecs and reduces the added file size to around 4MB. A demo APK is provided in the repository for testing the features directly on a device before integrating the library.

Copy-paste prompts

Prompt 1
I'm building an Android app with RxFFmpeg. Show me how to compress a video file using RxCmd and display a progress bar during execution.
Prompt 2
Write an RxFFmpeg command to trim a video from 10 seconds to 30 seconds and save the output as a new MP4 file.
Prompt 3
Using RxFFmpeg, show me how to add a subtitle .srt file to a video and export the result on Android.
Prompt 4
How do I overlay a PNG sticker image onto a video at a specific position using RxFFmpeg in an Android app?
Prompt 5
Write an example that converts a series of JPEG images into a 30fps MP4 video using RxFFmpeg.
Open on GitHub → Explain another repo

← microshow on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.