Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio recording? #4

Open
ToxaDev opened this issue Sep 21, 2017 · 4 comments
Open

Audio recording? #4

ToxaDev opened this issue Sep 21, 2017 · 4 comments

Comments

@ToxaDev
Copy link

ToxaDev commented Sep 21, 2017

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

@ash3D
Copy link
Owner

ash3D commented Sep 22, 2017

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.

@ToxaDev
Copy link
Author

ToxaDev commented Sep 22, 2017

Thank you for explanation this thing!
Nice job!

@ash3D
Copy link
Owner

ash3D commented Feb 8, 2018

WIP by @MykonCodes.

@ash3D ash3D reopened this Feb 8, 2018
@I8Robot
Copy link

I8Robot commented Jun 27, 2023

WIP by @MykonCodes.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants