Local image and video archive ============================= Capture one JPEG from ``/image``, record a ten-second MP4 from the same topic, then list saved files on the appliance. ``core.getImage`` returns the next frame in memory; ``archive.captureImage`` and ``archive.captureVideo`` persist to disk. Recording sessions are context-managed: use ``with session`` in Python or ``await using session = await ...`` in TypeScript so ``stop()`` runs when the block exits, including after errors. Calling ``stop()`` explicitly inside the block is still fine — disposal is skipped once you have stopped. .. tab-set:: :sync-group: sdk-language .. tab-item:: Python :sync: python .. literalinclude:: scripts/archive-recording.py :language: python .. tab-item:: TypeScript :sync: typescript .. literalinclude:: scripts/archive-recording.ts :language: typescript