plebtaste
plebtaste•2y ago

ffmpeg support?

Hi, I'm trying to use ffmpeg on an action, I see that it is not installed on the OS image, so I need to install it via npm, but looks like I can't deploy the action, I keep seeing 500 errors, but I think this is due to the ffmpeg installer npm package. Any ideas of how can I use ffmpeg on an action, or is that use case not supported? (I see the functions have a 512mb limit, 10 minute execution but it should be enough for my use case) This is a minimum reproducible example: "use node"; import { action } from "./_generated/server"; import { v } from "convex/values"; import { path as ffmpegPath } from '@ffmpeg-installer/ffmpeg' export const transcribe = action({ args: { id: v.string(), from: v.number() }, handler: async (ctx, args) => { console.log(ffmpegPath); }, }); The errors I'm seeing:
No description
7 Replies
jamwt
jamwt•2y ago
@plebtaste hey! I'm guessing that ffmpeg relies on some system libraries and things that we might not have available in our node runtime currently. @presley might have a better idea about this
presley
presley•2y ago
The error message you get doesn't seem right, though. It should have shown a better error message. It does seem like ffmpeg relies on some native libraries. Will take a look to confirm. Yeah, seems like ffmpeg doesn't work well with es-build builder. We are working on getting that fixed.
mikeysee
mikeysee•9mo ago
was there ever any progress on this @presley ? I just tried and still get erorrs
sshader
sshader•9mo ago
Try out https://docs.convex.dev/functions/bundling#external-packages if you haven't yet. I haven't tried this with ffmpeg personally, so I'm not sure if this would work, so would appreciate a report back!
Bundling | Convex Developer Hub
Bundling is the process of gathering, optimizing and transpiling the JS/TS
mikeysee
mikeysee•9mo ago
Oh cool! thanks ill have a look
mikeysee
mikeysee•9mo ago
ah.
No description
mikeysee
mikeysee•9mo ago
there are probably other ffmpeg options tho, ill investigate 🙂

Did you find this page helpful?