core icon indicating copy to clipboard operation
core copied to clipboard

Encoding error. (Failed to initialize video encode accelerator.)

Open chebum opened this issue 1 year ago • 3 comments

The demo app crashes when being used in Chrome 129.0.6668.101 on a MacBooks with Apple M3 processor.

A call to VideoCodec.encode fails with the following error: Encoding error. (Failed to initialize video encode accelerator.)

Here is a screenshot of the console output, including VideoCodec config returned by the getConfigs function. Screenshot 2024-10-15 at 16 45 03

Software encoding (hardwareAcceleration = "prefer-software") works properly.

Is there something I can try to solve the problem?

chebum avatar Oct 15 '24 14:10 chebum

All these exceptions were raised by the VideoEncoder object (Google implementation). You should address this with the chromium team (https://issues.chromium.org/issues).

It seems like VideoEncoder.isConfigSupported() is returning an incompatible config.

k9p5 avatar Oct 17 '24 07:10 k9p5

Can we somehow pass hardwareAcceleration option to the Encoder?

fax1ty avatar Dec 01 '24 12:12 fax1ty

@fax1ty I removed the hardwareAcceleration option in my private fork: https://github.com/chebum/diffusionstudio-core

It's published to github's NPM repo. You can install the fork as following:

  1. Create .npmrc file, if it's not present yet, and add the following line: @chebum:registry=https://npm.pkg.github.com
  2. Execute npm install --save @chebum/diffusionstudio-core

chebum avatar Dec 01 '24 13:12 chebum

Please try again with version 4

k9p5 avatar Nov 18 '25 19:11 k9p5