-
Notifications
You must be signed in to change notification settings - Fork 693
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
testing/py3-imageio-ffmpeg: fix compatibility with ffmpeg 6.1
Fix imageio/imageio-ffmpeg#99 by adding a null filter to re-enable frame count.
- Loading branch information
1 parent
343c7fd
commit 78e29d0
Showing
2 changed files
with
47 additions
and
2 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
testing/py3-imageio-ffmpeg/0001-Add-a-null-filter-to-re-enable-frame-count.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
From 241715fa915d944ffa8301e9da0474c2a0e511e7 Mon Sep 17 00:00:00 2001 | ||
From: Wenlong Zhang <[email protected]> | ||
Date: Thu, 4 Jul 2024 08:40:57 +0000 | ||
Subject: [PATCH] Add a null filter to re-enable frame count | ||
|
||
backport upstream patch: https://github.com/imageio/imageio-ffmpeg/pull/107 | ||
|
||
--- | ||
imageio_ffmpeg/_io.py | 4 ++-- | ||
tests/test_io.py | 2 +- | ||
2 files changed, 3 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/imageio_ffmpeg/_io.py b/imageio_ffmpeg/_io.py | ||
index b85c453..faf1ee8 100644 | ||
--- a/imageio_ffmpeg/_io.py | ||
+++ b/imageio_ffmpeg/_io.py | ||
@@ -153,8 +153,8 @@ def count_frames_and_secs(path): | ||
path, | ||
"-map", | ||
"0:v:0", | ||
- "-c", | ||
- "copy", | ||
+ "-vf", | ||
+ "null", | ||
"-f", | ||
"null", | ||
"-", | ||
diff --git a/tests/test_io.py b/tests/test_io.py | ||
index bb14869..6d18d60 100644 | ||
--- a/tests/test_io.py | ||
+++ b/tests/test_io.py | ||
@@ -40,7 +40,7 @@ def test_ffmpeg_version(): | ||
def test_read_nframes(): | ||
nframes, nsecs = imageio_ffmpeg.count_frames_and_secs(test_file1) | ||
assert nframes == 280 | ||
- assert 13.80 < nsecs < 13.99 | ||
+ assert 13.80 < nsecs < 14.00 | ||
|
||
|
||
def test_read_frames_resource_warning(): | ||
-- | ||
2.45.2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# Maintainer: Antoni Aloy <[email protected]> | ||
pkgname=py3-imageio-ffmpeg | ||
pkgver=0.4.9 | ||
pkgrel=0 | ||
pkgrel=1 | ||
pkgdesc="FFMPEG wrapper for Python" | ||
url="https://github.com/imageio/imageio-ffmpeg" | ||
arch="noarch" | ||
|
@@ -10,7 +10,8 @@ depends="ffmpeg python3 py3-setuptools" | |
makedepends="py3-gpep517 py3-setuptools py3-wheel" | ||
checkdepends="py3-psutil py3-pytest" | ||
subpackages="$pkgname-pyc" | ||
source="$pkgname-$pkgver.tar.gz::https://github.com/imageio/imageio-ffmpeg/archive/v$pkgver.tar.gz" | ||
source="$pkgname-$pkgver.tar.gz::https://github.com/imageio/imageio-ffmpeg/archive/v$pkgver.tar.gz | ||
0001-Add-a-null-filter-to-re-enable-frame-count.patch" | ||
builddir="$srcdir/imageio-ffmpeg-$pkgver" | ||
|
||
build() { | ||
|
@@ -41,4 +42,5 @@ package() { | |
|
||
sha512sums=" | ||
ebf63b9ac9c733d4c12d3aa4c6a9e81dd0128795a040e65df03bfae00e3562a3976eaa2f4058562bbddc3f8d63d6bf2a38133de4d2ddb0d2dc62ffab2449e143 py3-imageio-ffmpeg-0.4.9.tar.gz | ||
0f6bdffc68c802573b934366f565637b33aa00e9c7f68c2ec130122be5fc6ac11a674c3bccb97caa396df0edc028b59fdf87ddd79ec640593d11fdf6b4f95ec9 0001-Add-a-null-filter-to-re-enable-frame-count.patch | ||
" |