



If you go this route I would STRONGLY recommend you make a base image which contains this because the image size is over a GB and takes around 5 minutes to build. # If you want to add some content to this image because the above takes a LONGGG time to build configure -enable-nonfree -disable-shared -extra-cflags=-I/usr/local/include & \ However, if you've already got a base image in mind you can add this RUN apt-get -y update & apt-get install -y wget nano git build-essential yasm pkg-config I made an image that has ffmpeg included that should get you what you want. I know this is a little late but the original answer isn't going to work with Docker. See the prefix path and compile options if edits are needed to suit your needs. Or you can use latest official static builds from here. This script will compile and install a static ffmpeg build with support for nvenc un ubuntu. sudo add-apt-repository ppa:mc3man/trusty-media

This is valid for Ubuntu 14.04 and 16.04. We need CMake to configure the installation, GCC for compilation, Python-devel and Numpy for building Python bindings etc.To use the add-apt-repository command you need to: apt-get install software-properties-common You can skip optional dependencies if you don't want. Building OpenCV from sourceĬompiling from source may seem a little complicated at first, but once you succeeded in it, there is nothing complicated.įirst we will install some dependencies. Also at some point in time, if you want to contribute to OpenCV, you will need this. So for getting latest source codes preference is next method, i.e. With respect to Python API, latest version will always contain much better support and latest bug fixes. Open a new terminal (CTRL+ALT+T) and then run the following commands. For example, at the time of writing this tutorial, apt repository contains 2.4.8 while latest OpenCV version is 3.x. I will install FFmpeg from the default repositories. As the Ubuntu Server image now uses subiquity, the build process that built mini. Apt repositories may not contain the latest version of OpenCV always. Canonical and the Ubuntu project never officially supported the mini.iso it was produced as a by-product of building the debian-installer. If the results are printed out without any errors, congratulations !!! You have installed OpenCV-Python successfully.
