MovieSceneCapture: How do I capture and export videos with audio?

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;
}

Have you solved it yet? I also confused about it , could you tell me how to do?

Just use Runtime Video Recorder: https://www.fab.com/listings/b51f5253-d2c0-4281-bacf-5d84292dd1ee