Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattBlue authored Nov 25, 2023
2 parents 326225c + ad3f696 commit 3635615
Show file tree
Hide file tree
Showing 137 changed files with 583 additions and 864 deletions.
16 changes: 0 additions & 16 deletions .editorconfig

This file was deleted.

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/build-bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ I have done the following:
- [ ] Searched on [Google](https://www.google.com/search?q=pyav+how+do+I+foo)
- [ ] Searched on [Stack Overflow](https://stackoverflow.com/search?q=pyav)
- [ ] Looked through [old GitHub issues](https://github.com/PyAV-Org/PyAV/issues?&q=is%3Aissue)
- [ ] Asked on [PyAV Gitter](https://gitter.im/PyAV-Org)
- [ ] Asked on [PyAV Gitter](https://app.gitter.im/#/room/#PyAV-Org_User-Help:gitter.im)
- [ ] ... and waited 72 hours for a response.


Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/runtime-bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ I have done the following:
- [ ] Searched on [Google](https://www.google.com/search?q=pyav+how+do+I+foo)
- [ ] Searched on [Stack Overflow](https://stackoverflow.com/search?q=pyav)
- [ ] Looked through [old GitHub issues](https://github.com/PyAV-Org/PyAV/issues?&q=is%3Aissue)
- [ ] Asked on [PyAV Gitter](https://gitter.im/PyAV-Org)
- [ ] Asked on [PyAV Gitter](https://app.gitter.im/#/room/#PyAV-Org_User-Help:gitter.im)
- [ ] ... and waited 72 hours for a response.


Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/user-help.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ I have done the following:
- [ ] Searched on [Google](https://www.google.com/search?q=pyav+how+do+I+foo)
- [ ] Searched on [Stack Overflow](https://stackoverflow.com/search?q=pyav)
- [ ] Looked through [old GitHub issues](https://github.com/PyAV-Org/PyAV/issues?&q=is%3Aissue)
- [ ] Asked on [PyAV Gitter](https://gitter.im/PyAV-Org)
- [ ] Asked on [PyAV Gitter](https://app.gitter.im/#/room/#PyAV-Org_User-Help:gitter.im)
- [ ] ... and waited 72 hours for a response.


Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v5
- uses: actions/stale@v8
with:
stale-issue-label: stale
stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'
Expand Down
127 changes: 43 additions & 84 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,75 +1,55 @@
name: tests

on: [push, pull_request]

on:
push:
branches: main
paths-ignore:
- '**.md'
- '**.rst'
- '**.txt'
pull_request:
branches: main
paths-ignore:
- '**.md'
- '**.rst'
- '**.txt'
jobs:


style:

name: "${{ matrix.config.suite }}"
runs-on: ubuntu-latest

strategy:
matrix:
config:
- {suite: black}
- {suite: flake8}
- {suite: isort}

env:
PYAV_PYTHON: python3
PYAV_LIBRARY: ffmpeg-4.3 # doesn't matter

steps:

- uses: actions/checkout@v3
name: Checkout
- name: Checkout
uses: actions/checkout@v4

- name: Python
uses: actions/setup-python@v4
with:
python-version: 3.7

- name: Environment
run: env | sort
python-version: 3.8

- name: Packages
run: |
. scripts/activate.sh
# A bit of a hack that we can get away with this.
python -m pip install ${{ matrix.config.suite }}
- name: "${{ matrix.config.suite }}"
run: |
. scripts/activate.sh
./scripts/test ${{ matrix.config.suite }}
run: pip install -r tests/requirements.txt

- name: Linters
run: make lint

nix:

name: "py-${{ matrix.config.python }} lib-${{ matrix.config.ffmpeg }} ${{matrix.config.os}}"

runs-on: ${{ matrix.config.os }}

strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-latest, python: 3.7, ffmpeg: "5.1", extras: true}
- {os: ubuntu-latest, python: 3.7, ffmpeg: "5.0"}
- {os: ubuntu-latest, python: 3.7, ffmpeg: "4.4"}
- {os: ubuntu-latest, python: 3.7, ffmpeg: "4.3"}
- {os: ubuntu-latest, python: pypy3.9, ffmpeg: "4.4"}
- {os: macos-latest, python: 3.7, ffmpeg: "4.4"}
- {os: ubuntu-latest, python: 3.8, ffmpeg: "6.0", extras: true}
- {os: ubuntu-latest, python: 3.8, ffmpeg: "5.1"}
- {os: ubuntu-latest, python: 3.8, ffmpeg: "5.0"}
- {os: ubuntu-latest, python: pypy3.9, ffmpeg: "5.0"}
- {os: macos-latest, python: 3.8, ffmpeg: "5.0"}

env:
PYAV_PYTHON: python${{ matrix.config.python }}
PYAV_LIBRARY: ffmpeg-${{ matrix.config.ffmpeg }}

steps:

- uses: actions/checkout@v3
- uses: actions/checkout@v4
name: Checkout

- name: Python ${{ matrix.config.python }}
Expand Down Expand Up @@ -123,39 +103,29 @@ jobs:
if: matrix.config.extras
run: |
. scripts/activate.sh ffmpeg-${{ matrix.config.ffmpeg }}
scripts/test doctest
make -C docs test
- name: Examples
if: matrix.config.extras
run: |
. scripts/activate.sh ffmpeg-${{ matrix.config.ffmpeg }}
scripts/test examples
- name: Source Distribution
if: matrix.config.extras
run: |
. scripts/activate.sh ffmpeg-${{ matrix.config.ffmpeg }}
scripts/test sdist
windows:

name: "py-${{ matrix.config.python }} lib-${{ matrix.config.ffmpeg }} ${{matrix.config.os}}"

runs-on: ${{ matrix.config.os }}

strategy:
fail-fast: false
matrix:
config:
- {os: windows-latest, python: 3.7, ffmpeg: "5.1"}
- {os: windows-latest, python: 3.7, ffmpeg: "5.0"}
- {os: windows-latest, python: 3.7, ffmpeg: "4.4"}
- {os: windows-latest, python: 3.7, ffmpeg: "4.3"}
- {os: windows-latest, python: 3.8, ffmpeg: "6.0"}
- {os: windows-latest, python: 3.8, ffmpeg: "5.1"}
- {os: windows-latest, python: 3.8, ffmpeg: "5.0"}

steps:

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Conda
shell: bash
Expand All @@ -169,25 +139,14 @@ jobs:
pillow \
python=${{ matrix.config.python }} \
setuptools
if [[ "${{ matrix.config.ffmpeg }}" == "5.1" ]]; then
curl -L -o ffmpeg.tar.gz https://github.com/PyAV-Org/pyav-ffmpeg/releases/download/5.1.2-1/ffmpeg-win_amd64.tar.gz
elif [[ "${{ matrix.config.ffmpeg }}" == "5.0" ]]; then
curl -L -o ffmpeg.tar.gz https://github.com/PyAV-Org/pyav-ffmpeg/releases/download/5.0.1-1/ffmpeg-win_amd64.tar.gz
elif [[ "${{ matrix.config.ffmpeg }}" == "4.4" ]]; then
curl -L -o ffmpeg.tar.gz https://github.com/PyAV-Org/pyav-ffmpeg/releases/download/4.4.1-8/ffmpeg-win_amd64.tar.gz
else
conda install -q -n pyav ffmpeg=${{ matrix.config.ffmpeg }}
fi
- name: Build
shell: bash
run: |
. $CONDA/etc/profile.d/conda.sh
conda activate pyav
if [[ "${{ matrix.config.ffmpeg }}" != "4.3" ]]; then
tar -xf ffmpeg.tar.gz -C $CONDA_PREFIX/Library/
fi
python setup.py build_ext --inplace --ffmpeg-dir=$CONDA_PREFIX/Library
python scripts\\fetch-vendor.py --config-file scripts\\ffmpeg-${{ matrix.config.ffmpeg }}.json $CONDA_PREFIX\\Library
python setup.py build_ext --inplace --ffmpeg-dir=$CONDA_PREFIX\\Library
- name: Test
shell: bash
Expand All @@ -199,14 +158,14 @@ jobs:
package-source:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.8
- name: Build source package
run: |
pip install cython
python scripts/fetch-vendor.py /tmp/vendor
python scripts/fetch-vendor.py --config-file scripts/ffmpeg-6.0.json /tmp/vendor
PKG_CONFIG_PATH=/tmp/vendor/lib/pkgconfig python setup.py sdist
- name: Upload source package
uses: actions/upload-artifact@v3
Expand All @@ -233,13 +192,13 @@ jobs:
- os: windows-latest
arch: AMD64
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.8
- name: Set up QEMU
if: matrix.os == 'ubuntu-latest'
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Install packages
if: matrix.os == 'macos-latest'
run: |
Expand All @@ -249,8 +208,8 @@ jobs:
env:
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_BEFORE_ALL_LINUX: yum install -y alsa-lib libxcb
CIBW_BEFORE_BUILD: pip install cython && python scripts/fetch-vendor.py /tmp/vendor
CIBW_BEFORE_BUILD_WINDOWS: pip install cython && python scripts\fetch-vendor.py C:\cibw\vendor
CIBW_BEFORE_BUILD: python scripts/fetch-vendor.py --config-file scripts/ffmpeg-6.0.json /tmp/vendor
CIBW_BEFORE_BUILD_WINDOWS: python scripts\fetch-vendor.py --config-file scripts\ffmpeg-6.0.json C:\cibw\vendor
CIBW_ENVIRONMENT_LINUX: LD_LIBRARY_PATH=/tmp/vendor/lib:$LD_LIBRARY_PATH PKG_CONFIG_PATH=/tmp/vendor/lib/pkgconfig
CIBW_ENVIRONMENT_MACOS: PKG_CONFIG_PATH=/tmp/vendor/lib/pkgconfig LDFLAGS=-headerpad_max_install_names
CIBW_ENVIRONMENT_WINDOWS: INCLUDE=C:\\cibw\\vendor\\include LIB=C:\\cibw\\vendor\\lib PYAV_SKIP_TESTS=unicode_filename
Expand All @@ -259,7 +218,7 @@ jobs:
CIBW_TEST_COMMAND: mv {project}/av {project}/av.disabled && python -m unittest discover -t {project} -s tests && mv {project}/av.disabled {project}/av
CIBW_TEST_REQUIRES: numpy
# skip tests when there are no binary wheels of numpy
CIBW_TEST_SKIP: cp37-* pp* *_i686
CIBW_TEST_SKIP: pp* *_i686
run: |
pip install cibuildwheel delvewheel
cibuildwheel --output-dir dist
Expand All @@ -274,14 +233,14 @@ jobs:
runs-on: ubuntu-latest
needs: [package-source, package-wheel]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: dist
path: dist/
- name: Publish to PyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
# Testing.
*.spyderproject
.idea
/.vagrant
/sandbox
/tests/assets
/tests/samples
24 changes: 24 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,30 @@ We are operating with `semantic versioning <http://semver.org>`_.
Note that they these tags will not actually close the issue/PR until they
are merged into the "default" branch.

v11.0.0
-------

Major:

- Add support for FFmpeg 6.0, drop support for FFmpeg < 5.0.
- Add support for Python 3.12, drop support for Python < 3.8.
- Build binary wheels against libvpx 1.13.1 to fix CVE-2023-5217.
- Build binary wheels against FFmpeg 6.0.

Features:

- Add support for the `ENCODER_FLUSH` encoder flag (:issue:`1067`).
- Add VideoFrame ndarray operations for yuv444p/yuvj444p formats (:issue:`788`).
- Add setters for `AVFrame.dts`, `AVPacket.is_keyframe` and `AVPacket.is_corrupt` (:issue:`1179`).

Fixes:

- Fix build using Cython 3 (:issue:`1140`).
- Populate new streams with codec parameters (:issue:`1044`).
- Explicitly set `python_requires` to avoid installing on incompatible Python (:issue:`1057`).
- Make `AudioFifo.__repr__` safe before the first frame (:issue:`1130`).
- Guard input container members against use after closes (:issue:`1137`).

v10.0.0
-------

Expand Down
Loading

0 comments on commit 3635615

Please sign in to comment.