|
39 | 39 | # |
40 | 40 | # **Key Methods:** |
41 | 41 | # |
| 42 | +# For index-based frame retrieval: |
| 43 | +# |
42 | 44 | # - :meth:`~torchcodec.decoders.VideoDecoder.get_frames_at` for specific indices |
43 | 45 | # - :meth:`~torchcodec.decoders.VideoDecoder.get_frames_in_range` for ranges |
| 46 | +# |
| 47 | +# For timestamp-based frame retrieval: |
| 48 | +# |
44 | 49 | # - :meth:`~torchcodec.decoders.VideoDecoder.get_frames_played_at` for timestamps |
45 | 50 | # - :meth:`~torchcodec.decoders.VideoDecoder.get_frames_played_in_range` for time ranges |
46 | 51 | # |
|
61 | 66 | # ---------------------------------------- |
62 | 67 | # |
63 | 68 | # By default, TorchCodec uses ``seek_mode="exact"``, which performs a :term:`scan` when |
64 | | -# the decoder is created to build an accurate internal index of frames. This |
| 69 | +# you create the decoder to build an accurate internal index of frames. This |
65 | 70 | # ensures frame-accurate seeking but takes longer for decoder initialization, |
66 | 71 | # especially on long videos. |
67 | 72 |
|
|
90 | 95 | # |
91 | 96 | # **When to use:** |
92 | 97 | # |
93 | | -# - Frame accuracy is critical, so approximate mode cannot be used |
94 | | -# - Videos can be preprocessed once and then decoded many times |
| 98 | +# - Frame accuracy is critical, so you cannot use approximate mode |
| 99 | +# - You can preprocess videos once and then decode them many times |
95 | 100 | # |
96 | 101 | # **Performance impact:** Enables consistent, predictable performance for repeated |
97 | 102 | # random access without the overhead of exact mode's scanning. |
|
116 | 121 | # - **Multiprocessing** - Distributing work across multiple processes |
117 | 122 | # - **Multithreading** - Using multiple threads within a single process |
118 | 123 | # |
119 | | -# Both multiprocessing and multithreading can be used to decode multiple videos in parallel, or to decode a single long video in parallel by splitting it into chunks. |
| 124 | +# You can use both multiprocessing and multithreading to decode multiple videos in parallel, or to decode a single long video in parallel by splitting it into chunks. |
120 | 125 |
|
121 | 126 | # %% |
122 | 127 | # .. note:: |
|
0 commit comments