webcodecs-encoder
Version:
A TypeScript library for browser environments to encode video (H.264/AVC, VP9, VP8) and audio (AAC, Opus) using the WebCodecs API and mux them into MP4 or WebM containers with real-time streaming support. New function-first API design.
110 lines (109 loc) • 3.12 kB
JSON
{
"name": "webcodecs-encoder",
"version": "0.3.0",
"description": "A TypeScript library for browser environments to encode video (H.264/AVC, VP9, VP8) and audio (AAC, Opus) using the WebCodecs API and mux them into MP4 or WebM containers with real-time streaming support. New function-first API design.",
"homepage": "https://github.com/romot-co/webcodecs-encoder",
"repository": {
"type": "git",
"url": "git+https://github.com/romot-co/webcodecs-encoder.git"
},
"bugs": {
"url": "https://github.com/romot-co/webcodecs-encoder/issues"
},
"main": "dist/index.cjs",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.cjs",
"import": "./dist/index.js"
},
"./stream": {
"types": "./dist/stream/encode-stream.d.ts",
"require": "./dist/stream/encode-stream.cjs",
"import": "./dist/stream/encode-stream.js"
},
"./factory": {
"types": "./dist/factory/encoder.d.ts",
"require": "./dist/factory/encoder.cjs",
"import": "./dist/factory/encoder.js"
},
"./utils": {
"types": "./dist/utils/can-encode.d.ts",
"require": "./dist/utils/can-encode.cjs",
"import": "./dist/utils/can-encode.js"
},
"./worker": "./dist/worker.js"
},
"scripts": {
"build:main": "tsup",
"build:worker": "tsup",
"build": "tsup",
"prepublishOnly": "npm run build",
"prepare": "npm run build",
"postinstall": "node scripts/postinstall.js && node scripts/apply-patches.js",
"test": "vitest run --coverage",
"test:int": "npm run build && DEBUG=pw:api RUNNING_INTEGRATION_TESTS=true vitest run test/integration/encode-browser.test.ts",
"lint": "eslint src/**/*.ts test/**/*.ts",
"lint:fix": "eslint src/**/*.ts test/**/*.ts --fix",
"format": "prettier --write src/**/*.ts test/**/*.ts",
"format:check": "prettier --check src/**/*.ts test/**/*.ts",
"type-check": "tsc --noEmit"
},
"keywords": [
"webcodecs",
"mp4",
"webm",
"aac",
"opus",
"h264",
"vp9",
"av1",
"encoder",
"muxer",
"video",
"audio",
"streaming",
"browser",
"typescript",
"function-first",
"progressive-enhancement"
],
"author": "Romot",
"license": "MIT",
"dependencies": {
"mp4-muxer": "^2.0.2",
"webm-muxer": "^1.2.0",
"patch-package": "^8.0.0"
},
"devDependencies": {
"@playwright/test": "^1.52.0",
"@types/dom-webcodecs": "^0.1.15",
"@typescript-eslint/eslint-plugin": "^7.7.1",
"@typescript-eslint/parser": "^7.7.1",
"@vitest/coverage-v8": "^3.1.3",
"eslint": "^8.57.0",
"jsdom": "^26.1.0",
"playwright": "^1.52.0",
"prettier": "^3.2.5",
"tsup": "^8.0.2",
"typescript": "5.4.5",
"vitest": "^3.1.3"
},
"files": [
"dist/**/*.js",
"dist/**/*.cjs",
"dist/**/*.d.ts",
"dist/**/*.d.cts",
"dist/**/*.map",
"!dist/temp-html",
"!dist/**/*.html",
"scripts",
"patches",
"README.md",
"LICENSE",
"INSTALL.md"
]
}