Question

How to install FFMPEG?

Hello, I’m new to DO. I was using HEROKU previously. Now, I’m trying to deploy a telegram bot that has yt-dlp dependency along with FFMPEG. How do I install FFMPEG?

Also I was going through some Q/A on google related to “telegram bots on digital ocean”, I came across some questions. Now I want to know how do I keep my droplet running without having to manually run from shell/cli?

Show comments

Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

KFSys
Site Moderator
Site Moderator badge
October 22, 2022
Accepted Answer

Hi @terminalwarlord,

To install FFMPEG all you need to do is use the following commands:

  1. sudo apt update
  2. sudo apt install ffmpeg

To verify the installation, use the ffmpeg -version command, which prints the FFmpeg version:

  1. ffmpeg -version
KFSys
Site Moderator
Site Moderator badge
February 5, 2024

Heya,

Commands like apt are not currently supported on the APP PLatfom. The workaround is to deploy from a Dockerfile or build your own container image.

To run a NodeJS app without Buildpacks, one option is to use node as the base image in your Dockerfile (DockerHub link):

FROM node:16

RUN apt update && \
    apt install -y ffmpeg

EXPOSE 8080
ADD server.js .
ENTRYPOINT ["node", "server.js"]

I wrote server.js to verify I can run ffmpeg commands in my NodeJS app. I can share the source code if that’s helpful.

Hope this helps!

any of you found that the ffmpeg gets killed while converting videos?

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.