# Reconstructing session video from .mwk2 file

**URL:** <https://mworks.discourse.group/t/reconstructing-session-video-from-mwk2-file/1075>\
**Category:** Support\
**Created:** [February 13, 2025, 5:49pm UTC](https://mworks.discourse.group/t/reconstructing-session-video-from-mwk2-file/1075 "2025-02-13T17:49:59Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [February 14, 2025, 4:34pm UTC](https://mworks.discourse.group/t/reconstructing-session-video-from-mwk2-file/1075/4 "2025-02-14T16:34:06Z")

</div>

Hi Sol,

[This discussion](https://mworks.discourse.group/t/making-movies-out-of-tasks/127) describes a way to do it. It also includes some example MATLAB code for generating the movie. However, it relies on the experiment [capturing](https://mworks.github.io/documentation/latest/components/stimulus_display.html#capture-format) the relevant stimulus display frames as it runs, so this wouldn’t work for data you’ve already collected.

In theory, you could use the stimulus info from [#stimDisplayUpdate](https://mworks.github.io/documentation/latest/reference/sysvars.html#stimdisplayupdate) events to recreate each display frame from the event file, but you would need to write your own drawing code to render the stimuli. That wouldn’t be too hard for images or simple shapes, but it could be tricky to impossible with other stimulus types. (The client eye window basically uses this approach, but it limits the stimulus rendering to simple outlines.)

Cheers,  
Chris

---

_[View the full topic](https://mworks.discourse.group/t/reconstructing-session-video-from-mwk2-file/1075)._
