Skip to content
Advertisement

How to setup ffmpeg in docker container

I want to compress the video from project directory using ffmpeg in python

the video is saved from cv2.VideoCapture(rtsp_url)

Normally it run without problem in my local machine, but when I dockerize my app it seems docker container can’t recognize ffmpeg or I missed something.

JavaScript

It throws exception

JavaScript

This is how I docker my python app.

JavaScript

Advertisement

Answer

To debug your problem my suggestion is to use your container interactively.

Try running a new container like this:

JavaScript

Or attach to your running container:

JavaScript

In this way you can play around, try to launch ffmpeg from different paths, install other dependencies and finally see what you are missing.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement