Enabling audio on video recording

Hi theree!

So im using 8ThWall video recording function within the XR8.MediaRecorder. Now i need to have also the audio recorded, when the user is recording a video.

Because im using PlayCanvas and found no reference, i could not bring this to work. I used:

const pcAudioContext = this.app.systems.sound.context;

XR8.MediaRecorder.configure({
      maxDurationMs: 15000,
      enableEndCard: false,
      requestMic: XR8.MediaRecorder.RequestMicOptions.MANUAL,
      audioContext: pcAudioContext,
  });

I just need to record the ingame audio, no microphone. Now im not sure what parameters i need to make this work, because my snippet above doesnt work.

I tried to orientate on the 8thwall docs: XR8.MediaRecorder.configure() | 8th Wall but the excample doesnt inlcude a straight idea about how to achieve this for PlayCanvas in my opinion.

For excample do i also have to use the “configureAudioOutput: userConfiguredAudioOutput” parameter? All those setup inside the function is a bit difficult to understand in the context of PlayCanvas - talking about this const:

const userConfiguredAudioOutput = ({microphoneInput, audioProcessor}) => {
  const myCustomAudioGraph = ...
  myCustomAudioSource.connect(myCustomAudioGraph)
  microphoneInput.connect(myCustomAudioGraph)

  // Connect audio graph end node to hardware.
  myCustomAudioGraph.connect(microphoneInput.context.destination)

  // Audio graph will be automatically connected to processor.
  return myCustomAudioGraph
}

Overall i thought the audioContext should be enough to also record sound, depending on the parameter description.

Any help & input would be great - i would have to bring this to work asap - thanks in advance!

Best regards!

I would reference this thread

Hello Ian,

Thanks for your feedback - unfortunately I can’t use the reference as I use Playcanvas and have integrated the audioContext as described in your documentation. The audioContext returns correct values ​​but is still not recorded.

The documentation doesn’t provide a good reference for PlayCanvas users - plus I couldn’t find any threads online that address the issue. Therefore, it still couldn’t be solved because there is no information about what else your pipeline needs to include the sound in the recorded video.

In your reference you mentioned that the sound should not be included in the video texture - in my case it is its own sound source (not a sound that comes over a video).

The documentation should be expanded for PlayCanvas scenarios in my opinion, as there is currently too little information about what parameters you need - it seems to differ in terms of a-frame or three.js or other engines. In general, the problem is that the documentation for PlayCanvas users who want to use 8thwall is unfortunately really lacking in some cases.

I now had to complete the project without sound capturing, which is very sobering.

Anyway thanks for your input!

2 Likes

Has anyone managed to record audio on playcanvas? I’m in the same place as @jose_burga
I see absolutely nothing in the documentation that I could rely on :<