#noob question: how do I install binaries that I can call from a Node function?

1 messages · Page 1 of 1 (latest)

tame chasm
#

I'm migrating from defer.run, they were installing custom binaries into the runtime for me, like ffmpeg for example, and I was invoking them via Node, like so:

    await runCmd(
      `${FFMPEG_PATH} -y -i ${WORKING_DIR}/${masterFileName} -vn -acodec pcm_s16le -ar 44100 -ac 2 ${WORKING_DIR}/${resultingWaveFileName}`
    )

how would I do the same using Trigger? do i need to use a Docker image? is that possible? or is there a way to configure the build to pre-install specific binaries?

opaque needle
#

Hi @tame chasm, we plan on adding an addons section to the config file which would allow you to include more binaries in the images we build, e.g. ffmpeg and chrome.

Until then, the easiest way to get this working is to use packages like @ffmpeg-installer/ffmpeg and @ffprobe-installer/ffprobe. We have some examples of how to do this here: https://github.com/triggerdotdev/trigger.dev/blob/233316f7e8abdf2cdbe6af25ff4a1f27a88d391d/references/v3-catalog/src/trigger/binaries.ts

GitHub

Trigger.dev is the open source background jobs platform for TypeScript. - triggerdotdev/trigger.dev

tame chasm
#

are you planning to add this to v3?

opaque needle
#

Yes, this is planned for v3 only.

tame chasm
opaque needle
#

What exactly are you after?

tame chasm
#

ffmpeg, sox, audiowaveform

tame chasm
opaque needle
#

Sounds good, will discuss and get back to you by Monday at the latest!

tame chasm
opaque needle
#

Heya, some good news! We've decided to include sox and audiowaveform in all worker images. Ffmpeg will have to wait until our addons system is ready as we'd like to keep base images small. Will let you know once that's live. https://github.com/triggerdotdev/trigger.dev/pull/1183

GitHub

This PR adds sox and audiowaveform binaries. Ffmpeg would increase the image size significantly so we'll save that one for the upcoming addons config. In the meantime, ffmpeg can be installed a...

opaque needle
#

That was released earlier today in latest CLI release, beta.45