numpyimage 2.6.3__tar.gz → 2.7.0__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.3/numpyimage.egg-info → numpyimage-2.7.0}/PKG-INFO +1 -1
- {numpyimage-2.6.3 → numpyimage-2.7.0}/npimage/vidio.py +15 -1
- {numpyimage-2.6.3 → numpyimage-2.7.0/numpyimage.egg-info}/PKG-INFO +1 -1
- {numpyimage-2.6.3 → numpyimage-2.7.0}/pyproject.toml +1 -1
- {numpyimage-2.6.3 → numpyimage-2.7.0}/LICENSE +0 -0
- {numpyimage-2.6.3 → numpyimage-2.7.0}/README.md +0 -0
- {numpyimage-2.6.3 → numpyimage-2.7.0}/npimage/__init__.py +0 -0
- {numpyimage-2.6.3 → numpyimage-2.7.0}/npimage/align.py +0 -0
- {numpyimage-2.6.3 → numpyimage-2.7.0}/npimage/graphics.py +0 -0
- {numpyimage-2.6.3 → numpyimage-2.7.0}/npimage/imageio.py +0 -0
- {numpyimage-2.6.3 → numpyimage-2.7.0}/npimage/nrrd_utils.py +0 -0
- {numpyimage-2.6.3 → numpyimage-2.7.0}/npimage/operations.py +0 -0
- {numpyimage-2.6.3 → numpyimage-2.7.0}/npimage/utils.py +0 -0
- {numpyimage-2.6.3 → numpyimage-2.7.0}/numpyimage.egg-info/SOURCES.txt +0 -0
- {numpyimage-2.6.3 → numpyimage-2.7.0}/numpyimage.egg-info/dependency_links.txt +0 -0
- {numpyimage-2.6.3 → numpyimage-2.7.0}/numpyimage.egg-info/requires.txt +0 -0
- {numpyimage-2.6.3 → numpyimage-2.7.0}/numpyimage.egg-info/top_level.txt +0 -0
- {numpyimage-2.6.3 → numpyimage-2.7.0}/setup.cfg +0 -0
- {numpyimage-2.6.3 → numpyimage-2.7.0}/tests/test_heic.py +0 -0
- {numpyimage-2.6.3 → numpyimage-2.7.0}/tests/test_pbm.py +0 -0
- {numpyimage-2.6.3 → numpyimage-2.7.0}/tests/test_video.py +0 -0
|
@@ -309,6 +309,20 @@ class VideoStreamer:
|
|
|
309
309
|
else:
|
|
310
310
|
return self.timestep
|
|
311
311
|
|
|
312
|
+
@property
|
|
313
|
+
def framerate(self):
|
|
314
|
+
"""
|
|
315
|
+
Returns the frame rate of the video in frames per second.
|
|
316
|
+
"""
|
|
317
|
+
if self.timestep == 'variable':
|
|
318
|
+
return 1 / self.average_timestep
|
|
319
|
+
else:
|
|
320
|
+
return 1 / self.timestep
|
|
321
|
+
|
|
322
|
+
@property
|
|
323
|
+
def fps(self):
|
|
324
|
+
return self.framerate
|
|
325
|
+
|
|
312
326
|
@property
|
|
313
327
|
def first_frame(self):
|
|
314
328
|
if self._first_frame is None:
|
|
@@ -404,7 +418,7 @@ class VideoWriter:
|
|
|
404
418
|
'Set overwrite=True to overwrite.')
|
|
405
419
|
self.filename = filename
|
|
406
420
|
self.framerate = str(framerate) # str instead of float to avoid precision issues
|
|
407
|
-
while Fraction(self.framerate).denominator >= 2**
|
|
421
|
+
while Fraction(self.framerate).denominator >= 2**31 or Fraction(self.framerate).numerator >= 2**31:
|
|
408
422
|
# If framerate has too many decimals to be expressed as a
|
|
409
423
|
# ratio of 32-bit ints, which is required by ffmpeg, crop
|
|
410
424
|
# off one decimal point of precision until it is expressable
|
|
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
|