Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

320
Views
ffmpeg image and flask app in two different containers in Docker compose. How do I use ffmpeg in flask app?

Here is my docker compose yml file:

ffmpeg:
    image: jrottenberg/ffmpeg:ubuntu
    tty: true
flask_app:
  build: ./flask_app
  #image: conorquinn01/composeapp
  command: python ./flask_app/app.py
  ports:
   - "5000:5000"
  volumes:
   - .:/muse_compose2
  links:
    ['ffmpeg']

Not sure how to do this. Thanks.

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I'm a noob with Docker and python isn't my language but I'm facing a similar problem. I have a rails app to save videos with shrine on docker and I don't want the transcoding in the same container because of the local resources, so, when somebody upload a video I save the ID in the BD and the video is sent to the shared folder while a thread call the ffmpeg container (jrottenberg/ffmpeg:ubuntu). If you're interested, here is the script to run the ffmpeg while saving in the shared folder:

Windows

docker run -it -v c:/Users/[your-user]/desktop/compartida:/v jrottenberg/ffmpeg -i http://archive.org/download/thethreeagesbusterkeaton/Buster.Keaton.The.Three.Ages.ogv /video.mp4

Linux

docker run -it -v $(pwd):/v jrottenberg/ffmpeg -i http://archive.org/download/thethreeagesbusterkeaton/Buster.Keaton.The.Three.Ages.ogv  /video.mp4

And the link to the git of the project jrottenberg/ffmpeg

Because I make a folder with the video ID to save the videos, when I want the video I just use the id in the BD instead of the name. I'm sorry for my english.

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!