Skip to content

Commit

Permalink
Force AAC audio to be used in RTSP URL (#419)
Browse files Browse the repository at this point in the history
* Force AAC audio to be used in RTSP URL

* Add reminder to remove after fix
  • Loading branch information
felipecrs authored Jan 26, 2023
1 parent eeabcad commit b91d882
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions custom_components/frigate/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,8 @@ def __init__(
**self._camera_config
)
else:
self._stream_source = (
f"rtsp://{URL(self._url).host}:8554/{self._cam_name}"
)
# TODO: Remover after https://github.com/AlexxIT/go2rtc/issues/194 gets fixed
self._stream_source = f"rtsp://{URL(self._url).host}:8554/{self._cam_name}?video=copy&audio=aac"

elif self._camera_config.get("rtmp", {}).get("enabled"):
self._restream_type = "rtmp"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ async def test_frigate_camera_setup_rtsp(

source = await async_get_stream_source(hass, TEST_CAMERA_FRONT_DOOR_ENTITY_ID)
assert source
assert source == "rtsp://example.com:8554/front_door"
assert source == "rtsp://example.com:8554/front_door?video=copy&audio=aac"

aioclient_mock.get(
"http://example.com/api/front_door/latest.jpg?h=277",
Expand Down

0 comments on commit b91d882

Please sign in to comment.