Uncaught (in promise) DOMException: Failed to execute 'decode' on 'VideoDecoder': A key frame is required after configure() or flush()
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 1.3k
- Forks
- 194
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 3
Description
I'm getting a browser error when decoding H265, “VideoDecoder.js:270 Uncaught (in promise) DOMException: Failed to execute 'decode' on 'VideoDecoder': A key frame is required after configure() or flush(). If you're using HEVC formatted H.265 you must fill out the description field in the VideoDecoderConfig.” Here's some of my code:
let config = {
codec: "hvc1.1.6.L123.00",
};
const chunk = new EncodedVideoChunk({
data: payData,
timestamp: videoInfo.timeStamp,
type: videoInfo.isKeyFrame ? 'key' : 'delta'
});
this.decoderObj.decode(chunk);
An error occurs when the code is executed at this point “this.decoderObj.decode(chunk);”,I would like to ask for advice on how to locate the error,Or I'd like to know how to catch the error of this interface“decode”,For example, is there a way to throw an exception or return a value for a function
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the VideoDecoder configuration and the this.decoderObj.decode(chunk) call shown in the report, including the key-frame and description inputs mentioned by the browser error. No repository file or test is named; the issue would be complete when the expected decode error behavior and a reproducible way to handle it are clarified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100