Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update #6

Merged
merged 37 commits into from
Feb 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
f63a985
Fix travis build and enable pip caching (#561)
May 12, 2017
2f569d0
Fix out of bounds error
shawwn May 25, 2017
aec97bf
Fix out of range indices on last frame
shawwn May 25, 2017
99bfee2
fixed ffmpeg error reporting on Python 3 (#565)
narfdotpl May 25, 2017
1c5c633
Tiny change to error
May 29, 2017
b89966e
PEP 8 compatible
gpantelis Jun 5, 2017
6ba12d0
Merge pull request #582 from gpantelis/patch-7
Jun 6, 2017
7a04047
Two small corrections to documentation.
Julian-O Jul 2, 2017
7e3a086
#600: Several YouTube examples in Gallery page won't load.
Julian-O Jul 2, 2017
2c47757
Merge pull request #605 from Julian-O/DocumentationClipInstall
Jul 8, 2017
7c61ad9
Merge pull request #606 from Julian-O/YouTubeGallery
Jul 8, 2017
d6bc0c6
Fixed Optional Progress Bar in cuts/detect_scenes (#587)
scherroman Jul 11, 2017
4d9972e
Issue #574, fix duration of masks when using concatenate(.., method="…
bearney74 Jul 14, 2017
313a557
Fixed bug in set_duration (#613)
kencochrane Jul 17, 2017
3d86a2c
Fixed typo in the slide_out transition (#612)
kencochrane Jul 17, 2017
9664b38
Add audio normalization function (#609)
dspinellis Jul 17, 2017
5a3cb6e
Use max fps for CompositeVideoClip (#610)
scherroman Jul 17, 2017
b2c5909
add tests for most fx functions (#545)
bearney74 Aug 16, 2017
02fc129
Issue629 (#630)
Julian-O Aug 16, 2017
a7f44df
sometimes tempfile.tempdir is None, so use tempfile.gettempdir() func…
bearney74 Aug 16, 2017
ea70a9e
initialize proc to None (#637)
gyglim Aug 22, 2017
d3a4091
Update README.rst
tburrows13 Aug 24, 2017
e42b3c5
Update README.rst
tburrows13 Aug 29, 2017
cd80d62
Merge pull request #570 from shawwn/fixes/indices-out-of-range
Zulko Oct 5, 2017
0b35773
fixed typo in library include
Goddard Oct 5, 2017
46aae7b
fix for issue #655
Oct 6, 2017
a9eee20
remove unnecessary check
Oct 6, 2017
01ebcc3
make python3 compatible
Oct 6, 2017
00fe917
Merge pull request #652 from Goddard/master
tburrows13 Oct 12, 2017
a744df1
Merge pull request #656 from gyglim/master
tburrows13 Oct 12, 2017
eacfe4a
Update Readme.rst
rlphillips Nov 21, 2017
6e731ec
Merge pull request #671 from rlphillips/master
tburrows13 Nov 28, 2017
f444f8c
Update README re imagemagick name change
tburrows13 Nov 28, 2017
4523734
fix typo
msrks Dec 20, 2017
a90d4ab
Merge pull request #687 from msrks/msrks-patch-1
tburrows13 Dec 22, 2017
e41de74
Convert advanced_tools.py to valid Python
Feb 4, 2018
815296c
Merge pull request #707 from cclauss/patch-2
tburrows13 Feb 11, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 31 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,43 @@
dist: Trusty
dist: trusty
sudo: required
language: python
cache: pip
python:
- "2.7"
- "3.3"
- "3.4"
- "3.5"
- "3.6"
# command to install dependencies

before_install:
- sudo add-apt-repository -y ppa:kirillshkrogalev/ffmpeg-next
- sudo apt-get -y update
- sudo apt-get install -y ffmpeg
- sudo apt-get -y -qq update
- sudo apt-get install -y -qq ffmpeg
- mkdir media
install:
- if [[ $TRAVIS_PYTHON_VERSION == '3.4' || $TRAVIS_PYTHON_VERSION == '3.5' || $TRAVIS_PYTHON_VERSION == '3.6' ]]; then pip install matplotlib; pip install -U scikit-learn; pip install scipy; pip install opencv-python; fi
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then pip install scipy; pip install opencv-python; fi
- pip install coveralls
- pip install pytest-cov
- python setup.py install
# command to run tests
before_script:
- py.test tests/ --cov
script: py.test tests/ --doctest-modules -v --cov moviepy --cov-report term-missing

# Ensure PIP is up-to-date to avoid warnings.
- python -m pip install --upgrade pip
# Ensure setuptools is up-to-date to avoid environment_markers bug.
- pip install --upgrade setuptools
# The default py that is installed is too old on some platforms, leading to version conflicts
- pip install --upgrade py pytest

install:
- echo "No install action required. Implicitly performed by the testing."

# before_script:

script:
- python setup.py test --pytest-args "tests/ --doctest-modules -v --cov moviepy --cov-report term-missing"
# Now the *code* is tested, let's check that the setup is compatible with PIP without falling over.
- pip install -e .
- pip install -e .[optional]
- pip install -e .[test]
# Only test doc generation on latest. Doesn't work on some earlier versions (3.3), but doesn't matter.
- if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then pip install -e .[doc]; fi

after_success:
- coveralls

matrix:
fast_finish: true
10 changes: 6 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,11 @@ For advanced image processing, you will need one or several of the following pac

Once you have installed it, ImageMagick will be automatically detected by MoviePy, (except for windows users and Ubuntu 16.04LTS users).

For Windows users, before installing MoviePy by hand, go into the ``moviepy/config_defaults.py`` file and provide the path to the ImageMagick binary called `convert`. It should look like this ::
For Windows users, before installing MoviePy by hand, go into the ``moviepy/config_defaults.py`` file and provide the path to the ImageMagick binary called ``magick``. It should look like this ::

IMAGEMAGICK_BINARY = "C:\\Program Files\\ImageMagick_VERSION\\convert.exe"
IMAGEMAGICK_BINARY = "C:\\Program Files\\ImageMagick_VERSION\\magick.exe"

If you are using an older version of ImageMagick, keep in mind the name of the executable is not ``magick.exe`` but ``convert.exe``. In that case, the IMAGEMAGICK_BINARY property should be ``C:\\Program Files\\ImageMagick_VERSION\\convert.exe``

For Ubuntu 16.04LTS users, after installing MoviePy on the terminal, IMAGEMAGICK will not be detected by moviepy. This bug can be fixed. Modify the file in this directory: /etc/ImageMagick-6/policy.xml, comment out the statement <!-- <policy domain="path" rights="none" pattern="@*" /> -->.

Expand Down Expand Up @@ -137,7 +139,7 @@ Maintainers

- Zulko_ (owner)

- `@Gloin1313`_
- `@tburrows13`_
- `@earney`_
- Kay `@kerstin`_
- `@mbeacom`_
Expand Down Expand Up @@ -171,7 +173,7 @@ Maintainers

.. People
.. _Zulko: https://github.com/Zulko
.. _`@Gloin1313`: https://github.com/Gloin1313
.. _`@tburrows13`: https://github.com/tburrows13
.. _`@earney`: https://github.com/earney
.. _`@kerstin`: https://github.com/kerstin
.. _`@mbeacom`: https://github.com/mbeacom
161 changes: 161 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
# This file is used to configure the AppVeyor CI system, for testing on Windows machines.
#
# Code loosely based on https://github.com/ogrisel/python-appveyor-demo
#
# To test with AppVeyor:
# Register on appveyor.com with your GitHub account.
# Create a new appveyor project, using the GitHub details.
# Ideally, configure notifications to post back to GitHub. (Untested)

environment:
global:
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
# /E:ON and /V:ON options are not enabled in the batch script interpreter
# See: http://stackoverflow.com/a/13751649/163740
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\appveyor\\run_with_env.cmd"

matrix:

# MoviePy supports Python 2.7 and 3.3 onwards.
# Strategy:
# Test the latest known patch in each version
# Test the oldest and the newest 32 bit release. 64-bit otherwise.

- PYTHON: "C:\\Python27-x64"
PYTHON_VERSION: "2.7.13"
PYTHON_ARCH: "64"
MINICONDA: C:\Miniconda
CONDA_INSTALL: "numpy"

- PYTHON: "C:\\Python33-x64"
PYTHON_VERSION: "3.3.5"
PYTHON_ARCH: "64"
MINICONDA: C:\Miniconda3-x64
CONDA_INSTALL: "numpy"

- PYTHON: "C:\\Python34-x64"
PYTHON_VERSION: "3.4.5"
PYTHON_ARCH: "64"
MINICONDA: C:\Miniconda3-x64
CONDA_INSTALL: "numpy"

- PYTHON: "C:\\Python35-x64"
PYTHON_VERSION: "3.5.3"
PYTHON_ARCH: "64"
MINICONDA: C:\Miniconda35-x64
CONDA_INSTALL: "numpy"

- PYTHON: "C:\\Python36-x64"
PYTHON_VERSION: "3.6.2"
PYTHON_ARCH: "64"
MINICONDA: C:\Miniconda36-x64
CONDA_INSTALL: "numpy"

- PYTHON: "C:\\Python27"
PYTHON_VERSION: "2.7.13"
PYTHON_ARCH: "32"
MINICONDA: C:\Miniconda
CONDA_INSTALL: "numpy"

- PYTHON: "C:\\Python34"
PYTHON_VERSION: "3.6.2"
PYTHON_ARCH: "32"
MINICONDA: C:\Miniconda36
CONDA_INSTALL: "numpy"

install:
# If there is a newer build queued for the same PR, cancel this one.
# The AppVeyor 'rollout builds' option is supposed to serve the same
# purpose but it is problematic because it tends to cancel builds pushed
# directly to master instead of just PR builds (or the converse).
# credits: JuliaLang developers.
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
throw "There are newer queued builds for this pull request, failing early." }

# Dump some debugging information about the machine.
# - ECHO "Filesystem root:"
# - ps: "ls \"C:/\""
#
# - ECHO "Installed SDKs:"
# - ps: "ls \"C:/Program Files/Microsoft SDKs/Windows\""
#
# - ECHO "Installed projects:"
# - ps: "ls \"C:\\projects\""
# - ps: "ls \"C:\\projects\\moviepy\""

# - ECHO "Environment Variables"
# - set


# Prepend desired Python to the PATH of this build (this cannot be
# done from inside the powershell script as it would require to restart
# the parent CMD process).
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"

# Prepare Miniconda.
- "ECHO Miniconda is installed in %MINICONDA%, and will be used to install %CONDA_INSTALL%"

- "set PATH=%MINICONDA%;%MINICONDA%\\Scripts;%PATH%"
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda

# Avoid warning from conda info.
- conda install -q -n root _license
# Dump the setup for debugging.
- conda info -a

# PIP finds some packages challenging. Let Miniconda install them.
- conda create --verbose -q -n test-environment python=%PYTHON_VERSION% %CONDA_INSTALL%
- activate test-environment

# Upgrade to the latest version of pip to avoid it displaying warnings
# about it being out of date.
- pip install --disable-pip-version-check --user --upgrade pip
- pip install --user --upgrade setuptools


# Install ImageMagick (which also installs ffmpeg.)
# This installation process is a big fragile, as new releases are issued, but no Conda package exists yet.
- "ECHO Downloading ImageMagick"
# Versions >=7.0 have problems - executables changed names.
# Assume 64-bit. Need to change to x86 for 32-bit.
# The available version at this site changes - each time it needs to be corrected in four places
# in the next few lines.
- curl -fskLO ftp://ftp.fifi.org/pub/ImageMagick/binaries/ImageMagick-6.9.9-5-Q16-x64-static.exe
- "ECHO Installing ImageMagick"
- "ImageMagick-6.9.9-5-Q16-x64-static.exe /verySILENT /SP"
- set IMAGEMAGICK_BINARY=c:\\Program Files\\ImageMagick-6.9.9-Q16\\convert.exe
- set FFMPEG_BINARY=c:\\Program Files\\ImageMagick-6.9.9-Q16\\ffmpeg.exe

# Check that we have the expected set-up.
- "ECHO We specified %PYTHON_VERSION% win%PYTHON_ARCH%"
- "python --version"
- "python -c \"import struct; print('Architecture is win'+str(struct.calcsize('P') * 8))\""

build_script:

# Build the compiled extension
- "%CMD_IN_ENV% python c:\\projects\\moviepy\\setup.py build"

test_script:
# Run the project tests
- "%CMD_IN_ENV% python c:\\projects\\moviepy\\setup.py test"

# TODO: Support the post-test generation of binaries - Pending a version number that is supported (e.g. 0.3.0)
#
# after_test:
#
# # If tests are successful, create binary packages for the project.
# - "%CMD_IN_ENV% python c:\\projects\\moviepy\\setup.py bdist_wheel"
# - "%CMD_IN_ENV% python c:\\projects\\moviepy\\setup.py bdist_wininst"
# - "%CMD_IN_ENV% python c:\\projects\\moviepy\\setup.py bdist_msi"
# - ps: "ls dist"
#
# artifacts:
# # Archive the generated packages in the ci.appveyor.com build report.
# - path: dist\*
#
# on_success:
# - TODO: upload the content of dist/*.whl to a public wheelhouse
86 changes: 86 additions & 0 deletions appveyor/run_with_env.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
:: To build extensions for 64 bit Python 3, we need to configure environment
:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of:
:: MS Windows SDK for Windows 7 and .NET Framework 4 (SDK v7.1)
::
:: To build extensions for 64 bit Python 2, we need to configure environment
:: variables to use the MSVC 2008 C++ compilers from GRMSDKX_EN_DVD.iso of:
:: MS Windows SDK for Windows 7 and .NET Framework 3.5 (SDK v7.0)
::
:: 32 bit builds, and 64-bit builds for 3.5 and beyond, do not require specific
:: environment configurations.
::
:: Note: this script needs to be run with the /E:ON and /V:ON flags for the
:: cmd interpreter, at least for (SDK v7.0)
::
:: More details at:
:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows
:: http://stackoverflow.com/a/13751649/163740
::
:: Author: Olivier Grisel
:: License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
::
:: Notes about batch files for Python people:
::
:: Quotes in values are literally part of the values:
:: SET FOO="bar"
:: FOO is now five characters long: " b a r "
:: If you don't want quotes, don't include them on the right-hand side.
::
:: The CALL lines at the end of this file look redundant, but if you move them
:: outside of the IF clauses, they do not run properly in the SET_SDK_64==Y
:: case, I don't know why.
@ECHO OFF

SET COMMAND_TO_RUN=%*
SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows
SET WIN_WDK=c:\Program Files (x86)\Windows Kits\10\Include\wdf

:: Extract the major and minor versions, and allow for the minor version to be
:: more than 9. This requires the version number to have two dots in it.
SET MAJOR_PYTHON_VERSION=%PYTHON_VERSION:~0,1%
IF "%PYTHON_VERSION:~3,1%" == "." (
SET MINOR_PYTHON_VERSION=%PYTHON_VERSION:~2,1%
) ELSE (
SET MINOR_PYTHON_VERSION=%PYTHON_VERSION:~2,2%
)
:: Based on the Python version, determine what SDK version to use, and whether
:: to set the SDK for 64-bit.
IF %MAJOR_PYTHON_VERSION% == 2 (
SET WINDOWS_SDK_VERSION="v7.0"
SET SET_SDK_64=Y
) ELSE (
IF %MAJOR_PYTHON_VERSION% == 3 (
SET WINDOWS_SDK_VERSION="v7.1"
IF %MINOR_PYTHON_VERSION% LEQ 4 (
SET SET_SDK_64=Y
) ELSE (
SET SET_SDK_64=N
IF EXIST "%WIN_WDK%" (
:: See: https://connect.microsoft.com/VisualStudio/feedback/details/1610302/
REN "%WIN_WDK%" 0wdf
)
)
) ELSE (
ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%"
EXIT 1
)
)
IF %PYTHON_ARCH% == 64 (
IF %SET_SDK_64% == Y (
ECHO Configuring Windows SDK %WINDOWS_SDK_VERSION% for Python %MAJOR_PYTHON_VERSION% on a 64 bit architecture
SET DISTUTILS_USE_SDK=1
SET MSSdk=1
"%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION%
"%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release
ECHO Executing: %COMMAND_TO_RUN%
call %COMMAND_TO_RUN% || EXIT 1
) ELSE (
ECHO Using default MSVC build environment for 64 bit architecture
ECHO Executing: %COMMAND_TO_RUN%
call %COMMAND_TO_RUN% || EXIT 1
)
) ELSE (
ECHO Using default MSVC build environment for 32 bit architecture
ECHO Executing: %COMMAND_TO_RUN%
call %COMMAND_TO_RUN% || EXIT 1
)
4 changes: 3 additions & 1 deletion docs/advanced_tools/advanced_tools.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""
Advanced tools
===============

Expand All @@ -7,4 +8,5 @@
Subtitles
----------

Credits
Credits
"""
2 changes: 1 addition & 1 deletion docs/examples/quick_recipes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Blurring all frames of a video

::

from skimage.filter import gaussian_filter
from skimage.filters import gaussian_filter
from moviepy.editor import VideoFileClip

def blur(image):
Expand Down
Loading