How can I capture video from my game in jme3?

I think I saw a post about capture video from game with an appstate and save it to *.AVI file.
I googled a lot but i cant find it again !

Well, I googled 5 seconds and found that:

But you are right the wiki page doesn’t exist anymore. Maybe @nehon can fix that?

Basically, if you only want to record video, use: VideoRecorderAppState().
JavaDoc of that app state can be found here:

I have never record sound though, but as it seems the github page shows how to do so.

Hopefully I could help you :grinning:

1 Like

Or just use a third party program for that.

If you have the possibility to use NVIDIA ShadowPlay, I totally recommend it. The only recorder I can use without the video stuttering, and I’m on a high end PC, so I think it is not the lack of computation power… If not, then ShareX, but it too I found stuttering. Fraps works, but you need to buy it, which is not bad, but the latest release is quite old if it makes any difference…

Definitely ShadowPlay (or the AMD equivalent). Grabs the video directly from the renderbuffer without delay.
The VideoRecorderAppState is nice but can not be so quick as the graphics card vendor’s app.

Thats true guys, ShadowPlay works perfectly. You even can record the desktop if you want. It’s also possible to capture audio (from games) and microphone speaking. Good for tutorials and stuff like that.

VideoRecorderAppState does have the feature that it will force your app into a perfect frame rate, though. I mean, i twill run as slow as it needs to so that it maintains exactly 30 FPS.

Which is really great if you properly use tpf everywhere… not so great if you do your own tpf calculations like I do.

Shadowplay is definitely great. Though I have to switch desktop styles when I want to use it to turn on Windows’s fancy one.

this is a free one i use. Also works in *nix. i think its even in the ubuntu repos.

Like @Failfarm, I used SimpleScreenRecorder to capture only the game.
I also used OBS - Open Broadcaster Software - Index for live stream, or to capture several source (game, background music, mic, webcam,…).

That’s cool. Does it record at slower fps too? (example: 3 frames per sec → takes 10 sec to record one “sec” of video?)

Yes, that’s exactly it. It will tell your app that tpf is still 1/30th of a second but will take as long as it needs to when rendering 30 frames. Writes it out as 1 second of video.

…so it’s possible that apps are even smoother than they’d actually be if they have erratic frame rates.

1 Like

I use ShadowPlay too.

I use and can recommend ffsplit for recording, also free and does streaming.

obs studio is used by lots of streamers. It has same quality as shadowplay but is A LOT more versatile. and it’s open source. and it has no a/v sync issues (like shadowplay has).

1 Like

Obs is great, but at least for AMD it doesn’t have hardware acceleration.