Skip to content

Commit

Permalink
Upgrade to ffmpeg 6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattBlue authored Feb 3, 2024
1 parent 3f75cc7 commit 365ddeb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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"}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions scripts/ffmpeg-6.1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"urls": ["https://github.com/PyAV-Org/pyav-ffmpeg/releases/download/6.1.0-1/ffmpeg-{platform}.tar.gz"]
}
5 changes: 2 additions & 3 deletions tests/test_file_probing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down Expand Up @@ -361,7 +361,6 @@ def test_stream_probing(self):
self.assertTrue(str(stream).startswith("<av.VideoStream #0 h264, None 0x0 at "))

# actual stream properties
self.assertEqual(stream.average_rate, None)
self.assertEqual(stream.duration, None)
self.assertEqual(stream.frames, 0)
self.assertEqual(stream.id, 0)
Expand Down

0 comments on commit 365ddeb

Please sign in to comment.