pytorch / torchcodec

PyTorch video decoding
BSD 3-Clause "New" or "Revised" License
77 stars 9 forks source link

Add fps info to samplers benchmark #294

Closed NicolasHug closed 1 week ago

NicolasHug commented 1 week ago

Output now looks like

----------
num_clips = 1
clips_at_random_indices     med = 12.57ms +- 3.51  med fps = 795.5
clips_at_regular_indices    med = 8.60ms +- 0.55  med fps = 1163.3
clips_at_random_timestamps  med = 16.37ms +- 3.86  med fps = 610.9
clips_at_regular_timestamps med = 9.77ms +- 0.97  med fps = 1023.7
----------
num_clips = 50
clips_at_random_indices     med = 95.78ms +- 3.56  med fps = 5220.2
clips_at_regular_indices    med = 101.75ms +- 2.90  med fps = 4914.1
clips_at_random_timestamps  med = 100.78ms +- 2.34  med fps = 4961.4
clips_at_regular_timestamps med = 106.48ms +- 3.71  med fps = 4601.9
ahmadsharif1 commented 1 week ago

Can you output the video as well?

Long term you can output the codec and resolution as well. We do the same in benchmark_decoders.py and should probably make it into a common function later.

NicolasHug commented 1 week ago

If that's OK I'll wait until the benchmark supports arbitrary videos. It's definitely in scope for the future