Skip to content

Commit 9e0f33a

Browse files
author
Molly Xu
committed
address feedback
1 parent cc737b1 commit 9e0f33a

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

examples/decoding/performance_tips.py

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55
# LICENSE file in the root directory of this source tree.
66

77
"""
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+
==============================================
1114
1215
This tutorial consolidates performance optimization techniques for video
1316
decoding with TorchCodec. Learn when and how to apply various strategies
@@ -173,3 +176,25 @@
173176
# between CPU and CUDA decoding, see:
174177
#
175178
# - :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

Comments
 (0)