Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

appendBuffer support audio format is aac or pcm? or? #423

Open
jackluooo opened this issue Nov 14, 2024 · 4 comments
Open

appendBuffer support audio format is aac or pcm? or? #423

jackluooo opened this issue Nov 14, 2024 · 4 comments

Comments

@jackluooo
Copy link

hello, What format is the audio data obtained in this way?
pcm? or?

if to merge with video buffer,need to transform aac or opus?
which audio formats does mp4box support?

thank you

 this.mp4BoxFile.setExtractionOptions(this.audioTrack.id);
    let audioChunks = [];
    this.mp4BoxFile.onSamples = (id, user, samples) => {
      samples.forEach((sample) => audioChunks.push(sample.data));
    };
    this.mp4BoxFile.start();
    console.log(audioChunks);
    this.audio_C = this._mergeArrayBuffers(audioChunks);
    console.log(this.audio_C);

@DenizUgur
Copy link
Member

MP4Box.js does not care about the codec. You can check the track information (this.audioTrack in your snippet) or from the stsd box to see which sample entry is listed.

@jackluooo
Copy link
Author

but after appendBuffer audio not right append,video append is ok.

@DenizUgur
Copy link
Member

Have you followed my suggestion in the other issue to add another track for audio?

@jackluooo
Copy link
Author

jackluooo commented Nov 15, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants