uiprotect 7.5.6__py3-none-any.whl → 7.6.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of uiprotect might be problematic. Click here for more details.
- uiprotect/api.py +4 -0
- uiprotect/stream.py +12 -1
- {uiprotect-7.5.6.dist-info → uiprotect-7.6.1.dist-info}/METADATA +1 -1
- {uiprotect-7.5.6.dist-info → uiprotect-7.6.1.dist-info}/RECORD +7 -7
- {uiprotect-7.5.6.dist-info → uiprotect-7.6.1.dist-info}/WHEEL +1 -1
- {uiprotect-7.5.6.dist-info → uiprotect-7.6.1.dist-info}/LICENSE +0 -0
- {uiprotect-7.5.6.dist-info → uiprotect-7.6.1.dist-info}/entry_points.txt +0 -0
uiprotect/api.py
CHANGED
|
@@ -1578,6 +1578,7 @@ class ProtectApiClient(BaseApiClient):
|
|
|
1578
1578
|
raise_exception=False,
|
|
1579
1579
|
)
|
|
1580
1580
|
|
|
1581
|
+
_LOGGER.debug("Requesting camera video: %s%s %s", self.api_path, path, params)
|
|
1581
1582
|
r = await self.request(
|
|
1582
1583
|
"get",
|
|
1583
1584
|
f"{self.api_path}{path}",
|
|
@@ -1585,6 +1586,9 @@ class ProtectApiClient(BaseApiClient):
|
|
|
1585
1586
|
timeout=0,
|
|
1586
1587
|
params=params,
|
|
1587
1588
|
)
|
|
1589
|
+
if r.status != 200:
|
|
1590
|
+
await self._raise_for_status(r, True)
|
|
1591
|
+
|
|
1588
1592
|
if output_file is not None:
|
|
1589
1593
|
async with aiofiles.open(output_file, "wb") as output:
|
|
1590
1594
|
|
uiprotect/stream.py
CHANGED
|
@@ -18,6 +18,12 @@ if TYPE_CHECKING:
|
|
|
18
18
|
|
|
19
19
|
_LOGGER = logging.getLogger(__name__)
|
|
20
20
|
|
|
21
|
+
CODEC_TO_ENCODER = {
|
|
22
|
+
"aac": "aac",
|
|
23
|
+
"opus": "libopus",
|
|
24
|
+
"vorbis": "libvorbis",
|
|
25
|
+
}
|
|
26
|
+
|
|
21
27
|
|
|
22
28
|
class FfmpegCommand:
|
|
23
29
|
ffmpeg_path: Path | None
|
|
@@ -130,6 +136,11 @@ class TalkbackStream(FfmpegCommand):
|
|
|
130
136
|
if len(input_args) > 0:
|
|
131
137
|
input_args += " "
|
|
132
138
|
|
|
139
|
+
codec = camera.talkback_settings.type_fmt.value
|
|
140
|
+
encoder = CODEC_TO_ENCODER.get(codec)
|
|
141
|
+
if encoder is None:
|
|
142
|
+
raise ValueError(f"Unsupported codec: {codec}")
|
|
143
|
+
|
|
133
144
|
# vn = no video
|
|
134
145
|
# acodec = audio codec to encode output in (aac)
|
|
135
146
|
# ac = number of output channels (1)
|
|
@@ -138,7 +149,7 @@ class TalkbackStream(FfmpegCommand):
|
|
|
138
149
|
cmd = (
|
|
139
150
|
"-loglevel info -hide_banner "
|
|
140
151
|
f'{input_args}-i "{content_url}" -vn '
|
|
141
|
-
f"-acodec {
|
|
152
|
+
f"-acodec {encoder} -ac {camera.talkback_settings.channels} "
|
|
142
153
|
f"-ar {camera.talkback_settings.sampling_rate} -b:a {camera.talkback_settings.sampling_rate} -map 0:a "
|
|
143
154
|
f'-f adts "udp://{camera.host}:{camera.talkback_settings.bind_port}?bitrate={camera.talkback_settings.sampling_rate}"'
|
|
144
155
|
)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
uiprotect/__init__.py,sha256=Oz6i1tonIz4QWVnEPkbielJDJ3WQdwZVgYtjY4IwGAQ,636
|
|
2
2
|
uiprotect/__main__.py,sha256=C_bHCOkv5qj6WMy-6ELoY3Y6HDhLxOa1a30CzmbZhsg,462
|
|
3
3
|
uiprotect/_compat.py,sha256=HThmb1zQZCEssCxYYbQzFhJq8zYYlVaSnIEZabKc-6U,302
|
|
4
|
-
uiprotect/api.py,sha256=
|
|
4
|
+
uiprotect/api.py,sha256=hP6jeAh6K21KFAH6YiFLDlajEyb7UTdCM8vJzhGr_Z8,70477
|
|
5
5
|
uiprotect/cli/__init__.py,sha256=gHo9G2WusvrWgnHhecT8Q2NLRXG0VS-rc9TKy4V5Kw8,8951
|
|
6
6
|
uiprotect/cli/aiports.py,sha256=wpEr2w_hY18CGpFiQM2Yc0FiVwG_1l2CzZhZLGNigvI,1576
|
|
7
7
|
uiprotect/cli/backup.py,sha256=ZiS7RZnJGKI8TJKLW2cOUzkRM8nyTvE5Ov_jZZGtvSM,36708
|
|
@@ -27,13 +27,13 @@ uiprotect/data/websocket.py,sha256=m4EV1Qfh08eKOihy70ycViYgEQpeNSGZQJWdtGIYJDA,6
|
|
|
27
27
|
uiprotect/exceptions.py,sha256=kgn0cRM6lTtgLza09SDa3ZiX6ue1QqHCOogQ4qu6KTQ,965
|
|
28
28
|
uiprotect/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
29
|
uiprotect/release_cache.json,sha256=NamnSFy78hOWY0DPO87J9ELFCAN6NnVquv8gQO75ZG4,386
|
|
30
|
-
uiprotect/stream.py,sha256=
|
|
30
|
+
uiprotect/stream.py,sha256=LPvh2YZ50bSdSzSowAYJUDVfeLUHXN33E62kunVk6fs,5051
|
|
31
31
|
uiprotect/test_util/__init__.py,sha256=HlQBgIgdtrvT-gQ5OWP92LbgVr_YzsD5NFImLRonUZk,19320
|
|
32
32
|
uiprotect/test_util/anonymize.py,sha256=f-8ijU-_y9r-uAbhIPn0f0I6hzJpAkvJzc8UpWihObI,8478
|
|
33
33
|
uiprotect/utils.py,sha256=5Z30chqnQhQdtD1vabRtZXjBpeiJagL5KDuALQlWxk8,20559
|
|
34
34
|
uiprotect/websocket.py,sha256=tEyenqblNXHcjWYuf4oRP1E7buNwx6zoECMwpBr-jig,8191
|
|
35
|
-
uiprotect-7.
|
|
36
|
-
uiprotect-7.
|
|
37
|
-
uiprotect-7.
|
|
38
|
-
uiprotect-7.
|
|
39
|
-
uiprotect-7.
|
|
35
|
+
uiprotect-7.6.1.dist-info/LICENSE,sha256=INx18jhdbVXMEiiBANeKEbrbz57ckgzxk5uutmmcxGk,1111
|
|
36
|
+
uiprotect-7.6.1.dist-info/METADATA,sha256=9-8pmonc3Ww_eH--eauV-lbDncRI9e4TTQoUAVQ54vk,11108
|
|
37
|
+
uiprotect-7.6.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
38
|
+
uiprotect-7.6.1.dist-info/entry_points.txt,sha256=J78AUTPrTTxgI3s7SVgrmGqDP7piX2wuuEORzhDdVRA,47
|
|
39
|
+
uiprotect-7.6.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|