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

go2rtc media player not working with Reolink camera #562

Open
ebroder opened this issue Aug 5, 2023 · 6 comments
Open

go2rtc media player not working with Reolink camera #562

ebroder opened this issue Aug 5, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@ebroder
Copy link

ebroder commented Aug 5, 2023

I have a Reolink Doorbell and am trying to setup a media player entity through go2rtc so that I can send messages from the TTS service.

Currently, if I open the "video+audio+microphone" stream, I'm able to trigger talkback to the camera. However, I haven't been able to get the media player entity to work.

I've uploaded my go2rtc.yaml, the stream info from when I'm successfully able to talkback using the browser, stream info from when TTS is unable to successfully talkback, the relevant snippet of my HA configuration.yaml, and the logs from the go2rtc service here: https://gist.github.com/ebroder/b6d6d7753e994d49b43c1d47689d6b06

I specifically noticed that, after the go2rtc client issues the PLAY request to the Reolink RTSP server, it gets back a 400 Bad Request, but I don't understand RTSP well enough to know why that's happening.

@AlexxIT AlexxIT added the bug Something isn't working label Aug 23, 2023
@ebroder
Copy link
Author

ebroder commented Aug 30, 2023

Thanks for putting that patch together, and sorry for not noticing it sooner (I expected to get notified, so I hadn't been watching the issue 🤷🏻‍♂️).

I grabbed the go2rtc master build. I'm no longer seeing the 400 errors on the PLAY request, but I still don't hear any audio from the doorbell. Here's the latest log and stream info: https://gist.github.com/ebroder/127d991af2de927eba8c2ca7f5c44ddb

@AlexxIT AlexxIT added this to the v1.7.0 milestone Sep 2, 2023
@AlexxIT
Copy link
Owner

AlexxIT commented Sep 2, 2023

Try to update firmware for your doorbell. Also check this issue #331

@AlexxIT AlexxIT removed this from the v1.7.0 milestone Sep 2, 2023
@ebroder
Copy link
Author

ebroder commented Sep 2, 2023

OK. Looks like I was wrong about it not working. It does work, but the audio clip I was sending was too short. The first second or so of audio seems to be clipped, and the doorbell only starts playing audio after that. The audio clip I was using was only about a second of TTS, so it just got completely clipped off.

Additionally, the audio cuts off before getting to the end of the message. So if, e.g., I have a 5 second audio clip, the doorbell only plays the middle 3 seconds or so.

In the logs, I see a TEARDOWN request from ffmpeg to the go2rtc rtsp server at the same time that the audio from the doorbell cuts off. The ffmpeg process exits more or less immediately after that.

@AlexxIT
Copy link
Owner

AlexxIT commented Sep 3, 2023

OK. This is another issue. Will check it with my camera

@kevdliu
Copy link

kevdliu commented Sep 11, 2023

@ebroder Could you post your logs from getting some audio to play from the doorbell? I have the same configuration as yours but I can't get any audio file to play. It always fails with

av_interleaved_write_frame(): Broken pipe
[out#0/rtsp @ 0xffff9a01ee70] Error muxing a packet

so I want to compare your logs with mine.

@ebroder
Copy link
Author

ebroder commented Sep 11, 2023

Yeah sure - you can see the logs here: https://gist.github.com/ebroder/3cc8e08dbadbd4645196c3ce88c8c10a

I'm just using the developer tools to call tts.speak with a long enough message that it doesn't get swallowed by the lost second at the beginning and the end.

felipecrs pushed a commit to felipecrs/go2rtc that referenced this issue Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants