rebroadcast: fix transcode bug, mpegts does not support aac_eld. figure out how to make that work!

This commit is contained in:
Koushik Dutta
2022-01-28 21:00:38 -08:00
parent 5aa3818bf7
commit 1f6257b035
3 changed files with 9 additions and 9 deletions

View File

@@ -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",

View File

@@ -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",

View File

@@ -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 {