@livekit/av 7.1.500

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/NOTICE ADDED
@@ -0,0 +1,35 @@
1
+ @livekit/av
2
+ Copyright LiveKit, Inc.
3
+
4
+ The meta package (`@livekit/av`) containing this file is licensed under the Apache License, Version 2.0.
5
+ The FFmpeg binaries distributed via `@livekit/av-<platform>-<arch>` platform packages are licensed separately (see below).
6
+
7
+ ------------------------------------------------------------------------------
8
+ FFmpeg (bundled binary, contained in @livekit/av-<platform>-<arch> packages)
9
+ ------------------------------------------------------------------------------
10
+
11
+ These prebuilt FFmpeg binaries are built by LiveKit from unmodified upstream
12
+ FFmpeg sources using the build recipe in `av/scripts/build-ffmpeg.sh` in the
13
+ livekit/agents-private repository and are licensed under the GNU Lesser General
14
+ Public License, version 2.1 or later (LGPL-2.1-or-later).
15
+
16
+ The binaries are configured WITHOUT `--enable-gpl` and WITHOUT
17
+ `--enable-nonfree` (no GPL-only components such as libx264/libx265 are
18
+ included). The only external codec library linked is libopus, which is
19
+ distributed under the 3-clause BSD license.
20
+
21
+ The build is further restricted to an explicit allowlist of royalty-free audio
22
+ codecs (PCM, MP3, FLAC, Vorbis, Opus, ALAC). Patent-encumbered codecs such as
23
+ AAC, AC-3, E-AC-3 and DTS are intentionally excluded, as are all video codecs.
24
+
25
+ Written offer / corresponding source (LGPL §6):
26
+ - FFmpeg source: https://ffmpeg.org/releases/ (the exact `ffmpeg-<version>`
27
+ tarball pinned in `av/scripts/build-ffmpeg.sh`)
28
+ - libopus source: https://downloads.xiph.org/releases/opus/
29
+ - Build scripts: `av/scripts/build-ffmpeg.sh` in livekit/agents-private
30
+
31
+ FFmpeg is a trademark of Fabrice Bellard, originator of the FFmpeg project.
32
+ See https://www.ffmpeg.org/legal.html for FFmpeg's license and legal notes.
33
+
34
+ To use your own FFmpeg binary instead of the bundled one, set the
35
+ `LIVEKIT_FFMPEG_PATH` environment variable to its path.
package/README.md ADDED
@@ -0,0 +1,19 @@
1
+ # @livekit/av
2
+
3
+ Prebuilt, minimal, LGPL-licensed FFmpeg binaries used by
4
+ [LiveKit Agents](https://github.com/livekit/agents-js) for audio en/decoding.
5
+
6
+ > **Internal use.** This package exists solely to support `@livekit/agents`. It is a
7
+ > stripped-down, audio-only FFmpeg build (no video, no network, royalty-free codecs only)
8
+ > and its API and contents may change without notice. Do not depend on it directly.
9
+
10
+ Installing `@livekit/av` pulls in exactly one platform package
11
+ (`@livekit/av-<platform>-<arch>`) via `optionalDependencies` with `os`/`cpu` filters.
12
+ `getFfmpegPath()` returns the absolute path of the binary, or `undefined` when no platform
13
+ package matches (e.g. musl-based distros) — callers fall back to `ffmpeg` on `PATH`.
14
+
15
+ Versioning mirrors FFmpeg: npm `MAJOR.MINOR.(PATCH*100 + REV)`, so `7.1.500` is FFmpeg
16
+ 7.1.5 (build revision 0) and `7.1.501` is a rebuild of the same FFmpeg.
17
+
18
+ The binaries are LGPL v2.1+ (see `NOTICE`); the JS resolver in this package is Apache-2.0.
19
+ Build recipe: `av/scripts/build-ffmpeg.sh` in this repository.
package/index.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ // SPDX-FileCopyrightText: 2026 LiveKit, Inc.
2
+ //
3
+ // SPDX-License-Identifier: Apache-2.0
4
+
5
+ /**
6
+ * Absolute path of the bundled ffmpeg binary for the current platform, or `undefined`
7
+ * when the platform is unsupported or the matching `@livekit/av-*` package is not installed.
8
+ */
9
+ export function getFfmpegPath(): string | undefined;
package/index.js ADDED
@@ -0,0 +1,26 @@
1
+ // SPDX-FileCopyrightText: 2026 LiveKit, Inc.
2
+ //
3
+ // SPDX-License-Identifier: Apache-2.0
4
+ 'use strict';
5
+ const path = require('node:path');
6
+
7
+ const SUPPORTED = new Set(['darwin-arm64', 'darwin-x64', 'linux-x64', 'linux-arm64', 'win32-x64']);
8
+
9
+ /**
10
+ * Absolute path of the bundled ffmpeg binary for the current platform, or `undefined`
11
+ * when the platform is unsupported or the matching `@livekit/av-*` package is not
12
+ * installed (e.g. musl libc, or `--no-optional` installs).
13
+ */
14
+ function getFfmpegPath() {
15
+ const target = `${process.platform}-${process.arch}`;
16
+ if (!SUPPORTED.has(target)) return undefined;
17
+ const bin = process.platform === 'win32' ? 'ffmpeg.exe' : 'ffmpeg';
18
+ try {
19
+ const pkgJson = require.resolve(`@livekit/av-${target}/package.json`);
20
+ return path.join(path.dirname(pkgJson), bin);
21
+ } catch {
22
+ return undefined;
23
+ }
24
+ }
25
+
26
+ module.exports = { getFfmpegPath };
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@livekit/av",
3
+ "version": "7.1.500",
4
+ "description": "Prebuilt minimal FFmpeg for LiveKit Agents audio en/decoding. For internal use; no stability guarantees.",
5
+ "license": "Apache-2.0",
6
+ "author": "LiveKit",
7
+ "main": "index.js",
8
+ "types": "index.d.ts",
9
+ "files": [
10
+ "index.js",
11
+ "index.d.ts",
12
+ "README.md",
13
+ "NOTICE"
14
+ ],
15
+ "scripts": {
16
+ "test": "node --test"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/livekit/agents-private.git",
21
+ "directory": "av/node"
22
+ },
23
+ "engines": {
24
+ "node": ">=18.0.0"
25
+ },
26
+ "optionalDependencies": {
27
+ "@livekit/av-darwin-arm64": "7.1.500",
28
+ "@livekit/av-darwin-x64": "7.1.500",
29
+ "@livekit/av-linux-x64": "7.1.500",
30
+ "@livekit/av-linux-arm64": "7.1.500",
31
+ "@livekit/av-win32-x64": "7.1.500"
32
+ }
33
+ }