Closed erwanvivien closed 1 month ago
Thanks for the PR. Please give the PR a proper title and description first, then I'll check it out!
I still need time to fix things, it seems like audio exported file doesn't work on QuickTime player
Edit: It doesn't work for an FFMpeg exported file too 🫡
I think the PR is in fact OK, but after testing different players, some of them play the audio some do not
On my device (MacOS 12):
I know that for a long time QuickTime was not able to play MP3 frames in an MP4, see https://stackoverflow.com/a/28778982 https://stackoverflow.com/a/34394517 https://old.reddit.com/r/ffmpeg/comments/c8z17w/comment/esuur48/
======
The only problem I have is that the "mp3 " box seems weird to me, when I encode with FFMpeg using liblame for the MP3 encoding, I'm getting the normal stsd with mp4a boxes 🤔 And when I try that with your already existing boxes it fails miserably
======
I will not be pushing the PR as I was not aware that AAC encoding was available on all Chrome platforms. I only referred to this Chromium code to see wether or not AAC encoding was possible
In fact I will close the PR and open a new one without the MP3 commit (e68c0b6bcdd30350a272d8b9c6d6b407c556e8de) just to push the few made improvements
I made a repro that you can test with
yarn && npm run dev
output.tar.gz also available here: https://github.com/erwanvivien/canvaskit-question/tree/evi/mp4-from-saved-chunks
The code is this
with this file for mp3chunk.json
mp3chunk.json