diff --git a/apps/vhs/.gitignore b/apps/vhs/.gitignore deleted file mode 100644 index f19b2f7..0000000 --- a/apps/vhs/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -bin/** -!bin/.gitkeep \ No newline at end of file diff --git a/apps/vhs/README.md b/apps/vhs/README.md deleted file mode 100644 index d0a3db9..0000000 --- a/apps/vhs/README.md +++ /dev/null @@ -1 +0,0 @@ -# @robonen/vhs \ No newline at end of file diff --git a/apps/vhs/bin/.gitkeep b/apps/vhs/bin/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/apps/vhs/jsr.json b/apps/vhs/jsr.json deleted file mode 100644 index d67b397..0000000 --- a/apps/vhs/jsr.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "@robonen/vhs", - "version": "0.0.0", - "exports": "./src/index.ts" -} \ No newline at end of file diff --git a/apps/vhs/package.json b/apps/vhs/package.json deleted file mode 100644 index 94b7cb8..0000000 --- a/apps/vhs/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "@robonen/vhs", - "private": true, - "version": "0.0.1", - "license": "UNLICENSED", - "description": "", - "keywords": [], - "author": "Robonen Andrew ", - "repository": { - "type": "git", - "url": "git+https://github.com/robonen/tools.git", - "directory": "./apps/vhs" - }, - "packageManager": "pnpm@9.15.5", - "engines": { - "bun": ">=1.1.27" - }, - "type": "module", - "scripts": { - "start": "bun run src/index.ts" - }, - "devDependencies": { - "@robonen/tsconfig": "workspace:*", - "@types/bun": "^1.2.2" - } -} diff --git a/apps/vhs/src/index.ts b/apps/vhs/src/index.ts deleted file mode 100644 index db14658..0000000 --- a/apps/vhs/src/index.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { version } from '../package.json'; -import { resolve } from 'path'; -import { $, Glob } from 'bun'; - -async function ffmpegMergeAndTranscodeAvi(files: Set) { - const ffmpeg = resolve('bin/ffmpeg'); - const output = resolve('output.mp4'); - const input = Array.from(files).toSorted((a, b) => a.localeCompare(b)).join('|'); - - const shell = $`${ffmpeg} -i "concat:${input}" -stats -c:v libx264 -crf 23 -preset veryfast -c:a aac ${output}`; - - for await (const line of shell.lines()) { - console.log(line); - } -} - -const path = Bun.argv[2]; - -if (!path) { - console.error('Please provide a path to a file or directory'); - process.exit(1); -} - -console.info(`Welcome to VHS v${version} 📼`); -console.info(`Scanning ${path}...`); - -const glob = new Glob(resolve(path)); -const files = new Set(); - -for await (const file of glob.scan({ followSymlinks: false })) { - files.add(file); -} - -console.info(`Found ${files.size} files`); - -console.info(await ffmpegMergeAndTranscodeAvi(files)); \ No newline at end of file diff --git a/apps/vhs/tsconfig.json b/apps/vhs/tsconfig.json deleted file mode 100644 index d6d22e4..0000000 --- a/apps/vhs/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "@robonen/tsconfig/tsconfig.json" -} \ No newline at end of file diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index cddefda..deb6dbb 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,6 +1,6 @@ packages: - - apps/* - packages/* + catalog: '@vitest/coverage-v8': ^3.0.5 '@vue/test-utils': ^2.4.6