From 365ddebb5630d298c7d9615f31df0aa3399c3c23 Mon Sep 17 00:00:00 2001 From: WyattBlue Date: Sat, 3 Feb 2024 13:50:56 -0500 Subject: [PATCH] Upgrade to ffmpeg 6.1 --- .github/workflows/tests.yml | 14 ++++++++------ scripts/ffmpeg-6.1.json | 3 +++ tests/test_file_probing.py | 5 ++--- 3 files changed, 13 insertions(+), 9 deletions(-) create mode 100644 scripts/ffmpeg-6.1.json diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c40b09460..d93fde792 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -38,11 +38,12 @@ jobs: fail-fast: false matrix: config: - - {os: ubuntu-latest, python: 3.8, ffmpeg: "6.0", extras: true} + - {os: ubuntu-latest, python: 3.8, ffmpeg: "6.1", extras: true} + - {os: ubuntu-latest, python: 3.8, ffmpeg: "6.0"} - {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"} + - {os: ubuntu-latest, python: pypy3.9, ffmpeg: "6.1"} + - {os: macos-latest, python: 3.8, ffmpeg: "6.1"} env: PYAV_PYTHON: python${{ matrix.config.python }} @@ -119,6 +120,7 @@ jobs: fail-fast: false matrix: config: + - {os: windows-latest, python: 3.8, ffmpeg: "6.1"} - {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"} @@ -165,7 +167,7 @@ jobs: - name: Build source package run: | pip install cython - python scripts/fetch-vendor.py --config-file scripts/ffmpeg-6.0.json /tmp/vendor + python scripts/fetch-vendor.py --config-file scripts/ffmpeg-6.1.json /tmp/vendor PKG_CONFIG_PATH=/tmp/vendor/lib/pkgconfig python setup.py sdist - name: Upload source package uses: actions/upload-artifact@v3 @@ -208,8 +210,8 @@ jobs: env: CIBW_ARCHS: ${{ matrix.arch }} CIBW_BEFORE_ALL_LINUX: yum install -y alsa-lib libxcb - 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_BEFORE_BUILD: python scripts/fetch-vendor.py --config-file scripts/ffmpeg-6.1.json /tmp/vendor + CIBW_BEFORE_BUILD_WINDOWS: python scripts\fetch-vendor.py --config-file scripts\ffmpeg-6.1.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 diff --git a/scripts/ffmpeg-6.1.json b/scripts/ffmpeg-6.1.json new file mode 100644 index 000000000..f1585521e --- /dev/null +++ b/scripts/ffmpeg-6.1.json @@ -0,0 +1,3 @@ +{ + "urls": ["https://github.com/PyAV-Org/pyav-ffmpeg/releases/download/6.1.0-1/ffmpeg-{platform}.tar.gz"] +} diff --git a/tests/test_file_probing.py b/tests/test_file_probing.py index c3f8966de..62e842f25 100644 --- a/tests/test_file_probing.py +++ b/tests/test_file_probing.py @@ -321,13 +321,13 @@ def test_stream_probing(self): # Deprecated properties. with warnings.catch_warnings(record=True) as captured: - self.assertIsNone(stream.framerate) + stream.framerate self.assertEqual( captured[0].message.args[0], "VideoStream.framerate is deprecated as it is not always set; please use VideoStream.average_rate.", ) with warnings.catch_warnings(record=True) as captured: - self.assertIsNone(stream.rate) + stream.rate self.assertEqual( captured[0].message.args[0], "VideoStream.rate is deprecated as it is not always set; please use VideoStream.average_rate.", @@ -361,7 +361,6 @@ def test_stream_probing(self): self.assertTrue(str(stream).startswith("