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 committed Dec 27, 2023
1 parent bf87dc2 commit 5bec1be
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 24 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ 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,9 +119,8 @@ jobs:
fail-fast: false
matrix:
config:
- {os: windows-latest, python: 3.8, ffmpeg: "6.0"}
- {os: windows-latest, python: 3.8, ffmpeg: "6.1"}
- {os: windows-latest, python: 3.8, ffmpeg: "5.1"}
- {os: windows-latest, python: 3.8, ffmpeg: "5.0"}

steps:
- name: Checkout
Expand Down Expand Up @@ -165,7 +164,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 +207,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"]
}
15 changes: 0 additions & 15 deletions tests/test_file_probing.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,20 +320,6 @@ def test_stream_probing(self):
self.assertIn(stream.coded_width, (720, 0))
self.assertIn(stream.coded_height, (576, 0))

# Deprecated properties.
with warnings.catch_warnings(record=True) as captured:
self.assertIsNone(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)
self.assertEqual(
captured[0].message.args[0],
"VideoStream.rate is deprecated as it is not always set; please use VideoStream.average_rate.",
)


class TestVideoProbeCorrupt(TestCase):
def setUp(self):
Expand Down Expand Up @@ -362,7 +348,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 5bec1be

Please sign in to comment.