We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
ZeroDivisionError
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using https://huggingface.co/datasets/raushan-testing-hf/videos-test/blob/main/sample_video_2.avi. See also #677 for decoding problems with this video.
approximate mode is OK, but exact mode fails in the average_fps property.
average_fps
decoder = VideoDecoder(path, seek_mode="approximate") decoder.metadata VideoStreamMetadata: duration_seconds_from_header: 9.02507 begin_stream_seconds_from_header: 0.0 bit_rate: 333644.0 codec: h264 stream_index: 0 begin_stream_seconds_from_content: None end_stream_seconds_from_content: None width: 320 height: 240 num_frames_from_header: 270 num_frames_from_content: None average_fps_from_header: 29.916667 duration_seconds: 9.02507 begin_stream_seconds: 0 end_stream_seconds: 9.02507 num_frames: 270 average_fps: 29.916667
decoder = VideoDecoder(path, seek_mode="exact") decoder.metadata File ~/dev/torchcodec/src/torchcodec/_core/_metadata.py:147, in VideoStreamMetadata.average_fps(self) 141 if ( 142 self.end_stream_seconds_from_content is None 143 or self.begin_stream_seconds_from_content is None 144 or self.num_frames is None 145 ): 146 return self.average_fps_from_header --> 147 return self.num_frames / ( 148 self.end_stream_seconds_from_content 149 - self.begin_stream_seconds_from_content 150 )
The text was updated successfully, but these errors were encountered:
transformers
No branches or pull requests
Using https://huggingface.co/datasets/raushan-testing-hf/videos-test/blob/main/sample_video_2.avi. See also #677 for decoding problems with this video.
approximate mode is OK, but exact mode fails in the
average_fps
property.The text was updated successfully, but these errors were encountered: