Closed runner365 closed 2 years ago
I think your the mp4a* strings are all correct, but you're getting "unsupported" simply because we (Chrome) haven't implemented aac encoding yet. Currently the only supported audio encoder is opus. AAC encode support is on our roadmap, but it may not be included at initial launch.
@chcunningham almost one year later, what about AAC ? Is it usable now ?
This page make me think it's doable https://www.w3.org/TR/webcodecs-aac-codec-registration/
but when I try to do this
this.audioEncoder.configure({
codec:"mp4a.40.2",
//codec: "opus",
sampleRate:samplerate,
numberOfChannels:channelCount,
bitrate:bitrate,
aac:{format:"aac"}
});
I get the error : DOMException: Failed to execute 'configure' on 'AudioEncoder': Unsupported codec type.
Any help is welcomed !
AAC encoding in Chrome's WebCodecs implementation is experimental, and in particular is available on Windows behind the flag --enable-features=PlatformAudioEncoder
You can track the progress of that implementation at https://bugs.chromium.org/p/chromium/issues/detail?id=1259883 and are welcome to begin testing!
Any way to get a chrome version with AAC support?
Stable macOS and Windows versions support AAC encoding. Please file bugs at https://crbug.com/new if you run into any issues.
Hello Dale Curtis,
It s not a bug but as far as i know there is no working exemple of an audio/video transcoding that output a mp4 file.
It could be very helpful if you could provide one.
Le jeu. 12 janv. 2023 à 18:49, Dale Curtis @.***> a écrit :
Stable macOS and Windows versions support AAC encoding. Please file bugs at https://crbug.com/new if you run into any issues.
— Reply to this email directly, view it on GitHub https://github.com/w3c/webcodecs/issues/259#issuecomment-1380782126, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACCTML3FQNRA642TNXPJD3WSA73JANCNFSM45UEYD4Q . You are receiving this because you commented.Message ID: @.***>
I just would like help with a sample to create an AAC in ADTS format, audio only.
You should just be able to configure the encoder for aac and attach ADTS headers to the output samples. Is that not working?
mp4box.js should support aac muxing, but I haven't tried it.
I don't need / want mp4box.js. WebCodecs standard already provides AAC in ADTS format.
I think I should use something like this right:
const config = {
numberOfChannels: music_buffer.numberOfChannels,
sampleRate: sampleRate,
codec: "mp4a.40.2",
aac: { format: 'adts' },
bitrate: 128000
};
Ah, we forgot to implement https://www.w3.org/TR/webcodecs-aac-codec-registration/#aac-encoder-config -- filed https://bugs.chromium.org/p/chromium/issues/detail?id=1407013
You can pretty simply append an adts header in javascript using the current implementation though.
Thanks Dale! Have a nice day!
One more question: you mentioned mp4box.js, which is great, but do you also know about some javacript muxer for webm/matroska format? I saw one in this repo in the examples folder, but it seems a video-only muxer. I think I'll use Opus for now, as its implementation in WebCodecs seems a bit more mature and works on Linux / MacOS / Windows and Android already. But I also could find no sample which encodes to Opus and mux to webm.
Unfortunately I'm not aware of a webm/mkv muxer of similar quality to mp4box.js. Folks have just found a few random ones lurking around GitHub. It shouldn't be too hard to add audio to a video only muxer. It's should only be adding the audio related EBML fields.
Yay already committed, tks Dale! https://chromium.googlesource.com/chromium/src/+/5bb89226f7e788fef09f0154c853cb136c008dc1 Which version will have it already? Nightly already picks it?
Cheers!
I think it would be nice to have a sample here with a simple audio encoding software to AAC/ADTS and let the audio be downloaded.
AAC/ADTS switch in Chromium is still work in progress. I'll put a link to a sample here when it's done.
Thanks Eugene! I wanted to say that it would be nice to have some sample code for an audio encoding pipeline for AAC in ADTS format here: https://github.com/w3c/webcodecs/tree/main/samples
Bug fixed! https://bugs.chromium.org/p/chromium/issues/detail?id=1407013
Do you when this code will roll to chrome nighties?
Looks like 112.0.5600.0 per https://storage.googleapis.com/chromium-find-releases-static/5ef.html#5ef816ccd77177d316eb89317ee060fc211fbb59
Yay, it works on Chrome on Windows, but not in Chrome on Android. Am I doing something wrong? My test page: https://abradig.org.br/colmena-aac/test-aac.html
Currently, Chromium only supports AAC encoding on Windows and MacOS
Right. Do you think there is a chance in the future it also supports it in Android, as the Fraunhofer AAC implementation is there?
ffaac (ffmpeg aac implementation) is also complete and can support all mpeg 4 aac profiles listed in the standard, so Linux could also benefit from this.
good news, Chromium(120) is about to support AAC on Android. Check this CL: https://chromium-review.googlesource.com/c/chromium/src/+/4950497
Yay! Support on Windows, Mac and Android. Only Linux missing now! Issue here: https://bugs.chromium.org/p/chromium/issues/detail?id=1502444 : )
Great news ! Thanks for sharing !
Yes, please open a bug on crbug.com if you run into issues with it. Thanks!
Hi, I try to encode aac-lc in webcodecs: try in the way:
try in the way:
try in the way:
try in the way:
but They turns out: "unsupported codec type".
I read reference from:
But I fail to get the answers, Please help.