I was looking for a free way to record and export videos that works in a bundled project and found MovieSceneCapture, and after a lot of research I managed to get it to work, but the videos are muted, I’ve tried all the audio capture protocols but not got it, could someone help me? I need this for my work with Virtual Production and Composure
I plan to provide a tutorial on how to use MovieSceneCapture if I can.
my code:
bool UBpsFuncLibrary::StartCapture(UCustomMovieSceneCapture*& MovieSceneCapture,
FMovieSceneCaptureSettings MovieSettings,
TSubclassOf<UMovieSceneImageCaptureProtocolBase> ImageProtocol,
TSubclassOf<UMovieSceneAudioCaptureProtocolBase> AudioProtocol)
{
UCustomMovieSceneCapture* MovieCapture = NewObject<UCustomMovieSceneCapture>();
TSharedPtr<FSceneViewport> SceneViewport;
// Get Scene Viewport
if (GEngine->GameViewport && GEngine->GameViewport->GetGameViewportWidget())
{
SceneViewport = MakeShareable(new FSceneViewport( GEngine->GameViewport, GEngine->GameViewport->GetGameViewportWidget() ));
}
if (MovieCapture)
{
if (ImageProtocol)
{
MovieCapture->SetImageCaptureProtocolType(ImageProtocol);
}
if (AudioProtocol)
{
MovieCapture->SetAudioCaptureProtocolType(AudioProtocol);
}
MovieCapture->Settings = MovieSettings;
MovieCapture->Initialize(SceneViewport,0);
MovieCapture->StartWarmup();
MovieCapture->StartCapture();
MovieSceneCapture = MovieCapture;
return true;
}
return false;
}
bool UBpsFuncLibrary::FinishCapture(UCustomMovieSceneCapture* MovieCapture, bool ForceFinish)
{
if(MovieCapture)
{
(ForceFinish) ? MovieCapture->Finalize(), MovieCapture->Close() : MovieCapture->FinalizeWhenReady();
return true;
}
return false;
}