numpyimage 2.6.2__tar.gz → 2.6.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {numpyimage-2.6.2/numpyimage.egg-info → numpyimage-2.6.3}/PKG-INFO +1 -1
- {numpyimage-2.6.2 → numpyimage-2.6.3}/npimage/vidio.py +7 -2
- {numpyimage-2.6.2 → numpyimage-2.6.3/numpyimage.egg-info}/PKG-INFO +1 -1
- {numpyimage-2.6.2 → numpyimage-2.6.3}/pyproject.toml +1 -1
- {numpyimage-2.6.2 → numpyimage-2.6.3}/LICENSE +0 -0
- {numpyimage-2.6.2 → numpyimage-2.6.3}/README.md +0 -0
- {numpyimage-2.6.2 → numpyimage-2.6.3}/npimage/__init__.py +0 -0
- {numpyimage-2.6.2 → numpyimage-2.6.3}/npimage/align.py +0 -0
- {numpyimage-2.6.2 → numpyimage-2.6.3}/npimage/graphics.py +0 -0
- {numpyimage-2.6.2 → numpyimage-2.6.3}/npimage/imageio.py +0 -0
- {numpyimage-2.6.2 → numpyimage-2.6.3}/npimage/nrrd_utils.py +0 -0
- {numpyimage-2.6.2 → numpyimage-2.6.3}/npimage/operations.py +0 -0
- {numpyimage-2.6.2 → numpyimage-2.6.3}/npimage/utils.py +0 -0
- {numpyimage-2.6.2 → numpyimage-2.6.3}/numpyimage.egg-info/SOURCES.txt +0 -0
- {numpyimage-2.6.2 → numpyimage-2.6.3}/numpyimage.egg-info/dependency_links.txt +0 -0
- {numpyimage-2.6.2 → numpyimage-2.6.3}/numpyimage.egg-info/requires.txt +0 -0
- {numpyimage-2.6.2 → numpyimage-2.6.3}/numpyimage.egg-info/top_level.txt +0 -0
- {numpyimage-2.6.2 → numpyimage-2.6.3}/setup.cfg +0 -0
- {numpyimage-2.6.2 → numpyimage-2.6.3}/tests/test_heic.py +0 -0
- {numpyimage-2.6.2 → numpyimage-2.6.3}/tests/test_pbm.py +0 -0
- {numpyimage-2.6.2 → numpyimage-2.6.3}/tests/test_video.py +0 -0
|
@@ -96,12 +96,17 @@ def load_video(filename,
|
|
|
96
96
|
data = np.empty((num_frames, *first_img.shape), dtype=first_img.dtype)
|
|
97
97
|
# Then fill it up frame by frame
|
|
98
98
|
data[0] = first_img
|
|
99
|
+
container.seek(0, stream=stream)
|
|
99
100
|
for i, frame in tqdm(enumerate(frame_iter), total=num_frames,
|
|
100
101
|
desc='Loading video', disable=not progress_bar):
|
|
101
|
-
if i == 0:
|
|
102
|
-
continue
|
|
103
102
|
img = frame.to_ndarray(format='rgb24')
|
|
103
|
+
if i == 0 and not np.array_equal(img, first_img):
|
|
104
|
+
raise RuntimeError('PyAV seek failed. Please report how this happened'
|
|
105
|
+
' at github.com/jasper-tms/npimage/issues')
|
|
104
106
|
data[i] = img
|
|
107
|
+
if (data[-1] == 0).all():
|
|
108
|
+
print('WARNING: Last frame of video is all zeros, this may'
|
|
109
|
+
' indicate an error in video loading unless you expected this.')
|
|
105
110
|
if return_framerate:
|
|
106
111
|
return data, float(stream.average_rate)
|
|
107
112
|
else:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|