Skip to content

Commit ce8f61d

Browse files
committed
1.1.5: Add support for HE-AAC profile in mp4a.
1 parent 2d0bb47 commit ce8f61d

File tree

4 files changed

+20
-1
lines changed

4 files changed

+20
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [1.1.5] - 2023-10-22
6+
7+
### Changed
8+
9+
- codecs: Add support for HE-AAC profile in mp4a.
10+
511
## [1.1.4] - 2023-10-19
612

713
### Changed

codecs/codecs.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,10 +294,14 @@ function getVP09CodecString(stream) {
294294
*/
295295
function getMP4ACodecString(stream) {
296296
let frag = 'mp4a.40';
297+
// https://dashif.org/codecs/audio/
297298
switch (stream.profile) {
298299
case 'LC':
299300
frag += '.2';
300301
break;
302+
case 'HE-AAC':
303+
frag += '.5';
304+
break;
301305
// TODO: more!
302306
default:
303307
throw `Cannot handle AAC stream with profile ${stream.profile} yet. ` +

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@codedread/bitjs",
3-
"version": "1.1.4",
3+
"version": "1.1.5",
44
"description": "Binary Tools for JavaScript",
55
"homepage": "https://github.com/codedread/bitjs",
66
"author": "Jeff Schiller",

tests/codecs.spec.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,15 @@ describe('codecs test suite', () => {
488488
});
489489
});
490490

491+
it('recognizes codec_name=HE-AAC', () => {
492+
const info = structuredClone(baseInfo);
493+
info.streams[0].profile = 'HE-AAC';
494+
info.streams[0].codec_name = 'aac';
495+
expect(getFullMIMEString(info))
496+
.to.be.a('string')
497+
.and.equals('audio/mp4; codecs="mp4a.40.5"');
498+
});
499+
491500
it('handles codec_name=aac but no codec_tag_string', () => {
492501
const info = structuredClone(baseInfo);
493502
info.streams[0].profile = 'LC';

0 commit comments

Comments
 (0)