Skip to content

Commit

Permalink
Add a null filter to re-enable frame count (#107)
Browse files Browse the repository at this point in the history
* Add a null filter to re-enable frame count

This aims at addressing #99

* Relax testing criteria in test_read_nframes

See #107 (comment)
  • Loading branch information
tvercaut authored May 23, 2024
1 parent 4ea902c commit 44c81e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions imageio_ffmpeg/_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ def count_frames_and_secs(path):
path,
"-map",
"0:v:0",
"-c",
"copy",
"-vf",
"null",
"-f",
"null",
"-",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 44c81e6

Please sign in to comment.