mirror of
https://github.com/robonen/tools.git
synced 2026-03-20 02:44:45 +00:00
chore(apps): drop apps workspace completely
This commit is contained in:
2
apps/vhs/.gitignore
vendored
2
apps/vhs/.gitignore
vendored
@@ -1,2 +0,0 @@
|
|||||||
bin/**
|
|
||||||
!bin/.gitkeep
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
# @robonen/vhs
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@robonen/vhs",
|
|
||||||
"version": "0.0.0",
|
|
||||||
"exports": "./src/index.ts"
|
|
||||||
}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@robonen/vhs",
|
|
||||||
"private": true,
|
|
||||||
"version": "0.0.1",
|
|
||||||
"license": "UNLICENSED",
|
|
||||||
"description": "",
|
|
||||||
"keywords": [],
|
|
||||||
"author": "Robonen Andrew <robonenandrew@gmail.com>",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/robonen/tools.git",
|
|
||||||
"directory": "./apps/vhs"
|
|
||||||
},
|
|
||||||
"packageManager": "pnpm@9.15.4",
|
|
||||||
"engines": {
|
|
||||||
"bun": ">=1.1.27"
|
|
||||||
},
|
|
||||||
"type": "module",
|
|
||||||
"scripts": {
|
|
||||||
"start": "bun run src/index.ts"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@robonen/tsconfig": "workspace:*",
|
|
||||||
"@types/bun": "^1.2.2"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
import { version } from '../package.json';
|
|
||||||
import { resolve } from 'path';
|
|
||||||
import { $, Glob } from 'bun';
|
|
||||||
|
|
||||||
async function ffmpegMergeAndTranscodeAvi(files: Set<string>) {
|
|
||||||
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<string>();
|
|
||||||
|
|
||||||
for await (const file of glob.scan({ followSymlinks: false })) {
|
|
||||||
files.add(file);
|
|
||||||
}
|
|
||||||
|
|
||||||
console.info(`Found ${files.size} files`);
|
|
||||||
|
|
||||||
console.info(await ffmpegMergeAndTranscodeAvi(files));
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "@robonen/tsconfig/tsconfig.json"
|
|
||||||
}
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
packages:
|
packages:
|
||||||
- apps/*
|
|
||||||
- packages/*
|
- packages/*
|
||||||
|
|
||||||
catalog:
|
catalog:
|
||||||
'@vitest/coverage-v8': ^3.0.4
|
"@vitest/coverage-v8": ^3.0.4
|
||||||
'@vue/test-utils': ^2.4.6
|
"@vue/test-utils": ^2.4.6
|
||||||
jsdom: ^26.0.0
|
jsdom: ^26.0.0
|
||||||
pathe: ^2.0.2
|
pathe: ^2.0.2
|
||||||
unbuild: 3.3.1
|
unbuild: 3.3.1
|
||||||
|
|||||||
Reference in New Issue
Block a user