UEVideoRecorder icon indicating copy to clipboard operation
UEVideoRecorder copied to clipboard

Audio recording?

Open ToxaDev opened this issue 8 years ago • 4 comments

Do you planning add audio recording? Can you give some advise how implement this feature to your plugin? Thank you

ToxaDev avatar Sep 21 '17 23:09 ToxaDev

It would be interesting but currently I have not plans to implement audio recording.

In order to add this to plugin 2 things should be accomplished: grab audio data from UE4 and encode it to file.

Encoding takes place in VideoRecorder library, it uses FFmpeg. FFmpeg has facilities for audio too and it handles it in similar manner as it does it for video. So the following steps required: add audio stream to media file, initialize encoder, send audio frames to encoder and write encoded packets to file. There is probably some aspect though that should be handled differently for audio. VideoRecorder performs frame sampling (in order to fit variable framerate to target video FPS), queues sampled frames up and processes these as they have been finished by GPU. Audio data on the other hand should be submitted as is, no sampling required. It also probably should be available immediately thus queueing is not necessary either. Also some audio/video synchronization mechanism may be required.

As for capturing audio data from UE4 I have not found robust solution yet. It is possible to get data from USoundWave but this is single sound source placed in the world, it is not what the player actually hears. Maybe it is possible to grab audio data from FMixerDevice or other stuff in AudioMixer module, one way that one can try is to attempt somehow to hook OnProcessAudioStream.

ash3D avatar Sep 22 '17 17:09 ash3D

Thank you for explanation this thing! Nice job!

ToxaDev avatar Sep 22 '17 17:09 ToxaDev

WIP by @MykonCodes.

ash3D avatar Feb 08 '18 06:02 ash3D

WIP by @MykonCodes.

Does audio recording is add to this great work? @ash3D

I8Robot avatar Jun 27 '23 05:06 I8Robot