How to use ffmpeg in windmill ?
Ffmpeg needs to be installed as dependency in ubuntu and another npm lib fluent-ffmpeg , I use to call the command line ffmpeg command (or can directly use ffmpeg command via child-process). But ffmpeg has to be installed on commandline. How to do that in script ?
6 Replies
This video explains how to use it with
docker
https://youtu.be/aI8XXq59iSw or you have to extend the base image as explained here https://www.windmill.dev/docs/advanced/preinstall_binariesTrevor Sullivan
YouTube
View Network Camera Clips With FFmpeg, S5CMD, and Windmill.dev 🔥💻 O...
In this video, we'll build an application that captures video clips from RTSP security cameras, and makes them viewable inside a Windmill.dev web user interface. We'll be using the open source FFmpeg utility to retrieve the RTSP video stream from the camera, and record a few seconds to an output file. Once the output file is generated, we'll use...
Preinstall Binaries | Windmill
Workers can have binaries preinstalled so that they can use them in subprocesses or in bash directly. npm, aws-cli, kubectl and helm are part of the standard images. To include more binaries, simply extend the base image of Windmill.
cool 👍
so suppose I want to convert 5 videos to hls videos
so I have to trigger it 5 times in day
for each time, it will build a docker container with ffmpeg ?
it will increase time each time
can we build it once and directly use next time ?
so everytime only execution time is spent, not ffmpeg installing time
No, you'll run a pre-build docker container with ffmpeg directly. The image is located here https://hub.docker.com/r/linuxserver/ffmpeg
i think i did not understood,
will the ffmpeg container run always or on every trigger it will spin up?
I have to read more on this, can you point to specific links of windmill doc
in the YouTube link it seems -
a bash script is run inside the workers (which are used to run other typescript scripts of mine)
inside that worker, docker container is started & ffmpeg command and end of script, it is stopped
so it is started & stopped each time, just like it would be for node scripts
and how workers can run docker command in bash script? i mean is docker already installed
The workers can run docker commands because in the docker-compose of Windmill, the docker socket is passed to each worker. Each worker has a docker client talking back to a docker server.
So when you pull the ffmpeg image once, it will be there, cached. Using docker run just starts a container, which is fast as the image is there already.
This assuming you're running Windmill in a single host using docker-compose.
The best way to go is to try to do what you want, and with specific questions we can try to help better.
Sure