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

Restore fix for Chinese buggy cameras #607

Closed
Calcu2006 opened this issue Sep 3, 2023 · 13 comments
Closed

Restore fix for Chinese buggy cameras #607

Calcu2006 opened this issue Sep 3, 2023 · 13 comments
Labels
bug Something isn't working
Milestone

Comments

@Calcu2006
Copy link

Calcu2006 commented Sep 3, 2023

HI,

I installed yesterday this version 1.7.0, and:

1.- it's sttopping 2 secons later i start it.

i saw this error:

panic: runtime error: index out of range [4] with length 0

goroutine 26 [running]:
github.com/AlexxIT/go2rtc/pkg/h264.NALUType(...)
	github.com/AlexxIT/go2rtc/pkg/h264/h264.go:23
github.com/AlexxIT/go2rtc/pkg/h264.IsKeyframe(...)
	github.com/AlexxIT/go2rtc/pkg/h264/h264.go:29
github.com/AlexxIT/go2rtc/pkg/mp4.(*Consumer).AddTrack.func1(0x40001c8000?)
	github.com/AlexxIT/go2rtc/pkg/mp4/consumer.go:68 +0x1e4
github.com/AlexxIT/go2rtc/pkg/h264.RTPDepay.func1(0x400020a480)
	github.com/AlexxIT/go2rtc/pkg/h264/rtp.go:94 +0x314
github.com/AlexxIT/go2rtc/pkg/core.(*Sender).HandleRTP.func1()
	github.com/AlexxIT/go2rtc/pkg/core/track.go:146 +0x90
created by github.com/AlexxIT/go2rtc/pkg/core.(*Sender).HandleRTP in goroutine 54
	github.com/AlexxIT/go2rtc/pkg/core/track.go:140 +0x424

2.- there is any possibility to downgrade the version?

Can i send any log? how it's the best way? what must i activate to?

Edit:

Attached log from 2 cameras:


12:58:37.800 DBG [webrtc] add consumer error="streams: codecs not matched: H265, AAC => VP8, RTX, VP9, H264, OPUS, G722, PCMU, PCMA, TELEPHONE-EVENT, S16B, S16L"
12:58:37.800 DBG [streams] start producer url=rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0
12:58:50.922 DBG [streams] stop producer url=rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0
12:58:56.726 DBG [webrtc] new consumer src=CamComedorgo
12:58:56.797 DBG [webrtc] add consumer error="streams: codecs not matched: H265, AAC => VP8, RTX, VP9, H264, OPUS, G722, PCMU, PCMA, TELEPHONE-EVENT, S16B, S16L"
12:58:56.798 DBG [streams] start producer url=rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0
12:59:03.752 DBG [streams] stop producer url=rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0
12:59:23.708 DBG [webrtc] new consumer src=Mirilla
12:59:23.800 DBG [streams] start producer url=rtsp://192.168.1.37:554/live/ch00_0
panic: runtime error: index out of range [4] with length 0

goroutine 139 [running]:
github.com/AlexxIT/go2rtc/pkg/h264.NALUType(...)
	github.com/AlexxIT/go2rtc/pkg/h264/h264.go:23
github.com/AlexxIT/go2rtc/pkg/h264.IsKeyframe(...)
	github.com/AlexxIT/go2rtc/pkg/h264/h264.go:29
github.com/AlexxIT/go2rtc/pkg/mp4.(*Consumer).AddTrack.func1(0x40003d2000?)
	github.com/AlexxIT/go2rtc/pkg/mp4/consumer.go:68 +0x1e4
github.com/AlexxIT/go2rtc/pkg/h264.RTPDepay.func1(0x4000422360)
	github.com/AlexxIT/go2rtc/pkg/h264/rtp.go:94 +0x314
github.com/AlexxIT/go2rtc/pkg/core.(*Sender).HandleRTP.func1()
	github.com/AlexxIT/go2rtc/pkg/core/track.go:146 +0x90
created by github.com/AlexxIT/go2rtc/pkg/core.(*Sender).HandleRTP in goroutine 131
	github.com/AlexxIT/go2rtc/pkg/core/track.go:140 +0x424


Thanks in advance

@czerwony03
Copy link

Hi, same issue on my side

@AlexxIT AlexxIT added the bug Something isn't working label Sep 4, 2023
@AlexxIT
Copy link
Owner

AlexxIT commented Sep 4, 2023

What's your camera model? Can you share stream with me as described in wiki?

@Calcu2006
Copy link
Author

Hi,

his one:

new consumer src=CamComedorgo
12:58:56.797 DBG [webrtc] add consumer error="streams: codecs not matched: H265, AAC => VP8, RTX, VP9, H264, OPUS, G722, PCMU, PCMA, TELEPHONE-EVENT, S16B, S16L"
12:58:56.798 DBG [streams] start producer url=rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0

Is a Imou Ranger 2, (IPC-A22E)

And this one:

12:59:23.708 DBG [webrtc] new consumer src=Mirilla
12:59:23.800 DBG [streams] start producer url=rtsp://192.168.1.37:554/live/ch00_0
panic: runtime error: index out of range [4] with length 0

It's a chinese door camera, like this:

https://es.aliexpress.com/item/4000429796084.html?spm=a2g0o.productlist.main.13.16564b36UlDwIZ&algo_pvid=c38c1956-496e-4b23-9251-908f6f68e243&algo_exp_id=c38c1956-496e-4b23-9251-908f6f68e243-6&pdp_npi=4%40dis%21EUR%2170.14%2149.1%21%21%2173.83%21%21%4021038ede16938072763121859e4cfb%2110000013757237002%21sea%21ES%21143910373%21&curPageLogUid=TNvdG5KUjn8o

I will try to share an stream later (time to go to work now xD)

@AlexxIT
Copy link
Owner

AlexxIT commented Sep 4, 2023

Yes. Cameras with wrong RTSP realisation /live/ch00_0. Maybe I have broke fix for them in latest version. I need to get stream to know what is wrong.

@Calcu2006
Copy link
Author

Hi, sorry, but i can not find in wiki how to give you Stream, can you tell me the url where I can find it ?

@AlexxIT
Copy link
Owner

AlexxIT commented Sep 4, 2023

https://github.com/AlexxIT/go2rtc/wiki/Tunnel-RTSP-camera-to-Intenet

You can find my contacts in the github profile

@AlexxIT AlexxIT changed the title Last version is not working in Home Assistant Restore fix for Chinese buggy cameras Sep 6, 2023
@AlexxIT
Copy link
Owner

AlexxIT commented Sep 6, 2023

Fix in latest master version

@Calcu2006
Copy link
Author

great! i was trying to do the ngrok thing, I will do it later just if still needed

@AlexxIT
Copy link
Owner

AlexxIT commented Sep 6, 2023

I have found another user with same problem

@Calcu2006
Copy link
Author

Calcu2006 commented Sep 6, 2023

Ok, installed last version of go2rtc.

add-on is closing and no auto camera detected on Streams, the log:

Created the camera manually.

That's what i have in go2rtc.yaml:

hass:

streams:
    MirillaGo:	
       - rtsp://192.168.1.37:554/live/ch00_0#backchannel=0#media=video
    CamComedorGo:
       - rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0#backchannel=0#media=video

log:
  level: info  # default level
  api: debug
  exec: debug
  rtsp: debug
  streams: debug
  webrtc: debug

Log when trying to see it:


21:47:11.807 INF go2rtc version 1.7.0 linux/arm64
21:47:11.815 INF [api] listen addr=0.0.0.0:1984
21:47:11.819 INF [rtsp] listen addr=0.0.0.0:8554
21:47:11.828 INF [webrtc] listen addr=0.0.0.0:8555/tcp
21:47:19.551 INF [streams] create new stream url=rtsp://admin:[email protected]/live/ch00_0
21:47:19.551 INF [streams] create new stream url=rtsp://admin:[email protected]/live/ch00_0
21:47:19.552 DBG [webrtc] new consumer src=rtsp://admin:[email protected]/live/ch00_0
21:47:19.725 DBG [streams] start producer url=rtsp://admin:[email protected]/live/ch00_0
panic: runtime error: index out of range [4] with length 0

goroutine 48 [running]:
github.com/AlexxIT/go2rtc/pkg/h264.NALUType(...)
	github.com/AlexxIT/go2rtc/pkg/h264/h264.go:23
github.com/AlexxIT/go2rtc/pkg/h264.IsKeyframe(...)
	github.com/AlexxIT/go2rtc/pkg/h264/h264.go:29
github.com/AlexxIT/go2rtc/pkg/mp4.(*Consumer).AddTrack.func1(0x4000190000?)
	github.com/AlexxIT/go2rtc/pkg/mp4/consumer.go:68 +0x1e4
github.com/AlexxIT/go2rtc/pkg/h264.RTPDepay.func1(0x400023ee10)
	github.com/AlexxIT/go2rtc/pkg/h264/rtp.go:94 +0x314
github.com/AlexxIT/go2rtc/pkg/core.(*Sender).HandleRTP.func1()
	github.com/AlexxIT/go2rtc/pkg/core/track.go:146 +0x90
created by github.com/AlexxIT/go2rtc/pkg/core.(*Sender).HandleRTP in goroutine 52
	github.com/AlexxIT/go2rtc/pkg/core/track.go:140 +0x424

The Imou is Fixed, it works.
The chinese door camera is not working and showing this error.

@Calcu2006
Copy link
Author

Ok, final status:

Cameras from Home assistant are appearing in the streams part of go2rtc.
Imou camera is fixed
The only thing missing is this chinese camera that hangs go2rtc when i try to see it, Home assistant restars the add-on, but maybe it will be good to implement some kind of error watching for output the error but not hanging the add-on ?

I sent the ngrok url via telegram to you, i think it's done fine i tried and i can see it open.

@Calcu2006
Copy link
Author

Solved with last fix and tested with master branch.

Closing the issue.

Thanks !

@AlexxIT AlexxIT added this to the v1.7.1 milestone Sep 10, 2023
@AlexxIT
Copy link
Owner

AlexxIT commented Sep 10, 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