Created by: caspervdw
After some hours of tinkering (thanks @beville for the helpful notes in #156 (closed)), I got PyAV working on my Win64 laptop with Python 35, using the binaries from https://ffmpeg.zeranoe.com/builds/ .
Prerequisites
- Python35 on Windows is compiled using MSVC14, which can be obtained from Microsoft for free in the 'Visual C++ Build Tools 2015'. Using
setuptools>=0.24
, compiling and linking worked out-of-the-box for me. See here for more info. - Both the shared (for running) and dev (for compiling) packages (link), extracted in the same folder (e.g. C:\ffmpeg). Make sure C:\ffmpeg\bin and C:\ffmpeg\lib and C:\ffmpeg\include exist.
- Add the ffmpeg
bin
folder to the PATH environment variable (e.g. C:\ffmpeg\bin) - Install Cython (?)
-
git clone
or download & extract PyAV source
Build
From within the PyAV source directory
python setup.py build_ext --inplace --ffmpeg-dir=C:\ffmpeg
or
set FFMPEG_DIR=C:\ffmpeg
python setup.py build_ext --inplace`
This builds PyAV against a specific build of ffmpeg. Changing the ffmpeg binaries will get you a DLL not found
error on import.
Test
-
nosetests
pass - PIMS
nosetests
pass
I would like to get the wheel on conda, but as it is compiled against a specific ffmpeg version, these libraries would ideally be included. I am not sure how to do that properly.