{"_id":"@accelerated-software-development/playwright-video-merge","name":"@accelerated-software-development/playwright-video-merge","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@accelerated-software-development/playwright-video-merge","version":"0.1.0","description":"Merge Playwright test result videos into a single demo reel with test name overlays","type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"bin":{"playwright-video-merge":"dist/cli.js"},"scripts":{"build":"tsup","test":"vitest run","test:watch":"vitest","prepublishOnly":"npm run build"},"keywords":["playwright","video","merge","concat","ffmpeg","demo","e2e","test","recording"],"author":{"name":"contact@kelvin.id"},"license":"MIT","engines":{"node":">=18.0.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"repository":{"type":"git","url":"git+https://github.com/asd-engineering/playwright-video-merge.git"},"bugs":{"url":"https://github.com/asd-engineering/playwright-video-merge/issues"},"homepage":"https://github.com/asd-engineering/playwright-video-merge#readme","dependencies":{"commander":"^13.1.0","fluent-ffmpeg":"^2.1.3"},"devDependencies":{"@types/fluent-ffmpeg":"^2.1.27","@types/node":"^22.18.0","tsup":"^8.4.0","typescript":"^5.8.3","vitest":"^3.2.1"},"gitHead":"06af31c6b50dcf821e43d54caa6a4a24945d6d4e","_id":"@accelerated-software-development/playwright-video-merge@0.1.0","_nodeVersion":"22.22.0","_npmVersion":"11.7.0","dist":{"integrity":"sha512-GZcnKcWoA8//5ha1eLfUQE2P3P8gEerrbBGTDgBtrzXHYzGfj/rRu2zIS6r2gSRwcZEbiNT8LecTACspFtRv+Q==","shasum":"620e4d91bfc1eb0facc0c70070ab8cecf914d05c","tarball":"https://registry.npmjs.org/@accelerated-software-development/playwright-video-merge/-/playwright-video-merge-0.1.0.tgz","fileCount":12,"unpackedSize":116713,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCqEHE9MY/x+ar2/RDJXuJxAd5/Qn8JUIX/8Ycf+jze1AIgLE+sYl65f7Fx/n9SU42+dmNJvPy9NUGBPg03u2bjlpI="}]},"_npmUser":{"name":"kelvin.id","email":"contact@kelvin.id"},"directories":{},"maintainers":[{"name":"kelvin.id","email":"contact@kelvin.id"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/playwright-video-merge_0.1.0_1775576079550_0.38903400543569466"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-07T15:34:39.168Z","0.1.0":"2026-04-07T15:34:39.697Z","modified":"2026-04-07T15:34:39.928Z"},"maintainers":[{"name":"kelvin.id","email":"contact@kelvin.id"}],"description":"Merge Playwright test result videos into a single demo reel with test name overlays","homepage":"https://github.com/asd-engineering/playwright-video-merge#readme","keywords":["playwright","video","merge","concat","ffmpeg","demo","e2e","test","recording"],"repository":{"type":"git","url":"git+https://github.com/asd-engineering/playwright-video-merge.git"},"author":{"name":"contact@kelvin.id"},"bugs":{"url":"https://github.com/asd-engineering/playwright-video-merge/issues"},"license":"MIT","readme":"# @accelerated-software-development/playwright-video-merge\n\nMerge Playwright test result videos into a single demo reel with test name overlays.\n\nTurn your E2E test recordings into a \"what the system can do\" demo video — automatically.\n\n## Requirements\n\n- **Node.js** >= 18\n- **ffmpeg** installed and in PATH\n\n```bash\n# Ubuntu/Debian\nsudo apt install ffmpeg\n\n# macOS\nbrew install ffmpeg\n\n# Windows\nchoco install ffmpeg\n```\n\n## Installation\n\n```bash\nnpm install -D @accelerated-software-development/playwright-video-merge\n```\n\n## Playwright Video Configuration\n\nBy default, Playwright only records videos for failed tests. To create a demo reel, you need to record all tests:\n\n```typescript\n// playwright.config.ts\nexport default defineConfig({\n  use: {\n    video: {\n      mode: 'on',  // Record all tests (not just failures)\n      size: { width: 1280, height: 720 },\n    },\n  },\n  reporter: [\n    ['json', { outputFile: 'playwright-report.json' }],\n  ],\n});\n```\n\n## CLI Usage\n\n```bash\n# Basic — merge all videos in test-results/\nnpx playwright-video-merge\n\n# With test names from report\nnpx playwright-video-merge --report playwright-report.json\n\n# Custom output format\nnpx playwright-video-merge -o demo.mp4 -f mp4\n\n# Just concatenate, no overlays\nnpx playwright-video-merge --no-overlay\n```\n\n### CLI Options\n\n```\n-i, --input <dir>          Input directory (default: ./test-results)\n-o, --output <file>        Output file (default: ./merged-demo.webm)\n-r, --report <file>        playwright-report.json for test names\n-f, --format <format>      Output format: webm or mp4 (default: webm)\n-d, --overlay-duration <s> Overlay duration in seconds (default: 5)\n--font <name>              Font name or .ttf path (default: DejaVu Sans)\n--font-size <px>           Font size in pixels (default: 24)\n--font-color <color>       Font color (default: white)\n--box-color <color>        Background box color (default: black@0.5)\n--sort <strategy>          alphabetical | report-order | mtime (default: alphabetical)\n--no-overlay               Skip overlay, just concatenate\n--no-cleanup               Keep intermediate files\n-v, --verbose              Verbose output\n```\n\n## Programmatic API\n\n```typescript\nimport { mergePlaywrightVideos } from '@accelerated-software-development/playwright-video-merge';\n\nconst result = await mergePlaywrightVideos({\n  inputDir: './test-results',\n  outputPath: './merged-demo.webm',\n  reportPath: './playwright-report.json',\n  overlayDuration: 5,\n  font: 'DejaVu Sans',\n  fontSize: 24,\n  fontColor: 'white',\n  boxColor: 'black@0.5',\n  sort: 'alphabetical',\n  cleanup: true,\n  onProgress: (event) => {\n    console.log(`[${event.stage}] ${event.message}`);\n  },\n});\n\nconsole.log(`Merged ${result.videoCount} videos → ${result.outputPath}`);\n```\n\n### Check ffmpeg availability\n\n```typescript\nimport { checkFfmpeg } from '@accelerated-software-development/playwright-video-merge';\n\nconst info = checkFfmpeg();\nif (!info.available) {\n  console.error('ffmpeg is required');\n}\n```\n\n## npm Script Integration\n\nAdd to your `package.json`:\n\n```json\n{\n  \"scripts\": {\n    \"merge-videos\": \"playwright-video-merge --report playwright-report.json\"\n  }\n}\n```\n\nThen run after tests:\n\n```bash\nnpx playwright test\nnpm run merge-videos\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-b946e4f2c471393d98414be467d336f5"}