How can I use ffmpeg on fly.io?

Hi, I’m trying to run a RTMP server and for some reason I cannot expose the port 1935. Heres the fly.toml file:

[experimental]
  allowed_public_ports = [1935]
  auto_rollback = true

[[services]]
  internal_port = 1935
  protocol = "tcp"

 [[services.ports]]
    handlers = ["tls"]
    port = 1935

I fixed this but my current problem is how can I use ffmpeg on fly.io?

Assuming that whatever application using it is calling it like any Linux command you can add it to your Dockefile like so RUN apt-get install -y ffmpeg.

For some reason, it cannot find apt or apt-get

------
 > [5/7] RUN apt-get update:
#8 0.235 /bin/sh: apt-get: not found
------

I used apk add ffmpeg and that worked!
Still, thanks for trying to help.

2 Likes