media-remux 0.0.0-stage → 0.0.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026-PRESENT ntnyq <https://github.com/ntnyq>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,81 @@
1
- # Temporary Holding Version
1
+ # media-remux
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [![CI](https://github.com/ntnyq/media-remux/workflows/CI/badge.svg)](https://github.com/ntnyq/media-remux/actions)
4
+ [![NPM VERSION](https://img.shields.io/npm/v/media-remux.svg)](https://www.npmjs.com/package/media-remux)
5
+ [![NPM DOWNLOADS](https://img.shields.io/npm/dy/media-remux.svg)](https://www.npmjs.com/package/media-remux)
6
+ [![LICENSE](https://img.shields.io/github/license/ntnyq/media-remux.svg)](https://github.com/ntnyq/media-remux/blob/main/LICENSE)
7
+
8
+ Disk-backed media remuxing, track combining, and segment concatenation for browsers without re-encoding.
9
+
10
+ ## Status
11
+
12
+ Early development. This repository currently contains the package scaffold, ESM build, TypeScript declaration output, and development tooling. No media-processing API is implemented or exported yet.
13
+
14
+ The implementation will be extracted from a browser extension. The Mediabunny patch and storage adapters have not been migrated into this package yet.
15
+
16
+ ## Planned scope
17
+
18
+ - Combine separate MP4 video and audio inputs into fragmented MP4.
19
+ - Remux an AAC track from an MP4 input into fragmented M4A.
20
+ - Remux H.264/AAC FLV inputs into fragmented MP4.
21
+ - Concatenate compatible FLV or MP4 segments in order, with explicit timeline and codec-configuration checks.
22
+ - Use the Origin Private File System (OPFS) for temporary media, sample metadata, and fragment indexes to reduce memory growth when processing large files.
23
+ - Run media processing in a dedicated Worker with progress reporting, cancellation, and temporary-file cleanup.
24
+
25
+ The package is intended to work with media inputs independently of any website or extension framework. Site-specific APIs, authentication, quality selection, manifest parsing, and downloading remain the caller's responsibility.
26
+
27
+ Re-encoding, filters, DRM handling, and arbitrary frame-accurate editing are outside the initial scope. Disk-backed processing does not imply constant memory usage: individual encoded packets, source caches, and codec metadata still consume memory.
28
+
29
+ ## Architecture
30
+
31
+ - **Media core:** encoded-packet reading, track selection, timelines, remuxing, track combining, and segment concatenation.
32
+ - **Storage adapters:** positioned temporary-file reads and writes, starting with OPFS.
33
+ - **Browser execution:** Worker orchestration, progress, cancellation, and output-file lifecycle.
34
+
35
+ The initial target is modern browsers with OPFS and Worker support. WXT, Vue, and site-specific types will stay outside the package. Node.js media processing requires a separate storage adapter and validation.
36
+
37
+ Large-file support depends on changes to Mediabunny internals. Before an npm release, those changes must be delivered through upstream support or a versioned patched dependency, with the required third-party license notices. A wrapper around unmodified Mediabunny alone will not provide these capabilities.
38
+
39
+ ## Installation
40
+
41
+ The intended package name is `media-remux`. After the first npm release:
42
+
43
+ ```sh
44
+ pnpm add media-remux
45
+ ```
46
+
47
+ Usage examples will be added when the public API is implemented and validated.
48
+
49
+ ## Development
50
+
51
+ Use Node.js `^22.18.0 || ^24.11.0 || >=26.0.0` and the pnpm version pinned in `package.json`.
52
+
53
+ ```sh
54
+ pnpm install
55
+ pnpm dev
56
+ ```
57
+
58
+ | Command | Description |
59
+ | --------------------- | ------------------------------------------------------------------- |
60
+ | `pnpm dev` | Build in watch mode |
61
+ | `pnpm build` | Build ESM and TypeScript declarations into `dist/` |
62
+ | `pnpm format:check` | Check formatting |
63
+ | `pnpm lint` | Run Oxlint |
64
+ | `pnpm typecheck` | Check TypeScript types |
65
+ | `pnpm test` | Run Vitest; currently allows an empty test suite during scaffolding |
66
+ | `pnpm release:check` | Run formatting, lint, type, and test checks |
67
+ | `pnpm pack --dry-run` | Inspect package contents without creating a tarball |
68
+
69
+ The package publishes `dist/` alongside the README, license, and package metadata. The root entry is reserved for the future public API; `media-remux/package.json` exposes package metadata.
70
+
71
+ Before submitting changes:
72
+
73
+ ```sh
74
+ pnpm release:check
75
+ pnpm build
76
+ pnpm pack --dry-run
77
+ ```
78
+
79
+ ## License
80
+
81
+ [MIT](./LICENSE) License © 2026-PRESENT [ntnyq](https://github.com/ntnyq)
@@ -0,0 +1 @@
1
+ export {}
package/dist/index.js ADDED
File without changes
package/package.json CHANGED
@@ -1,6 +1,85 @@
1
1
  {
2
2
  "name": "media-remux",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.0.0",
4
+ "description": "Disk-backed media remuxing, track combining, and segment concatenation for browsers without re-encoding.",
5
+ "keywords": [
6
+ "audio",
7
+ "browser",
8
+ "flv",
9
+ "fmp4",
10
+ "m4a",
11
+ "media",
12
+ "mediabunny",
13
+ "mp4",
14
+ "opfs",
15
+ "remux",
16
+ "video",
17
+ "web-worker"
18
+ ],
19
+ "homepage": "https://github.com/ntnyq/media-remux#readme",
20
+ "bugs": {
21
+ "url": "https://github.com/ntnyq/media-remux/issues"
22
+ },
23
+ "license": "MIT",
24
+ "author": {
25
+ "name": "ntnyq",
26
+ "email": "ntnyq13@gmail.com",
27
+ "url": "https://github.com/ntnyq"
28
+ },
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "git+https://github.com/ntnyq/media-remux.git"
32
+ },
33
+ "files": [
34
+ "dist"
35
+ ],
36
+ "type": "module",
37
+ "sideEffects": false,
38
+ "main": "./dist/index.js",
39
+ "types": "./dist/index.d.ts",
40
+ "exports": {
41
+ "./package.json": "./package.json",
42
+ ".": {
43
+ "types": "./dist/index.d.ts",
44
+ "default": "./dist/index.js"
45
+ }
46
+ },
47
+ "publishConfig": {
48
+ "access": "public"
49
+ },
50
+ "scripts": {
51
+ "build": "tsdown",
52
+ "dev": "tsdown --watch",
53
+ "format": "oxfmt",
54
+ "format:check": "oxfmt --check",
55
+ "lint": "oxlint",
56
+ "prepare": "husky",
57
+ "prepublishOnly": "pnpm run build",
58
+ "release": "run-s release:check release:version",
59
+ "release:check": "run-s format:check lint typecheck test",
60
+ "release:version": "bumpp",
61
+ "test": "vitest --passWithNoTests",
62
+ "typecheck": "tsc --noEmit"
63
+ },
64
+ "devDependencies": {
65
+ "@ntnyq/tsconfig": "^3.1.0",
66
+ "@types/node": "^26.6.6",
67
+ "bumpp": "^12.3.0",
68
+ "husky": "^9.1.7",
69
+ "nano-staged": "^1.0.2",
70
+ "npm-run-all2": "^9.0.4",
71
+ "oxfmt": "^0.75.0",
72
+ "oxlint": "^1.90.0",
73
+ "tsdown": "^0.23.4",
74
+ "typescript": "^7.0.2",
75
+ "vitest": "^5.0.5"
76
+ },
77
+ "nano-staged": {
78
+ "*.{js,ts,mjs,tsx}": "oxlint --fix --no-error-on-unmatched-pattern",
79
+ "*": "oxfmt --no-error-on-unmatched-pattern"
80
+ },
81
+ "engines": {
82
+ "node": "^22.18.0 || ^24.11.0 || >=26.0.0"
83
+ },
84
+ "packageManager": "pnpm@12.16.1"
85
+ }