How do i record video in game

i want to capture a video in game and save it in game how do i do that?

1 Like

How about this one:

but i want to it to be saved like a screen shot library in game just for videos so i can just press a button and see it afterwords in a place in the game

In this cases try these posts:

Screenshot at runtime:
Screenshots at runtime - Blueprint - Unreal Engine Forums

Screenshot in editor mode:
Taking Screenshots in Unreal Engine | Unreal Engine Documentation

but i need it in game to be in game not just a normal video a video that i can play after in game

Hi, Did you figure it out how to record video in game? That would be nice if you can share the solution.

1 Like

no, sorry

I’m trying too.

Sequencer uses UMovieSceneCapture class. I got it working somewhat for me, but don’t expect fluid gameplay while it is running. The exported movies are huge (MJPEG Encoder).

I record a track for the camera to drive along and on record the player is dismissed from gameplay till record is done.

How you would get it in game right after is another issue.

How do you code? By exposed function of Unreal? write it by use UMovieSceneCapture class’s function yourself ?

been using UMovieSceneCapture from C++ directly. No derived version. However it does not work out for us, to many problems, especially the encoder. We try to work with FFmpeg right now.

I just want to export video at runtime, can you share a little code for me? Tankyou

I found that sequence is inherited form UMovieSceneCapture , would i create a class that is inherited UMovieSceneCapture to do what i want to do?

The problem is the “just”. I would assume unreal provides something out of the box, but that is not the case
Use the class directly.

UMovieSceneCapture* movieCapture = NewObject();

https://forums.unrealengine.com/development-discussion/c-gameplay-programming/1414696-tsharedptr-destroyes-previous-rawpointer

1 Like

I have finished that record video at runtime ,but now have a problem that sharedpoint previous destroy rawpoint . I saw your idea but i don’t know that send a what parameters to MakeShareable()? And I couldn’t find someone example.

TSharedPtr viewport = MakeShareable(world->GetGameViewport()->GameViewport , ?);
MovieSceneCapture->Initialize(viewport);

First Link.

TSharedPtr viewport = MakeShareable(world->GetGameViewport()->GameViewport , CustomDeleterClass());

1 Like

Sorry, I still don’t understand it . Should I write a custom class ? But the function’s parameter type need to match . Which class should be inherited by this custom class?
please help me ,my project always crash. thanks.

class FDeleterNot
{
public:
void operator()(void*) {}
};

TSharedPtr viewport = MakeShareable(world->GetGameViewport()->GameViewport , FDeleterNot());

Thank you , that’s cool . now my project haven’t crash. and i have encountered another problem . I don’t know if you have encountered this problem , or if you have any suggestions.

Oh,My God! My project is finished , but after i package it , my code of UMovieSceneCapture is failure. i could’t export video,but i can do it in editor.
have you have encountered this problem in your project?