# Compressed video support in Slicer

**URL:** <https://discourse.slicer.org/t/compressed-video-support-in-slicer/9194>\
**Category:** Support\
**Tags:** feature, sequences, openigtlink\
**Created:** [November 18, 2019, 3:57pm UTC](https://discourse.slicer.org/t/compressed-video-support-in-slicer/9194 "2019-11-18T15:57:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sunderlandkyl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sunderlandkyl/32/79987_2.png) [@Sunderlandkyl](https://discourse.slicer.org/u/Sunderlandkyl)\
**Post date:** [November 18, 2019, 3:57pm UTC](https://discourse.slicer.org/t/compressed-video-support-in-slicer/9194/1 "2019-11-18T15:57:42Z")

</div>

Compressed video support for 3D Slicer is available in both the 4.10.2 and 4.11.0 releases.

For users:

- Requires Sequences, SlicerOpenIGTLink and SlicerIGSIO extensions
- Video recording and playback
- Save and load MKV files encoded with VP9
- Stream compressed video through OpenIGTLink
- Storage space for 60 sec, 10 fps, 640x480 video:
  - Before: ~222.6 MB, 30s
  - Now: ~37.1 MB, \<1s

- Video sequences can be re-encoded with different settings/compression levels

For developers:

- Compressed video frames are stored using vtkMRMLStreamingVolumeNode, which handles decoding and encoding of video frames.
- Frame data is represented using vtkStreamingVolumeFrame, which contains frame metadata, as well as pointer to the previous frame in the decoding sequence.
- New codecs can be added to Slicer by subclassing vtkStreamingVolumeCodec and registering it with vtkStreamingVolumeCodecFactory.
- Documentation for compressed video is here: [https://www.slicer.org/wiki/Documentation/Nightly/Developers/CompressedVideo](https://www.slicer.org/wiki/Documentation/Nightly/Developers/CompressedVideo)

Suggestions and feedback are welcome.

This work was made possible through collaboration with Longquan Chen and Harvard SNRL.  
Development was funded in part by CANARIE’s Research Software Program.
