irajsb / UE_CaptureSubsystem

Runtime video and screenshot capture system for Unreal Engine
MIT License
95 stars 18 forks source link

cont open video #15

Open Zydzzb opened 2 months ago

Zydzzb commented 2 months ago

Hi, thank you for your plugin. I have a question: is it possible to record multiple submixes simultaneously into a single MP4 file? For certain reasons, I prefer not to merge the two submixes into one. I would like to register each of these two submixes separately using RegisterSubmixBufferListener(). Is this feasible?

irajsb commented 2 months ago

not by default. unless you customize the code yourself.

Zydzzb commented 2 months ago

@irajsb Can you provide guidance on how to write two audio streams into OutFormatContext and combine them with the video stream to form an MP4?

I created two audio encoders and duplicated the Encode_Audio_Frame function, binding it to thread::run as well. However, in the end, only one audio stream is heard.

Thanks!

irajsb commented 2 months ago

Having two separate audios means you have to switch between them. First you have to try what you want to do using ffmpeg command line. then you have to find out what does that command line switch does in cpp code of ffmpeg itself. then do that exact logic inside this plugin code