w3c / w3c/webcodecs

Why is the audio encoder output timestamp different from the input timestamp

Open
#803 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
1.3k
Forks
194
Avg merge
1d 13h
Merged PRs (30d)
3

Description

`const init = {
format: "s16",
sampleRate: 48000,
numberOfFrames: PCMData.length / 2,
numberOfChannels: 1,
timestamp: inputTimeStamp,
data: PCMData,
};
const frame = new AudioData(init);
this.AudioEncoderObj.encode(frame);

output(frame, meta){
let outputTimeStamp = frame.timestamp;
}`

why the outputTimeStamp is different from the inputTimeStamp?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the AudioData construction, AudioEncoderObj.encode(frame), and the output(frame, meta) callback shown in the issue. Compare the input timestamp with the output frame timestamp and consult the WebCodecs timestamp behavior; done means documenting why they differ or identifying a reproducible encoder defect.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, audio-video-rtc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.