mirror of
https://github.com/codedread/bitjs
synced 2025-10-03 09:39:16 +02:00
1.1.5: Add support for HE-AAC profile in mp4a.
This commit is contained in:
parent
2d0bb47014
commit
ce8f61da94
4 changed files with 20 additions and 1 deletions
|
@ -2,6 +2,12 @@
|
|||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## [1.1.5] - 2023-10-22
|
||||
|
||||
### Changed
|
||||
|
||||
- codecs: Add support for HE-AAC profile in mp4a.
|
||||
|
||||
## [1.1.4] - 2023-10-19
|
||||
|
||||
### Changed
|
||||
|
|
|
@ -294,10 +294,14 @@ function getVP09CodecString(stream) {
|
|||
*/
|
||||
function getMP4ACodecString(stream) {
|
||||
let frag = 'mp4a.40';
|
||||
// https://dashif.org/codecs/audio/
|
||||
switch (stream.profile) {
|
||||
case 'LC':
|
||||
frag += '.2';
|
||||
break;
|
||||
case 'HE-AAC':
|
||||
frag += '.5';
|
||||
break;
|
||||
// TODO: more!
|
||||
default:
|
||||
throw `Cannot handle AAC stream with profile ${stream.profile} yet. ` +
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@codedread/bitjs",
|
||||
"version": "1.1.4",
|
||||
"version": "1.1.5",
|
||||
"description": "Binary Tools for JavaScript",
|
||||
"homepage": "https://github.com/codedread/bitjs",
|
||||
"author": "Jeff Schiller",
|
||||
|
|
|
@ -488,6 +488,15 @@ describe('codecs test suite', () => {
|
|||
});
|
||||
});
|
||||
|
||||
it('recognizes codec_name=HE-AAC', () => {
|
||||
const info = structuredClone(baseInfo);
|
||||
info.streams[0].profile = 'HE-AAC';
|
||||
info.streams[0].codec_name = 'aac';
|
||||
expect(getFullMIMEString(info))
|
||||
.to.be.a('string')
|
||||
.and.equals('audio/mp4; codecs="mp4a.40.5"');
|
||||
});
|
||||
|
||||
it('handles codec_name=aac but no codec_tag_string', () => {
|
||||
const info = structuredClone(baseInfo);
|
||||
info.streams[0].profile = 'LC';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue