redotvideo / revideo

Create Videos with Code
https://re.video
MIT License
2.58k stars 88 forks source link

Flac audio causes MEDIA_ERR_NETWORK #233

Open Pita opened 3 months ago

Pita commented 3 months ago

I have the following code:

import {Audio, makeScene2D} from '@revideo/2d';
import {waitFor} from '@revideo/core';

export default makeScene2D(function* (view) {
  for (let i = 0; i < 100; i++) {
    yield view.add(<Audio src="/sounds/iphone.flac" play={true} />);
    yield* waitFor(1);
  }
});

when I run render, I get this error:

Worker 0: JSHandle:ERROR: Error loading audio: /sounds/iphone.flac, MEDIA_ERR_NETWORK. This might be a 404 error.

If I replace .flac with .wav. It works as expected. The audios I used are here: Archive.zip, placed in public/sounds

For now I can workaround this by using wav. But this might be an indicator of a deeper issue. Up to you, just thought its worth reporting.

justusmattern27 commented 3 months ago

looking into this, thanks for the pointer!