Remove node-ts
This commit is contained in:
parent
ff533fa92d
commit
f28681f442
@ -1,13 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
extends: [
|
|
||||||
"eslint:recommended",
|
|
||||||
"plugin:@typescript-eslint/recommended",
|
|
||||||
"plugin:@typescript-eslint/recommended-requiring-type-checking",
|
|
||||||
],
|
|
||||||
parser: "@typescript-eslint/parser",
|
|
||||||
parserOptions: {
|
|
||||||
tsconfigRootDir: __dirname,
|
|
||||||
project: ["./tsconfig.json"],
|
|
||||||
},
|
|
||||||
plugins: ["@typescript-eslint"],
|
|
||||||
};
|
|
@ -1,8 +0,0 @@
|
|||||||
import type { FFmpegCoreModule } from "@ffmpeg/types";
|
|
||||||
import createFFmpeg from "@ffmpeg/core";
|
|
||||||
|
|
||||||
void (async () => {
|
|
||||||
const ffmpeg = (await createFFmpeg()) as FFmpegCoreModule;
|
|
||||||
ffmpeg.setLogger(({ message }) => console.log(message));
|
|
||||||
console.log("return code: ", ffmpeg.exec("-h"));
|
|
||||||
})();
|
|
@ -1,18 +0,0 @@
|
|||||||
import fs from "node:fs";
|
|
||||||
import path from "node:path";
|
|
||||||
import createFFmpeg from "@ffmpeg/core";
|
|
||||||
import type { FFmpegCoreModule } from "@ffmpeg/types";
|
|
||||||
|
|
||||||
void (async () => {
|
|
||||||
const wav = Uint8Array.from(
|
|
||||||
fs.readFileSync(path.join(__dirname, "../../../testdata/audio-15s.wav"))
|
|
||||||
);
|
|
||||||
|
|
||||||
const ffmpeg = (await createFFmpeg()) as FFmpegCoreModule;
|
|
||||||
ffmpeg.setProgress((progress) =>
|
|
||||||
console.log(`transcoding progress: ${progress * 100} %`)
|
|
||||||
);
|
|
||||||
|
|
||||||
ffmpeg.FS.writeFile("audio.wav", wav);
|
|
||||||
console.log("return code: ", ffmpeg.exec("-i", "audio.wav", "audio.mp4"));
|
|
||||||
})();
|
|
@ -1,18 +0,0 @@
|
|||||||
import fs from "node:fs";
|
|
||||||
import path from "node:path";
|
|
||||||
import createFFmpeg from "@ffmpeg/core";
|
|
||||||
import type { FFmpegCoreModule } from "@ffmpeg/types";
|
|
||||||
|
|
||||||
void (async () => {
|
|
||||||
const avi = Uint8Array.from(
|
|
||||||
fs.readFileSync(path.join(__dirname, "../../../testdata/video-15s.avi"))
|
|
||||||
);
|
|
||||||
|
|
||||||
const ffmpeg = (await createFFmpeg()) as FFmpegCoreModule;
|
|
||||||
ffmpeg.setProgress((progress) =>
|
|
||||||
console.log(`transcoding progress: ${progress * 100} %`)
|
|
||||||
);
|
|
||||||
|
|
||||||
ffmpeg.FS.writeFile("video.avi", avi);
|
|
||||||
console.log("return code: ", ffmpeg.exec("-i", "video.avi", "video.mp4"));
|
|
||||||
})();
|
|
@ -1,26 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "node-ts",
|
|
||||||
"version": "0.12.0-alpha.0",
|
|
||||||
"description": "node example",
|
|
||||||
"private": "true",
|
|
||||||
"scripts": {
|
|
||||||
"lint": "eslint .",
|
|
||||||
"help": "ts-node ffmpeg/help.ts",
|
|
||||||
"transcode:video": "ts-node ffmpeg/transcode-video.ts",
|
|
||||||
"transcode:audio": "ts-node ffmpeg/transcode-audio.ts"
|
|
||||||
},
|
|
||||||
"author": "Jerome Wu <jeromewus@gmail.com>",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@ffmpeg/core": "^0.12.0-alpha.0",
|
|
||||||
"@ffmpeg/ffmpeg": "^0.12.0-alpha.0",
|
|
||||||
"@ffmpeg/types": "^0.12.0-alpha.0"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@typescript-eslint/eslint-plugin": "^5.37.0",
|
|
||||||
"@typescript-eslint/parser": "^5.37.0",
|
|
||||||
"eslint": "^8.23.1",
|
|
||||||
"ts-node": "^10.9.1",
|
|
||||||
"typescript": "^4.8.3"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../../tsconfig.json"
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user