Audio missing in Captured Video

Hy, I have one video which is imported in a-assets and used further in a-entity and i want to capture the audio of the video but currently it captures only video of scene not audio. I have added include-scene-audio to true in capture config but not works and also i have tried request-mix to auto but it captures only mic audio not scene. can anyone help.

<video
      id="selfieVid"
      src="assets/Vid/SelfieVid.mp4"
      playsinline
      webkit-playsinline
      loop="true"></video>

I have this video tag in <a-assets>.

Hi @Equanimous_Technolog ,

Capturing audio in the scene can be tricky, especially when trying to capture audio from a video texture.

We have a sample project demonstrating how to include scene audio in A-Frame with MediaRecorder, which is done with xrextras-capture-config and <a-entity sound>.

Unfortunately, a video texture is not considered β€œscene audio”. As a workaround, I suggest following the same approach as the sample project and manually playing the sound via its own entity and muting the video track itself.

For example:

<!-- html -->
<a-scene>
  <a-assets>
    <video id="video" src="./assets/video-sound.mp4" muted></video>
    <audio id="audio" src="./assets/video-sound.mp4"></audio>
  </a-assets>

  <xrextras-capture-config request-mic="manual" ...></xrextras-capture-config>

  <a-camera position="0 1 2">
    <a-entity sound="src: #audio"></a-entity>
  </a-camera>
  
  <a-box material="src: #video"></a-box>
  
</a-scene>
// js
const playVideo = () => {
  const video = document.getElementById('video')
  const audio = document.querySelector('[sound]')
  audio.components.sound.playSound()
  video.play()
}
window.addEventListener('click', playVideo)

Let us know how things go!

Thanks for your reply and need one another help also. I also wanted to capture the audio of the evercoast video (.ecm file) which i have added already using aframe api of the evercoast. Can you help me with that also.
Here is the code i have added in the a-scene

 <a-entity
        id="ecsEntity"
        evercoast-asset="src: https://streaming.evercoast.com/Evercoast/UKRAINE.PZ.ec.take.002/2676/UKRAINE.PZ.ec.take.002.v2.ecm;"
        evercoast-asset-fade=""
        evercoast-text-track="offset: 170"
        position="0 0 0"
        scale="0.5 0.5 0.5"
        rotation="0 80 0"
        visible="false">
      </a-entity>

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.