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

Error opening stream (INVALIDDATA) from HomeKit source (Aqara G2H) #1079

Open
x-iLex-x opened this issue May 2, 2024 · 18 comments
Open

Error opening stream (INVALIDDATA) from HomeKit source (Aqara G2H) #1079

x-iLex-x opened this issue May 2, 2024 · 18 comments
Labels
bug Something isn't working

Comments

@x-iLex-x
Copy link

x-iLex-x commented May 2, 2024

I have an Aqara G2H camera added to my HA via HomeKit Controller. When I try to receive rtsp stream from go2rtc, I add "?video&audio=aac" to rtsp link and get an error, stream goes to be in “unavailable” state. Without adding this to link I can get stream, but, as expected, it doesn’t run how it should.

Same time I have an Aqara G3 cam, running on another server. The same rtsp link format with same go2rtc config works fine with it.

I see that “stream” integration causes an error, but can’t guess the reason. Am I doing smth wrong? How do I get working rtsp stream for G2H cam?

Регистратор: homeassistant.components.stream.stream.camera.camera
Источник: components/stream/__init__.py:448
интеграция: Stream ([документация](https://www.home-assistant.io/integrations/stream), [проблемы](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+stream%22))
Первое сообщение: 18:36:53 (1 сообщений)
Последнее сообщение: 18:36:53

Error from stream worker: Error opening stream (INVALIDDATA, Invalid data found when processing input) rtsp://****:****@192.168.0.116:8554/camera.aqara?video=&audio=aac
@AlexxIT AlexxIT added the invalid This doesn't seem right label May 2, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented May 2, 2024

All communication should be in English in this repo

@AlexxIT AlexxIT closed this as not planned Won't fix, can't repro, duplicate, stale May 2, 2024
@x-iLex-x
Copy link
Author

x-iLex-x commented May 2, 2024

All communication should be in English in this repo

My bad, updated in English.

@x-iLex-x x-iLex-x changed the title Ошибка при стриминге Error opening stream (INVALIDDATA) из источника HomeKit Error opening stream (INVALIDDATA) from HomeKit source May 2, 2024
@x-iLex-x x-iLex-x changed the title Error opening stream (INVALIDDATA) from HomeKit source Error opening stream (INVALIDDATA) from HomeKit source (Aqara G2H) May 2, 2024
@AlexxIT AlexxIT added question Further information is requested and removed invalid This doesn't seem right labels May 3, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented May 3, 2024

Show your go2rtc config

@AlexxIT AlexxIT reopened this May 3, 2024
@x-iLex-x
Copy link
Author

x-iLex-x commented May 3, 2024

Show your go2rtc config

IMG_9309

@AlexxIT
Copy link
Owner

AlexxIT commented May 3, 2024

Are you sure this stream works fine inside go2rtc WebUI? Can you hear audio?

@x-iLex-x
Copy link
Author

x-iLex-x commented May 3, 2024

Are you sure this stream works fine inside go2rtc WebUI? Can you hear audio?

Yes, video and audio works without any issues inside go2rtc WebUI.

@x-iLex-x
Copy link
Author

x-iLex-x commented May 3, 2024

Are you sure this stream works fine inside go2rtc WebUI? Can you hear audio?

Sometimes I can add rtsp stream into HA an it stays in idle state, like it’s normal, before first opening. When I try to open and watch stream - it goes to “unavailable” and starts changing its state between unavailable and idle every several minutes, causing errors on log.

@AlexxIT
Copy link
Owner

AlexxIT commented May 3, 2024

Why you want this camera as entity?
You don't needs it for watching stream.

@x-iLex-x
Copy link
Author

x-iLex-x commented May 3, 2024

Why you want this camera as entity? You don't needs it for watching stream.

First case is to transfer camera entity to yandex smart home. Second case is to use camera.record and camera.snapshot services for telegram notifications.

@AlexxIT
Copy link
Owner

AlexxIT commented May 3, 2024

Ok. This make sense. I needs to test this case myself.

@x-iLex-x
Copy link
Author

x-iLex-x commented May 3, 2024

Ok. This make sense. I needs to test this case myself.

Waiting for news, thx. I’ll try to test on my another server.

@AlexxIT AlexxIT self-assigned this May 3, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented May 4, 2024

Well. I have same issue on my Raspberry 3. And don't have issue on Intel Nuc. I think this is related to ffmpeg arm library.
What you using as a server?

@x-iLex-x
Copy link
Author

x-iLex-x commented May 4, 2024

Well. I have same issue on my Raspberry 3. And don't have issue on Intel Nuc. I think this is related to ffmpeg arm library. What you using as a server?

Thanks for news. I’m using JetHub H1 (based on amlogic) as server with Aqara G2H cam. As you did, I’ve done tests and had no issues on my another servers based on intel.

So, is there any way or chance to get it working on my JetHub?

@AlexxIT
Copy link
Owner

AlexxIT commented May 4, 2024

JetHub also ARM based. You can try to use ffmpeg camera instead of generic. But important to select copy codec to avoid transcoding.

@x-iLex-x
Copy link
Author

x-iLex-x commented May 4, 2024

JetHub also ARM based. You can try to use ffmpeg camera instead of generic. But important to select copy codec to avoid transcoding.

Could you pls show how do link for ffmpeg should looks like? 🙏🏼 I’m stuck with “copy codec” 😅

@AlexxIT
Copy link
Owner

AlexxIT commented May 4, 2024

Don't know. Never used ffmpeg camera

@x-iLex-x
Copy link
Author

x-iLex-x commented May 4, 2024

Don't know. Never used ffmpeg camera

Seems like I've guessed how to, but, unfortunately I have same error as mentioned in issue.

@AlexxIT
Copy link
Owner

AlexxIT commented May 5, 2024

It's hard for me to fix the bug because I have to reproduce the arm dev environment

@AlexxIT AlexxIT added bug Something isn't working and removed question Further information is requested labels May 5, 2024
@AlexxIT AlexxIT removed their assignment May 5, 2024
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

2 participants