diff --git a/plugins/prebuffer-mixin/package-lock.json b/plugins/prebuffer-mixin/package-lock.json index f52b68382..d7a7f4fa7 100644 --- a/plugins/prebuffer-mixin/package-lock.json +++ b/plugins/prebuffer-mixin/package-lock.json @@ -1,12 +1,12 @@ { "name": "@scrypted/prebuffer-mixin", - "version": "0.1.139", + "version": "0.1.140", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@scrypted/prebuffer-mixin", - "version": "0.1.139", + "version": "0.1.140", "license": "Apache-2.0", "dependencies": { "@scrypted/common": "file:../../common", diff --git a/plugins/prebuffer-mixin/package.json b/plugins/prebuffer-mixin/package.json index 5ce680d07..8f43c5c3b 100644 --- a/plugins/prebuffer-mixin/package.json +++ b/plugins/prebuffer-mixin/package.json @@ -1,6 +1,6 @@ { "name": "@scrypted/prebuffer-mixin", - "version": "0.1.139", + "version": "0.1.140", "description": "Rebroadcast and Prebuffer for VideoCameras.", "author": "Scrypted", "license": "Apache-2.0", diff --git a/plugins/prebuffer-mixin/src/main.ts b/plugins/prebuffer-mixin/src/main.ts index 8995b34dd..6dbffca00 100644 --- a/plugins/prebuffer-mixin/src/main.ts +++ b/plugins/prebuffer-mixin/src/main.ts @@ -301,16 +301,16 @@ class PrebufferSession { else if (pcmAudio) { acodec = ['-an']; } - else if (reencodeAudio) { - // these are what homekit typically requests. + else if (reencodeAudio || (advertisedAudioCodec && !COMPATIBLE_AUDIO_CODECS.includes(advertisedAudioCodec))) { acodec = [ '-bsf:a', 'aac_adtstoasc', '-ar', `8k`, - '-b:a', `24k`, - '-bufsize', '96k', + '-b:a', `100k`, + '-bufsize', '400k', '-ac', `1`, '-acodec', 'libfdk_aac', - '-profile:a', 'aac_eld', + // can we change this to aac_eld somehow? mpegts does not support aac eld (AOT-39). + '-profile:a', 'aac_low', '-flags', '+global_header', ]; } @@ -575,7 +575,7 @@ class PrebufferSession { mediaStreamOptions.audio = { codec: 'aac', encoder: 'libfdk_aac', - profile: 'aac_eld', + profile: 'aac_low', } } else {