Skip to content
@MediaCacheDev

MediaCacheDev

MediaCache

Open-source media libraries for apps and the web: caching, streaming and transparent video, on Android, iOS, React Native and every modern browser.

mediacache.dev

MediaCache

A universal media cache for every platform and framework, built for video first. It streams while caching, caches partial byte ranges, prefetches the first seconds of a video and handles HLS and DASH, on the web and through AVPlayer and ExoPlayer on mobile. It caches anything else too: images, API responses, any file. A JavaScript core serves the web frameworks, a C++17 core serves native apps, and React Native, Capacitor and Flutter sit on top of both. Coming soon.

Transparent video

Transparent video is one of Android's longest-standing feature requests. Developers first asked ExoPlayer for it in August 2020, and the request is still open in androidx/media#1388. Six years on, neither Android's video decoders nor ExoPlayer can play a video's alpha channel. Google's latest update says the decoder changes aren't on the roadmap for the next release, with only groundwork for two-track video planned in Media3. Apps make do with WebViews, chroma keys or side-by-side masks. iOS has played transparent HEVC since 2019, and on the web Safari drops WebM's alpha.

alpha-video and alpha-video-gpu solve it on every platform: Android, iOS, React Native and every modern browser, including the ones that can't show transparent video themselves.

Project
alpha-video (coming soon) Transparent video player for Android, iOS, React Native and the web. VP8, VP9 and AV1 WebM with alpha, single- or dual-stream, with hardware decoding where available.
alpha-video-gpu (coming soon) Transparent animations from ASTC texture arrays in KTX2 files. The GPU draws frames as stored, so dozens play at once with little CPU, in exchange for larger files.
alpha-video-gpu-encoder (coming soon) The CLI that makes alpha-video-gpu's KTX2 files from PNG sequences or videos.
react-native-apng-avif Animated APNG and AVIF with full alpha for React Native on Android, iOS and the web.
alpha-glow-button (coming soon) A button whose hover and press glow is one pre-rendered transparent animation, played by any of the above.

alpha-video gives the smallest files. alpha-video-gpu is for screens with many animations at once. APNG and AVIF suit short loops that need no player.

Earlier work

  • alpha-video-ffmpegkit: the first attempt at transparent WebM on React Native, on FFmpegKit. Kept as a reference; new apps should use alpha-video.
  • ffmpegkit-vp9: a minimal FFmpegKit 6.0 build for Android and iOS that decodes VP9 WebM with alpha through libvpx.

Support

These libraries are built and maintained by one developer. If they save you time, you can support the work on Ko-fi.

Popular repositories Loading

  1. alpha-video-ffmpegkit alpha-video-ffmpegkit Public

    Transparent VP9 WebM video for React Native, Android and iOS, decoded by FFmpegKit from plain Java and Swift and drawn with Metal, OpenGL ES or bitmaps. The first attempt at alpha video, kept as a …

    Java

  2. exoplayer-vp9-alpha exoplayer-vp9-alpha Public

    Forked from androidx/media

    Jetpack Media3 support libraries for media use cases, including ExoPlayer, an extensible media player for Android

    Java

  3. exoplayer-vp9-alpha-test exoplayer-vp9-alpha-test Public

    Kotlin

  4. react-native-apng-avif react-native-apng-avif Public

    Animated APNG and AVIF with full alpha transparency for React Native on Android, iOS and Web. One component plays both and reads the format from the file, so URLs without an extension work too. New…

    Java

  5. ffmpegkit-vp9 ffmpegkit-vp9 Public

    Minimal FFmpegKit 6.0 for Android and iOS: VP9 WebM with alpha via libvpx. dev.mediacache:ffmpegkit-vp9

    Shell

  6. range-source range-source Public

    Range source and storage manager for video and other partial content: reads files by offset through HTTP range requests or your own data source, and keeps what was read on disk, in OPFS, IndexedDB …

    C++

Repositories

Showing 7 of 7 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…