Skip to content

Commit 44c81e6

Browse files
authored
Add a null filter to re-enable frame count (#107)
* Add a null filter to re-enable frame count This aims at addressing #99 * Relax testing criteria in test_read_nframes See #107 (comment)
1 parent 4ea902c commit 44c81e6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

imageio_ffmpeg/_io.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ def count_frames_and_secs(path):
153153
path,
154154
"-map",
155155
"0:v:0",
156-
"-c",
157-
"copy",
156+
"-vf",
157+
"null",
158158
"-f",
159159
"null",
160160
"-",

tests/test_io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def test_ffmpeg_version():
4040
def test_read_nframes():
4141
nframes, nsecs = imageio_ffmpeg.count_frames_and_secs(test_file1)
4242
assert nframes == 280
43-
assert 13.80 < nsecs < 13.99
43+
assert 13.80 < nsecs <= 14.00
4444

4545

4646
def test_read_frames_resource_warning():

0 commit comments

Comments
 (0)