Giter Club home page Giter Club logo

ue_capturesubsystem's Introduction

Discord Telegram Website
"Buy Me A Coffee"

Hi there!

My name is iraj I'm a software developer and a freelancer intrested in Game development and using Real-Time rendereing to assist industries with their projects !
I'll try to upload any usable code into github to be used by this wonderful community!
If you want to support my work please visit Market Place

iraj's GitHub stats)

ue_capturesubsystem's People

Contributors

irajsb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ue_capturesubsystem's Issues

Memory not freed after destruction of CaptureSubsystemDirector

Hi. When capturing for longer periods of time, the RAM starts to fill up. This is especially noticeable when capturing at 120 fps, where the RAM fills up at around 200MB/s. This isn't surprising. However, after ending capture, the memory that was used up is not freed.
memorija
This is the graph of my RAM, total memory usage is pretty constant, then during capturing it rises up quickly, and then stays static again.
I tried debugging this, and the program calls the Encode_Finish method of the CaptureSubsystemDirector at the end of the capturing, where it seems that most of the memory should be freed. The UE5 project used is just the default Third Person Game, and the only code is this
blueprint_code
Just to note, I've tried running the same code with the output file being the recommended video file name instead of an RTMP stream link, and the issue persists. Also, the same issue is present when capturing at 30 fps, albeit slower.
Related question: Is there any way to free up memory during capturing in the case of encoding an RTMP stream, or is there a recommended method of doing this in an alternate way instead of just one continuous stream, as my goal is to make a live stream of an Unreal Engine application?

Crash when starting capture on UE 5.2

Whenever I try to start capture, it crashes the editor. The following is the crash log, is there any way to fix this problem? Thanks a lot!!

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x000001a6000005c5

UnrealEditor_Engine
UnrealEditor_CaptureSubsystem!UCaptureSubsystemDirector::OnBackBufferReady_RenderThread() [D:\UE5Projects\RecordingTest\Plugins\CaptureSubsystem\Source\CaptureSubsystem\Private\CaptureSubsystemDirector.cpp:193]
UnrealEditor_CaptureSubsystem!TBaseUObjectMethodDelegateInstance<0,UCaptureSubsystemDirector,void __cdecl(SWindow &,TRefCountPtr const &),FDefaultDelegateUserPolicy>::ExecuteIfSafe() [D:\Program Files\UE_5.2\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:552]
UnrealEditor_SlateRHIRenderer
UnrealEditor_SlateRHIRenderer
UnrealEditor_SlateRHIRenderer
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_RenderCore
UnrealEditor_RenderCore
UnrealEditor_Core
UnrealEditor_Core
kernel32
ntdll

Crash when starting capture in UE5.1

QQ图片20240102143113

Hi, I add this plugin into my project and set the start capture funtion when the game starts. It will crash and the callstack is below.

LoginId:a574e5434b40a4154f80ab8f9632a2b7
EpicAccountId:3d5a9c211f544f85b1345812ec162ebe

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000000000004b0

UnrealEditor_D3D12RHI!FD3D12Texture::Lock() [D:\build++UE5\Sync\Engine\Source\Runtime\D3D12RHI\Private\D3D12Texture.cpp:1750]
UnrealEditor_D3D12RHI!FD3D12DynamicRHI::LockTexture2D_RenderThread() [D:\build++UE5\Sync\Engine\Source\Runtime\D3D12RHI\Private\D3D12Texture.cpp:2122]
UnrealEditor_CaptureSubsystem!UCaptureSubsystemDirector::GetScreenVideoData() [E:\Learn\TestCapture\Plugins\UE_CaptureSubsystem-master\Source\CaptureSubsystem\Private\CaptureSubsystemDirector.cpp:320]
UnrealEditor_CaptureSubsystem!UCaptureSubsystemDirector::OnBackBufferReady_RenderThread() [E:\Learn\TestCapture\Plugins\UE_CaptureSubsystem-master\Source\CaptureSubsystem\Private\CaptureSubsystemDirector.cpp:222]
UnrealEditor_CaptureSubsystem!TBaseUObjectMethodDelegateInstance<0,UCaptureSubsystemDirector,void __cdecl(SWindow &,TRefCountPtr const &),FDefaultDelegateUserPolicy>::ExecuteIfSafe() [F:\UnrealEngine\UE_5.1\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:618]
UnrealEditor_SlateRHIRenderer!FSlateRHIRenderer::DrawWindow_RenderThread() [D:\build++UE5\Sync\Engine\Source\Runtime\SlateRHIRenderer\Private\SlateRHIRenderer.cpp:1418]
UnrealEditor_SlateRHIRenderer!TEnqueueUniqueRenderCommandType<FSlateRHIRenderer::DrawWindows_Private'::39'::SlateDrawWindowsCommandName,<lambda_f9feabdceba9d88a5c7b2ca3d59100d9> >::DoTask() [D:\build++UE5\Sync\Engine\Source\Runtime\RenderCore\Public\RenderingThread.h:206]
UnrealEditor_SlateRHIRenderer!TGraphTask<TEnqueueUniqueRenderCommandType<FSlateRHIRenderer::DrawWindows_Private'::39'::SlateDrawWindowsCommandName,<lambda_f9feabdceba9d88a5c7b2ca3d59100d9> > >::ExecuteTask() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:1348]
UnrealEditor_Core!FNamedTaskThread::ProcessTasksNamedThread() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:760]
UnrealEditor_Core!FNamedTaskThread::ProcessTasksUntilQuit() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:649]
UnrealEditor_RenderCore!RenderingThreadMain() [D:\build++UE5\Sync\Engine\Source\Runtime\RenderCore\Private\RenderingThread.cpp:415]
UnrealEditor_RenderCore!FRenderingThread::Run() [D:\build++UE5\Sync\Engine\Source\Runtime\RenderCore\Private\RenderingThread.cpp:541]
UnrealEditor_Core!FRunnableThreadWin::Run() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:149]

but If the ShowUI option is turned off, there is no problem.

Accessed nullptr after adding nvenc

Hi. It is what i can share from logs

[2023.11.30-13.03.33:255][669]LogCaptureSubsystem: Capturing Video
[2023.11.30-13.03.33:256][669]LogCaptureSubsystem: Creating Director
[2023.11.30-13.03.33:257][669]LogCaptureSubsystem: Creating Audio Encoder
[2023.11.30-13.03.33:290][672]LogCaptureSubsystem: Creating Encoder Thread
[2023.11.30-13.03.33:291][672]LogCaptureSubsystem: Creating Video encoder
[2023.11.30-13.03.33:291][672]LogCaptureSubsystem: nvenc added
[2023.11.30-13.03.35:362][672]LogWindows: Error: === Critical error: ===
[2023.11.30-13.03.35:363][672]LogWindows: Error:
[2023.11.30-13.03.35:363][672]LogWindows: Error: Fatal error!
[2023.11.30-13.03.35:363][672]LogWindows: Error:
[2023.11.30-13.03.35:363][672]LogWindows: Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000088
[2023.11.30-13.03.35:363][672]LogWindows: Error:
[2023.11.30-13.03.35:363][672]LogWindows: Error: [Callstack] 0x00007ffb1bb31425 avformat-59.dll!UnknownFunction []
[2023.11.30-13.03.35:363][672]LogWindows: Error: [Callstack] 0x00007ffb1bb5e2a7 avformat-59.dll!UnknownFunction []
[2023.11.30-13.03.35:363][672]LogWindows: Error: [Callstack] 0x00007ffb1bb60905 avformat-59.dll!UnknownFunction []
[2023.11.30-13.03.35:363][672]LogWindows: Error: [Callstack] 0x00007ffb1b561caa UnrealEditor-CaptureSubsystem.dll!UCaptureSubsystemDirector::Create_Video_Encoder() [D:\UnrealProjects\PolyCore5.1\Plugins\UE_CaptureSubsystem\Source\CaptureSubsystem\Private\CaptureSubsystemDirector.cpp:532]
[2023.11.30-13.03.35:363][672]LogWindows: Error: [Callstack] 0x00007ffb1b560295 UnrealEditor-CaptureSubsystem.dll!UCaptureSubsystemDirector::CreateEncodeThread() [D:\UnrealProjects\PolyCore5.1\Plugins\UE_CaptureSubsystem\Source\CaptureSubsystem\Private\CaptureSubsystemDirector.cpp:327]
[2023.11.30-13.03.35:363][672]LogWindows: Error: [Callstack] 0x00007ffb1b56b877 UnrealEditor-CaptureSubsystem.dll!UCaptureSubsystemDirector::OnBackBufferReady_RenderThread() [D:\UnrealProjects\PolyCore5.1\Plugins\UE_CaptureSubsystem\Source\CaptureSubsystem\Private\CaptureSubsystemDirector.cpp:205]
[2023.11.30-13.03.35:363][672]LogWindows: Error: [Callstack] 0x00007ffb1b56582c UnrealEditor-CaptureSubsystem.dll!TBaseUObjectMethodDelegateInstance<0,UCaptureSubsystemDirector,void __cdecl(SWindow &,TRefCountPtr const &),FDefaultDelegateUserPolicy>::ExecuteIfSafe() [E:\UE_5.1\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:618]

Sorry
I dont have debug symbols yet

Black rectangle in VR

In desktop all is okay but it doesnt capture VR
Im talking about capturing VR from Windows (not mobile version)
Logs are pure, no errors or warnings

Crash when starting capture in UE5.2

I just use StartCapture in Level Blueprint

LoginId:db6364de4234a01f75ca4b92b3cb168f
EpicAccountId:477dc34bc8ea42369e96133bb8eb6126

The error report display this.

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00007ff994ea82fb

VCRUNTIME140
UnrealEditor_Core!UE::String::Private::ConcatFStrings<FString const &,FString>() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\Containers\String.cpp:676]
UnrealEditor_Core!FString::ConcatFF() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\Containers\String.cpp:752]
UnrealEditor_CaptureSubsystem!<lambda_e774434e92df38bee76464832d9aaa7c>::operator()() [C:\Workspace\DBAIMetaHumanNewVersion\Project_Ari\Plugins\CaptureSubsystem\Source\CaptureSubsystem\Private\CaptureSubsystemDirector.cpp:951]
UnrealEditor_CaptureSubsystem!UE::Core::Private::Function::TFunctionRefCaller<<lambda_e774434e92df38bee76464832d9aaa7c>,void __cdecl(void)>::Call() [C:\Program Files\Epic Games\UE_5.2\Engine\Source\Runtime\Core\Public\Templates\Function.h:475]
UnrealEditor_Core!TGraphTask<FAsyncGraphTask>::ExecuteTask() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:1310]
UnrealEditor_Core!FNamedTaskThread::ProcessTasksNamedThread() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:758]
UnrealEditor_Core!FNamedTaskThread::ProcessTasksUntilQuit() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:649]
UnrealEditor_Core!FTaskGraphCompatibilityImplementation::WaitUntilTasksComplete() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:2123]
UnrealEditor_Engine!FTickTaskSequencer::ReleaseTickGroup() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp:556]
UnrealEditor_Engine!FTickTaskManager::RunTickGroup() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp:1583]
UnrealEditor_Engine!UWorld::RunTickGroup() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\LevelTick.cpp:770]
UnrealEditor_Engine!UWorld::Tick() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\LevelTick.cpp:1512]
UnrealEditor_UnrealEd!UEditorEngine::Tick() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\EditorEngine.cpp:1905]
UnrealEditor_UnrealEd!UUnrealEdEngine::Tick() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\UnrealEdEngine.cpp:519]
UnrealEditor!FEngineLoop::Tick() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:5812]
UnrealEditor!GuardedMain() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Launch.cpp:188]
UnrealEditor!GuardedMainWrapper() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:107]
UnrealEditor!LaunchWindowsStartup() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:244]
UnrealEditor!WinMain() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:284]
UnrealEditor!__scrt_common_main_seh() [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
kernel32
ntdll

and in crash report print log like this

[2024.03.13-08.25.01:561][ 69]LogCaptureSubsystem: Capturing Video
[2024.03.13-08.25.01:561][ 69]LogCaptureSubsystem: Creating Director
[2024.03.13-08.25.01:561][ 69]LogCaptureSubsystem: Creating Audio Encoder 
[2024.03.13-08.25.01:562][ 69]LogBlueprintUserMessages: [LV_AIStudio_C_3] Capture start
[2024.03.13-08.25.01:594][ 73]LogTemp: Creating Encoder
[2024.03.13-08.25.01:594][ 73]LogCaptureSubsystem: Creating Encoder Thread
[2024.03.13-08.25.01:594][ 73]LogCaptureSubsystem: Creating Video encoder
[2024.03.13-08.25.01:594][ 73]LogCaptureSubsystem: nvenc added
[2024.03.13-08.25.01:594][ 73]LogCaptureSubsystem: Warning: Using software encoder
[2024.03.13-08.25.01:594][ 73]LogCaptureSubsystem: Creating Video Queue
[2024.03.13-08.25.01:595][ 73]LogCaptureSubsystem: Error: 삄♴荈᡻甀핥�㶀랞ã甀适诌䣖쮋胨ț䠀쎋ᇫ譌먃� Error: 

In LogErrorUE() function it print unicode. but I have no idea how can check the reason. because it called on TaskGraph

Unsafe game exit

When u start recording u should manually stop recording or happened something strange.
For example, someone starts recording and then presses alt+f4 and recording will not stop by itself. In this case created video-file is empty. it is occupied and u cant delete it.

Crash when starting capture in UE5.2

Hi, I add this plugin into my project and set the start capture funtion when the game starts. It will crash and the callstack is below.

LoginId:ee59dbdb47407b5f9a3a199aa4238aae
EpicAccountId:f226dda7fb214bd9b9c0bd4f67d8202e

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000088

avformat_59
avformat_59
avformat_59
UnrealEditor_CaptureSubsystem!UCaptureSubsystemDirector::Create_Video_Encoder() [E:\FProjects\UEProj\Study03\Plugins\UE_CaptureSubsystem\Source\CaptureSubsystem\Private\CaptureSubsystemDirector.cpp:531]
UnrealEditor_CaptureSubsystem!UCaptureSubsystemDirector::CreateEncodeThread() [E:\FProjects\UEProj\Study03\Plugins\UE_CaptureSubsystem\Source\CaptureSubsystem\Private\CaptureSubsystemDirector.cpp:326]
UnrealEditor_CaptureSubsystem!UCaptureSubsystemDirector::OnBackBufferReady_RenderThread() [E:\FProjects\UEProj\Study03\Plugins\UE_CaptureSubsystem\Source\CaptureSubsystem\Private\CaptureSubsystemDirector.cpp:205]
UnrealEditor_CaptureSubsystem!TBaseUObjectMethodDelegateInstance<0,UCaptureSubsystemDirector,void __cdecl(SWindow &,TRefCountPtr const &),FDefaultDelegateUserPolicy>::ExecuteIfSafe() [E:\DevTools\UE5\UE_5.2\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:552]
UnrealEditor_SlateRHIRenderer
UnrealEditor_SlateRHIRenderer
UnrealEditor_SlateRHIRenderer
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_RenderCore
UnrealEditor_RenderCore
UnrealEditor_Core
UnrealEditor_Core
kernel32

FPS and Audio play sync issue

Capturing images by increasing the FPS option speeds up audio playback in proportion to FPS.
Only 30 fps work correctly video and audio syncronizing.

Capture Video slow rate

Hello,I use this code to capture game video. The game frame rate is greater than or equal to the video recording frame rate, and the recorded video effect is very good. If the game frame rate fluctuates and is lower than the frame rate of the recorded video, the recorded video may experience slow motion. Is there has a plan to fix this bug?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.