npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

expo-video-audio-overlay

v0.1.2

Published

On-device video and audio overlay module for Expo, allowing you to merge audio tracks with video files.

Readme

Expo Video Audio Overlay

npm version License: MIT

On‑device video + audio overlay for React‑Native & Expo

No FFmpeg • No GPL • Just the platform media APIs — AVMutableComposition (iOS) & MediaMuxer (Android)

Table of Contents

Features

  • Offline – runs entirely on‑device, no upload required
  • Flexible audio mixing – loop, offset, volume & original‑track mix modes (mix / replace / mute)
  • MP4 / MOV output – choose container & codec explicitly when needed
  • Expo‑friendly – ships with a config‑plugin; just add it to app.json
  • Classic & New Architecture – works if the host app opts into TurboModule/Fabric later

Installation

Supported React‑Native versions: 0.79 (Expo SDK 53). Older versions may compile but are not tested.

npx expo install expo-video-audio-overlay

That’s it — run a development build or EAS production build and the native module is ready.

Local testing: run npx expo run:ios or npx expo run:android after installing the library; Expo Go will not include the native code.

Usage

import { overlayAudio } from 'expo-video-audio-overlay';
import * as FileSystem from 'expo-file-system';

const videoUri = FileSystem.cacheDirectory + 'screen-recording.mp4';
const audioUri = FileSystem.bundleDirectory + 'music/background.mp3';

const outputUri = await overlayAudio({
  // Required
  video:  videoUri,
  audio:  audioUri,
  output: FileSystem.documentDirectory + 'share-video.mp4',

  // Optional controls ↓
  loop: true,                // repeat audio to match video length (default: true)
  audioStartOffset: 1,       // start audio 1 s after video begins (default: 0)
  volume: 0.8,               // 80 % volume (default: 1)
  originalAudio: 'mute',     // mute any soundtrack in the source video (default: 'mix')
  container: 'mp4',          // output container (mp4 or mov; platform default if omitted)
});

console.log('Video with sound saved at', outputUri);

API

| Option | Type | Default | Description | | ------------------ | ----------------------------------- | ---------- | ----------------------------------------------------------------------------------------- | | video | string | — | Absolute/local URI to the input video | | audio | string | — | Absolute/local URI to the audio file to overlay | | output | string | — | Absolute path for the output video (overwritten if already exists) | | loop | boolean | true | Loop the audio until its length meets/exceeds the video, then trim to match exactly | | audioStartOffset | number (seconds; can be negative) | 0 | Offset where the audio starts relative to the video start. Negative delays the audio | | volume | number (0‒1) | 1 | Linear gain applied to the overlay audio track | | originalAudio | 'mix' \| 'replace' \| 'mute' | mix | How to treat any soundtrack already present in the video | | container | 'mp4' \| 'mov' | platform | Explicitly set the output container/codec (falls back to the platform default if omitted) |

Returns: Promise<string> — absolute file URI of the saved video.

⚠️ The module does not down‑mix or re‑sample audio; ensure your track uses a sample rate & codec accepted by the device encoder (e.g. AAC 48 kHz).

Troubleshooting

| Problem | Fix | | ------------------------------ | --------------------------------------------------------------------------------------------------- | | Native module not linked | Rebuild the dev client (eas build --profile development) or run npx expo run-android / run-ios. | | Audio not looping | Verify loop is true; ensure the audio file is a supported codec (AAC/MP3). | | iOS < 12 crash | The podspec targets iOS 12+. Older OS versions are not supported. |

Contributing

PRs are welcome! See CONTRIBUTING.md for details.

License

MIT © 2025 Elliot Fleming See LICENSE for details.