record user interaction and save as video file?

Hi

Is it possible to record user interactions (including mouse cursor movement) to compressed video or flv files?

We need this kind of feature in one of our training modules. The saved video file would be sent to an examiner for review.

It must save to a video file, can be low framerate like 10fps.

It must be an internal part of the Unity file, in other words we don’t want to use an external application to capture the screen.

Is something like this possible in Unity?

Thanks for any advice.

Geoff

Are we talking about in-editor or in-game?

It would not be too hard to track all key presses and mouse interactions to a log, send that and then replay. Wouldn’t even need a video file for that and the result file would take up a lot less space.

In Game

As I mentioned, it must be a video file :slight_smile:

There could be many things happening on screen (physical simulation, multi-player etc) which need to be captured.

It’s going to be quicker the video way than try and replicate all that.

Thanks
Geoff

It is possible, but it may be not entirely trivial :wink:

I would recommend starting with:

You mentioned 10 FPS would be enough for you, so that might make things a bit easier; you’d simply only capture 10 frames per second, which should make saving the images less hard on the machine.

Any “extras”, like mouse-cursor or keypresses would have to be visualized in the game. Like, you could create an “in-game cursor” that follows the mouse position (should be easy to set up with UnityGUI, there might even be ready examples in the forums or on the Wiki).

Finally, you’d have to visualize the keypresses somehow, which should also be quite easy to set up with UnityGUI, but it obviously does require a bit of programming.

Hope this helps …

Sunny regards,
Jashan

Jashan,

Thats great info, i can use that.

Many thanks
Geoff

Hi,

I’ve done something like that. I recorded user input like keyboard, mouse movement and stuff, recorded that to memory and later played that back in a slower, non-realtime speed and capture screenshots to assemble a movie. For the movie assembling I used an external tool, but with the right knowledge you could do it in Unity or, more easily, send the trainer the recorded input events. Way easier and file sizes are way smaller.

Martin