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.

Pinned Loading

  1. alpha-video alpha-video Public

    High-performance transparent video player for Android, iOS, React Native and the web. Plays VP8, VP9 and AV1 WebM with alpha, single- or dual-stream, with hardware decoding where available, includi…

    JavaScript

  2. alpha-video-gpu-encoder alpha-video-gpu-encoder Public

    CLI that encodes PNG sequences and videos into ASTC texture arrays in KTX2 files for alpha-video-gpu: premultiplied alpha, zstd with seek points, and standard KTXanimData frame rates. Uses KTX-Soft…

    JavaScript

  3. alpha-video-gpu alpha-video-gpu Public

    Transparent (alpha) animations for React Native, Android, iOS and the web, from ASTC texture arrays in KTX2 files. The GPU draws the frames as stored, with Metal, OpenGL ES or WebGL 2, so dozens pl…

    C++

  4. 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++

  5. 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

  6. alpha-video-test alpha-video-test Public

    React Native app for Android, iOS and the web that plays the same transparent video in every format side by side, with live FPS, CPU and memory readouts: VP8, VP9 and AV1 WebM with alpha, ASTC in K…

    TypeScript

Repositories

Showing 10 of 11 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…