Skip to content

Commit

Permalink
chore: Added ffmpeg installer
Browse files Browse the repository at this point in the history
  • Loading branch information
matvp91 committed Sep 9, 2024
1 parent d8d801c commit 64c34b7
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/artisan/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
},
"dependencies": {
"@aws-sdk/client-s3": "^3.623.0",
"@ffmpeg-installer/ffmpeg": "^1.1.0",
"bullmq": "^5.12.0",
"dotenv": "^16.4.5",
"find-config": "^1.0.0",
Expand Down
5 changes: 5 additions & 0 deletions packages/artisan/src/consumer/workers/ffmpeg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@ import { dirSync } from "tmp";
import ffmpeg from "fluent-ffmpeg";
import { downloadFile, uploadFile } from "../s3.js";
import parseFilePath from "parse-filepath";
import ffmpegBin from "@ffmpeg-installer/ffmpeg";
import type { Job } from "bullmq";
import type { Stream, Input } from "../../schemas.js";
import type { FfmpegCommand } from "fluent-ffmpeg";

console.log("Set ffmpeg path to", ffmpegBin.path);

ffmpeg.setFfmpegPath(ffmpegBin.path);

export type FfmpegData = {
params: {
input: Input;
Expand Down
80 changes: 80 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 64c34b7

Please sign in to comment.