Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No audio in HA HLS live view with Frigate 0.12 and go2rtc restream #418

Closed
felipecrs opened this issue Jan 23, 2023 · 6 comments · Fixed by blakeblackshear/frigate#5320
Closed

Comments

@felipecrs
Copy link
Contributor

felipecrs commented Jan 23, 2023

And by consequence, no audio when casting the stream to media players either.

That's probably because the RTSP URL has multiple audio codecs but AAC is not the chosen one when pulled by HA.

This fixes the issue for me, but maybe it's not the cleanest solution (maybe this is better).

- f"rtsp://{URL(self._url).host}:8554/{self._cam_name}"
+ f"rtsp://{URL(self._url).host}:8554/{self._cam_name}?video=copy&audio=aac"

f"rtsp://{URL(self._url).host}:8554/{self._cam_name}"

@felipecrs
Copy link
Contributor Author

I believe that a consequence of hardcoding the codec in the URL is that the WebRTC card may not work with the camera entity, since audio will always be in AAC format.

Although it does not work today anyway because it uses the Frigate internal host name in the URL:

image

@NickM-27
Copy link
Collaborator

That's a good point, I don't think the above is a bad solution either, having in the config is probably preferred though

@NickM-27
Copy link
Collaborator

@felipecrs good point but just FYI you shouldn't be using the camera entity with the webrtc card (assuming you are using 3.0). You should just use the url field and provide the name of the camera as it is in the go2rtc config

go2rtc:
  streams:
    your_camera: rtsp://...
type: custom:webrtc-camera
url: your_camera

this will work with go2rtc directly to get the stream instead of just using the rtsp url

@felipecrs
Copy link
Contributor Author

@felipecrs good point but just FYI you shouldn't be using the camera entity with the webrtc card (assuming you are using 3.0). You should just use the url field and provide the name of the camera as it is in the go2rtc config

go2rtc:
  streams:
    your_camera: rtsp://...
type: custom:webrtc-camera
url: your_camera

this will work with go2rtc directly to get the stream instead of just using the rtsp url

Yeah, I know, thanks. That's what I do for my WebRTC cards. I'm just mentioning here a potential consequence of the "fix".

@felipecrs
Copy link
Contributor Author

I just tried here and it seems that it works even when the camera has no audio.

@felipecrs
Copy link
Contributor Author

Ops, actually I forgot to remove the "Closes" from the PR. However this should be fixed anyway as part of #419.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants