We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 86905c1 commit fdf1a1dCopy full SHA for fdf1a1d
src/torchcodec/_core/_metadata.py
@@ -123,9 +123,10 @@ def end_stream_seconds(self) -> Optional[float]:
123
124
@property
125
def num_frames(self) -> Optional[int]:
126
- """Number of frames in the stream. This corresponds to
127
- ``num_frames_from_content`` if a :term:`scan` was made, otherwise it
128
- corresponds to ``num_frames_from_header``.
+ """Number of frames in the stream (int or None).
+ This corresponds to ``num_frames_from_content`` if a :term:`scan` was made,
+ otherwise it corresponds to ``num_frames_from_header``. If it is None,
129
+ the number of frames is calculated from the duration and the average fps.
130
"""
131
if self.num_frames_from_content is not None:
132
return self.num_frames_from_content
0 commit comments