numpyimage 3.6.2__tar.gz → 3.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-3.6.2/numpyimage.egg-info → numpyimage-3.7.0}/PKG-INFO +1 -1
- {numpyimage-3.6.2 → numpyimage-3.7.0}/npimage/vidio.py +6 -2
- {numpyimage-3.6.2 → numpyimage-3.7.0/numpyimage.egg-info}/PKG-INFO +1 -1
- {numpyimage-3.6.2 → numpyimage-3.7.0}/pyproject.toml +1 -1
- {numpyimage-3.6.2 → numpyimage-3.7.0}/LICENSE +0 -0
- {numpyimage-3.6.2 → numpyimage-3.7.0}/README.md +0 -0
- {numpyimage-3.6.2 → numpyimage-3.7.0}/npimage/__init__.py +0 -0
- {numpyimage-3.6.2 → numpyimage-3.7.0}/npimage/align.py +0 -0
- {numpyimage-3.6.2 → numpyimage-3.7.0}/npimage/graphics.py +0 -0
- {numpyimage-3.6.2 → numpyimage-3.7.0}/npimage/imageio.py +0 -0
- {numpyimage-3.6.2 → numpyimage-3.7.0}/npimage/nrrd_utils.py +0 -0
- {numpyimage-3.6.2 → numpyimage-3.7.0}/npimage/operations.py +0 -0
- {numpyimage-3.6.2 → numpyimage-3.7.0}/npimage/utils.py +0 -0
- {numpyimage-3.6.2 → numpyimage-3.7.0}/numpyimage.egg-info/SOURCES.txt +0 -0
- {numpyimage-3.6.2 → numpyimage-3.7.0}/numpyimage.egg-info/dependency_links.txt +0 -0
- {numpyimage-3.6.2 → numpyimage-3.7.0}/numpyimage.egg-info/requires.txt +0 -0
- {numpyimage-3.6.2 → numpyimage-3.7.0}/numpyimage.egg-info/top_level.txt +0 -0
- {numpyimage-3.6.2 → numpyimage-3.7.0}/setup.cfg +0 -0
- {numpyimage-3.6.2 → numpyimage-3.7.0}/tests/test_heic.py +0 -0
- {numpyimage-3.6.2 → numpyimage-3.7.0}/tests/test_pbm.py +0 -0
- {numpyimage-3.6.2 → numpyimage-3.7.0}/tests/test_video_streamer.py +0 -0
- {numpyimage-3.6.2 → numpyimage-3.7.0}/tests/test_video_writers.py +0 -0
|
@@ -394,6 +394,10 @@ class VideoStreamer:
|
|
|
394
394
|
return 'variable'
|
|
395
395
|
return float(1.0 / self._framerate)
|
|
396
396
|
|
|
397
|
+
@property
|
|
398
|
+
def duration(self) -> float:
|
|
399
|
+
return float((self.frames_pts[-1] - self.frames_pts[0]) * self.time_base)
|
|
400
|
+
|
|
397
401
|
def frame_number_to_pts(self, frame_number: int) -> int:
|
|
398
402
|
if hasattr(frame_number, '__iter__'):
|
|
399
403
|
return [self.frame_number_to_pts(n) for n in frame_number]
|
|
@@ -798,7 +802,8 @@ class FFmpegVideoWriter:
|
|
|
798
802
|
# Check if width or height needs to be padded to an even value
|
|
799
803
|
if (self._pixel_format_out == 'yuv420p'
|
|
800
804
|
and (width % 2 != 0 or height % 2 != 0)):
|
|
801
|
-
pad = [[0, 0], [0, 0]
|
|
805
|
+
pad = [[0, 0], [0, 0]] # [h, w]
|
|
806
|
+
pad += [[0, 0]] if pixel_format_in == 'rgb24' else []
|
|
802
807
|
if height % 2 != 0:
|
|
803
808
|
print('INFO: Height must be even for yuv420p pixel format but image'
|
|
804
809
|
f' has height {height}, so the bottom row will be duplicated.')
|
|
@@ -846,7 +851,6 @@ class FFmpegVideoWriter:
|
|
|
846
851
|
)
|
|
847
852
|
self._stdin = self._process.stdin
|
|
848
853
|
|
|
849
|
-
|
|
850
854
|
def write(self, frame):
|
|
851
855
|
"""Write a frame to the video file"""
|
|
852
856
|
if self._closed:
|
|
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
|
|
File without changes
|