|
5 | 5 | # LICENSE file in the root directory of this source tree. |
6 | 6 |
|
7 | 7 | """ |
8 | | -==================================== |
9 | | -Performance Tips and Best Practices |
10 | | -==================================== |
| 8 | +.. meta:: |
| 9 | + :description: Learn how to optimize TorchCodec video decoding performance with batch APIs, approximate seeking, multi-threading, and CUDA acceleration. |
| 10 | +
|
| 11 | +============================================== |
| 12 | +TorchCodec Performance Tips and Best Practices |
| 13 | +============================================== |
11 | 14 |
|
12 | 15 | This tutorial consolidates performance optimization techniques for video |
13 | 16 | decoding with TorchCodec. Learn when and how to apply various strategies |
|
173 | 176 | # between CPU and CUDA decoding, see: |
174 | 177 | # |
175 | 178 | # - :ref:`sphx_glr_generated_examples_decoding_basic_cuda_example.py` |
| 179 | + |
| 180 | +# %% |
| 181 | +# Conclusion |
| 182 | +# ---------- |
| 183 | +# |
| 184 | +# TorchCodec offers multiple performance optimization strategies, each suited to |
| 185 | +# different scenarios. Use batch APIs for multi-frame decoding, approximate mode |
| 186 | +# for faster initialization, parallel processing for high throughput, and CUDA |
| 187 | +# acceleration for GPU-intensive workflows. |
| 188 | +# |
| 189 | +# The best results often come from combining techniques. Profile your specific |
| 190 | +# use case and apply optimizations incrementally, using the benchmarks in the |
| 191 | +# linked examples as a guide. |
| 192 | +# |
| 193 | +# For more information, see: |
| 194 | +# |
| 195 | +# - :ref:`sphx_glr_generated_examples_decoding_basic_example.py` - Basic decoding examples |
| 196 | +# - :ref:`sphx_glr_generated_examples_decoding_approximate_mode.py` - Approximate mode benchmarks |
| 197 | +# - :ref:`sphx_glr_generated_examples_decoding_custom_frame_mappings.py` - Custom frame mappings |
| 198 | +# - :ref:`sphx_glr_generated_examples_decoding_parallel_decoding.py` - Parallel decoding strategies |
| 199 | +# - :ref:`sphx_glr_generated_examples_decoding_basic_cuda_example.py` - CUDA acceleration guide |
| 200 | +# - :class:`torchcodec.decoders.VideoDecoder` - Full API reference |
0 commit comments