wkordalski
wkordalski

Reputation: 938

Rendering to video file by SFML

I have written a program using SFML Library (in C++) rendering simple 2D animation.

I would like to save the animation to a video file instead of drawing it on the screen.

Does SFML provide such functionality? Is there any other, portable way to do this? (portable between different OSes)

Upvotes: 2

Views: 3367

Answers (1)

Lukas
Lukas

Reputation: 2613

SFML does not have such a feature, especially since video processing is a whole world of its own. You can take a look at FFmpeg and GStreamer. Both libraries are cross-platform and should be able to record, playback and stream videos. If you want a specific codec, you could directly look at the codec's website and/or search for good encoder.

Overall it's not an easy task and depending on what you're trying to do, you could also think about grabbing the rendering directly with an third-party application, e.g. Open Broadcaster Software or (again) FFmpeg.

Upvotes: 5

Related Questions