w3c / webcodecs

WebCodecs is a flexible web API for encoding and decoding audio and video.
https://w3c.github.io/webcodecs/
Other
937 stars 131 forks source link

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

Open yangfangfang1204 opened 2 weeks ago

yangfangfang1204 commented 2 weeks ago

`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?