diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 00000000..90ae317c
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,45 @@
+name: CI
+on:
+ - push
+ - pull_request
+jobs:
+ test:
+ runs-on: ubuntu-20.04
+ strategy:
+ fail-fast: false
+ matrix:
+ python-version:
+ - "2.7"
+ - "3.5"
+ - "3.6"
+ - "3.7"
+ - "3.8"
+ - "3.9"
+ - "3.10"
+ steps:
+ - uses: actions/checkout@v3
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v4
+ with:
+ python-version: ${{ matrix.python-version }}
+ - name: Install ffmpeg
+ run: |
+ sudo apt update
+ sudo apt install ffmpeg
+ - name: Setup pip + tox
+ run: |
+ python -m pip install --upgrade \
+ "pip==20.3.4; python_version < '3.6'" \
+ "pip==21.3.1; python_version >= '3.6'"
+ python -m pip install tox==3.24.5 tox-gh-actions==2.9.1
+ - name: Test with tox
+ run: tox
+ black:
+ runs-on: ubuntu-20.04
+ steps:
+ - uses: actions/checkout@v3
+ - name: Black
+ run: |
+ # TODO: use standard `psf/black` action after dropping Python 2 support.
+ pip install black==21.12b0 click==8.0.2 # https://stackoverflow.com/questions/71673404
+ black ffmpeg --check --color --diff
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index e4d7d758..00000000
--- a/.travis.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-language: python
-before_install:
- - >
- [ -f ffmpeg-release/ffmpeg ] || (
- curl -O https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz &&
- mkdir -p ffmpeg-release &&
- tar Jxf ffmpeg-release-amd64-static.tar.xz --strip-components=1 -C ffmpeg-release
- )
-matrix:
- include:
- - python: 2.7
- env: TOX_ENV=py27
- - python: 3.4
- env: TOX_ENV=py34
- - python: 3.5
- env: TOX_ENV=py35
- - python: 3.6
- env: TOX_ENV=py36
- - python: 3.7
- dist: xenial # required for Python >= 3.7
- env: TOX_ENV=py37
- - python: pypy
- env: TOX_ENV=pypy
-install:
- - pip install tox
-script:
- - export PATH=$(readlink -f ffmpeg-release):$PATH
- - tox -e $TOX_ENV
-cache:
- directories:
- - .tox
- - ffmpeg-release
diff --git a/README.md b/README.md
index 8cfe89ae..b8ee9221 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,9 @@
# ffmpeg-python: Python bindings for FFmpeg
-[](https://travis-ci.org/kkroening/ffmpeg-python)
+[![CI][ci-badge]][ci]
+
+[ci-badge]: https://github.com/kkroening/ffmpeg-python/actions/workflows/ci.yml/badge.svg
+[ci]: https://github.com/kkroening/ffmpeg-python/actions/workflows/ci.yml
@@ -78,9 +81,11 @@ Real-world signal graphs can get a heck of a lot more complex, but `ffmpeg-pytho
## Installation
+### Installing `ffmpeg-python`
+
The latest version of `ffmpeg-python` can be acquired via a typical pip install:
-```
+```bash
pip install ffmpeg-python
```
@@ -90,6 +95,24 @@ git clone git@github.com:kkroening/ffmpeg-python.git
pip install -e ./ffmpeg-python
```
+> **Note**: `ffmpeg-python` makes no attempt to download/install FFmpeg, as `ffmpeg-python` is merely a pure-Python wrapper - whereas FFmpeg installation is platform-dependent/environment-specific, and is thus the responsibility of the user, as described below.
+
+### Installing FFmpeg
+
+Before using `ffmpeg-python`, FFmpeg must be installed and accessible via the `$PATH` environment variable.
+
+There are a variety of ways to install FFmpeg, such as the [official download links](https://ffmpeg.org/download.html), or using your package manager of choice (e.g. `sudo apt install ffmpeg` on Debian/Ubuntu, `brew install ffmpeg` on OS X, etc.).
+
+Regardless of how FFmpeg is installed, you can check if your environment path is set correctly by running the `ffmpeg` command from the terminal, in which case the version information should appear, as in the following example (truncated for brevity):
+
+```
+$ ffmpeg
+ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers
+ built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
+```
+
+> **Note**: The actual version information displayed here may vary from one system to another; but if a message such as `ffmpeg: command not found` appears instead of the version information, FFmpeg is not properly installed.
+
## [Examples](https://github.com/kkroening/ffmpeg-python/tree/master/examples)
When in doubt, take a look at the [examples](https://github.com/kkroening/ffmpeg-python/tree/master/examples) to see if there's something that's close to whatever you're trying to do.
@@ -194,7 +217,7 @@ When in doubt, refer to the [existing filters](https://github.com/kkroening/ffmp
**Why do I get an import/attribute/etc. error from `import ffmpeg`?**
-Make sure you ran `pip install ffmpeg-python` and not `pip install ffmpeg` or `pip install python-ffmpeg`.
+Make sure you ran `pip install ffmpeg-python` and _**not**_ `pip install ffmpeg` (wrong) or `pip install python-ffmpeg` (also wrong).
**Why did my audio stream get dropped?**
diff --git a/doc/html/index.html b/doc/html/index.html
index eac8967c..55d31a94 100644
--- a/doc/html/index.html
+++ b/doc/html/index.html
@@ -168,7 +168,7 @@
ffmpeg.
compile
(stream_spec, cmd='ffmpeg', overwrite_output=False)¶
Build command-line for invoking ffmpeg.
-The run()
function uses this to build the commnad line
+
The run()
function uses this to build the command line
arguments and should work in most cases, but calling this function
directly is useful for debugging or if you need to invoke ffmpeg
manually for whatever reason.