AlexxIT / go2rtc

Ultimate camera streaming application with support RTSP, RTMP, HTTP-FLV, WebRTC, MSE, HLS, MP4, MJPEG, HomeKit, FFmpeg, etc.
https://github.com/AlexxIT/Blog
MIT License
4.93k stars 397 forks source link

Imou ipc d42p NotSupportedError, codec undefined #303

Closed 000al000 closed 1 year ago

000al000 commented 1 year ago

WebRTC from HomeAssistant Browser: Chrome Card config

type: custom:webrtc-camera
url: rtsp://1:1@10.100.10.213:554/cam/realmonitor?channel=1&subtype=1
mode: webrtc,mp4,mjpeg

ERROR. NotSupportedErrror: Failed to execute 'addSourceBuffer' on 'MediaSource': The type provided ('video/mp4; codecs="undefined") is unsupported.

Working from old (before 3) version of WebRTC, Frigate and etc

Debug log

2023-03-24 11:46:46.477 DEBUG (webrtc) [custom_components.webrtc.utils] 11:46:46.477 ERR github.com/AlexxIT/go2rtc/cmd/streams/producer.go:53 > error="wrong response on DESCRIBE" url=rtsp://1:1@10.100.10.213:554/cam/realmonitor?channel=1&subtype= 2023-03-24 11:46:48.230 DEBUG (MainThread) [custom_components.webrtc] New client: {'authSig': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJhODRiNjllZTYyMGQ0ZWNiODFjMDc0OWMzZjM3YzlhMyIsInBhdGgiOiIvYXBpL3dlYnJ0Yy93cyIsInBhcmFtcyI6W10sImlhdCI6MTY3OTY1MTIwOCwiZXhwIjoxNjc5NjUxMjM4fQ.djMsmObaAY--LnCN0LJCTroM7QZ8XfAnLEnU91kBNC4', 'url': 'rtsp://1:1@10.100.10.213:554/cam/realmonitor?channel=1&subtype=1'}

Codec info from vlc H264 - MPEG-4 AVC (part 10) (h264)

AlexxIT commented 1 year ago

You need to increase go2rtc log level for rtsp module to trace

000al000 commented 1 year ago

my config now

logger:
  default: warning
  logs:
    custom_components.webrtc: debug

as i understand error is 2023-03-24 11:46:46.477 DEBUG (webrtc) [custom_components.webrtc.utils] 11:46:46.477 ERR github.com/AlexxIT/go2rtc/cmd/streams/producer.go:53 > error="wrong response on DESCRIBE" url=rtsp://1:1@10.100.10.213:554/cam/realmonitor?channel=1&subtype=

000al000 commented 1 year ago

Should i add some additional info?

AlexxIT commented 1 year ago

https://github.com/AlexxIT/go2rtc#module-log

000al000 commented 1 year ago

Seems problem not in camera

2023-03-25 15:58:11.371 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.370 TRC [api] register path path=/api/hls/segment.ts
2023-03-25 15:58:11.371 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.370 TRC [api] register path path=/api/hls/init.mp4
2023-03-25 15:58:11.371 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.370 TRC [api] register path path=/api/hls/segment.m4s
2023-03-25 15:58:11.371 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.370 TRC [api] register path path=/api/frame.jpeg
2023-03-25 15:58:11.371 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.370 TRC [api] register path path=/api/stream.mjpeg
2023-03-25 15:58:11.371 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.370 TRC [api] register path path=/api/stack
2023-03-25 15:58:11.518 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.518 TRC [api] POST /api/exit 10.100.10.139:56151
2023-03-25 15:58:11.604 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.604 INF go2rtc version 1.2.0 linux/amd64
2023-03-25 15:58:11.604 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.604 TRC [api] register path path=/
2023-03-25 15:58:11.604 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.604 TRC [api] register path path=/api
2023-03-25 15:58:11.604 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.604 TRC [api] register path path=/api/config
2023-03-25 15:58:11.604 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.604 TRC [api] register path path=/api/exit
2023-03-25 15:58:11.605 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.604 TRC [api] register path path=/api/ws
2023-03-25 15:58:11.605 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.604 INF [api] listen addr=:1984
2023-03-25 15:58:11.605 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.605 TRC [api] register path path=/api/streams
2023-03-25 15:58:11.605 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.605 INF [rtsp] listen addr=:8554
2023-03-25 15:58:11.605 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.605 TRC [api] register path path=/api/stream.flv
2023-03-25 15:58:11.605 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.605 TRC [api] register path path=/api/devices
2023-03-25 15:58:11.605 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.605 TRC [api] register path path=/static
2023-03-25 15:58:11.605 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.605 TRC [api] register path path=/streams
2023-03-25 15:58:11.605 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.605 TRC [api] register path path=/stream/
2023-03-25 15:58:11.605 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.605 TRC [api] register path path=/stream
2023-03-25 15:58:11.606 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.606 TRC [api] register path path=/api/stream.ts
2023-03-25 15:58:11.606 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.606 INF [srtp] listen addr=:8443
2023-03-25 15:58:11.607 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.606 TRC [api] register path path=/api/homekit
2023-03-25 15:58:11.607 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.607 TRC [api] register path path=/api/webrtc
2023-03-25 15:58:11.607 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.607 TRC [api] register path path=/api/frame.mp4
2023-03-25 15:58:11.607 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.607 TRC [api] register path path=/api/stream.mp4
2023-03-25 15:58:11.607 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.607 TRC [api] register path path=/api/stream.m3u8
2023-03-25 15:58:11.607 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.607 TRC [api] register path path=/api/hls/playlist.m3u8
2023-03-25 15:58:11.607 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.607 TRC [api] register path path=/api/hls/segment.ts
2023-03-25 15:58:11.607 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.607 TRC [api] register path path=/api/hls/init.mp4
2023-03-25 15:58:11.607 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.607 TRC [api] register path path=/api/hls/segment.m4s
2023-03-25 15:58:11.607 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.607 TRC [api] register path path=/api/frame.jpeg
2023-03-25 15:58:11.607 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.607 TRC [api] register path path=/api/stream.mjpeg
2023-03-25 15:58:11.607 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:11.607 TRC [api] register path path=/api/stack
2023-03-25 15:58:14.588 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:14.588 TRC [api] GET /index.html 10.100.10.139:56150
2023-03-25 15:58:14.594 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:14.594 TRC [api] GET / 10.100.10.139:56150
2023-03-25 15:58:14.636 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:14.635 TRC [api] GET /main.js 10.100.10.139:56150
2023-03-25 15:58:14.647 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:14.647 TRC [api] GET /api 10.100.10.139:56150
2023-03-25 15:58:14.648 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:14.647 TRC [api] GET /api/streams 10.100.10.139:56157
2023-03-25 15:58:25.872 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:25.872 TRC [api] GET /editor.html 10.100.10.139:56163
2023-03-25 15:58:25.903 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:25.903 TRC [api] GET /main.js 10.100.10.139:56163
2023-03-25 15:58:25.965 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:25.964 TRC [api] GET /api/config 10.100.10.139:56163
2023-03-25 15:58:27.256 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:27.256 TRC [api] GET / 10.100.10.139:56165
2023-03-25 15:58:27.290 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:27.290 TRC [api] GET /main.js 10.100.10.139:56165
2023-03-25 15:58:27.299 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:27.298 TRC [api] GET /api 10.100.10.139:56165
2023-03-25 15:58:27.299 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:27.298 TRC [api] GET /api/streams 10.100.10.139:56166
2023-03-25 15:58:29.012 DEBUG (MainThread) [custom_components.webrtc] New client: {'authSig': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJhODRiNjllZTYyMGQ0ZWNiODFjMDc0OWMzZjM3YzlhMyIsInBhdGgiOiIvYXBpL3dlYnJ0Yy93cyIsInBhcmFtcyI6W10sImlhdCI6MTY3OTc1MjcwOCwiZXhwIjoxNjc5NzUyNzM4fQ.bnMAJIbZWEXNec8bpuQAKs1IBuSjD-5QCveKwY2Krh4', 'url': 'rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4'}
2023-03-25 15:58:29.021 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:29.019 TRC [api] GET /api/ws?src=rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4 127.0.0.1:35812
2023-03-25 15:58:40.428 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:40.428 TRC github.com/AlexxIT/go2rtc/cmd/api/ws.go:85 > error="websocket: close 1000 (normal)"
2023-03-25 15:58:40.914 DEBUG (MainThread) [custom_components.webrtc] New client: {'authSig': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJhODRiNjllZTYyMGQ0ZWNiODFjMDc0OWMzZjM3YzlhMyIsInBhdGgiOiIvYXBpL3dlYnJ0Yy93cyIsInBhcmFtcyI6W10sImlhdCI6MTY3OTc1MjcyMCwiZXhwIjoxNjc5NzUyNzUwfQ.mqSkDyUXlkE-s2fXmm18FDK9axalpo_xjpFhGWoocmI', 'url': 'rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4'}
2023-03-25 15:58:40.918 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:40.918 TRC [api] GET /api/ws?src=rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4 127.0.0.1:35814
2023-03-25 15:58:46.431 DEBUG (MainThread) [custom_components.webrtc] New client: {'authSig': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJhODRiNjllZTYyMGQ0ZWNiODFjMDc0OWMzZjM3YzlhMyIsInBhdGgiOiIvYXBpL3dlYnJ0Yy93cyIsInBhcmFtcyI6W10sImlhdCI6MTY3OTc1MjcyNiwiZXhwIjoxNjc5NzUyNzU2fQ.EhPF9q7Opfe8I7P3gSegaZwYn0tAg60BMLMmlWH8x6A', 'url': 'rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4'}
2023-03-25 15:58:46.434 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:46.434 TRC [api] GET /api/ws?src=rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4 127.0.0.1:35816
2023-03-25 15:58:48.107 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:48.106 TRC github.com/AlexxIT/go2rtc/cmd/api/ws.go:85 > error="websocket: close 1000 (normal)"
2023-03-25 15:58:48.117 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:48.117 TRC github.com/AlexxIT/go2rtc/cmd/api/ws.go:85 > error="websocket: close 1000 (normal)"
2023-03-25 15:58:50.142 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:50.142 TRC [api] GET / 10.100.10.139:56188
2023-03-25 15:58:50.187 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:50.187 TRC [api] GET /main.js 10.100.10.139:56188
2023-03-25 15:58:50.208 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:50.208 TRC [api] GET /api 10.100.10.139:56188
2023-03-25 15:58:50.209 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:50.209 TRC [api] GET /api/streams 10.100.10.139:56189
2023-03-25 15:58:54.796 DEBUG (webrtc) [custom_components.webrtc.utils] 15:58:54.795 TRC [api] GET /api/streams?src=rtsp%3A%2F%2Fwowzaec2demo.streamlock.net%2Fvod%2Fmp4%3ABigBuckBunny_115k.mp4 10.100.10.139:56189

netstat -plnt | grep go2rtc

tcp6 0 0 :::1984 ::: LISTEN 97063/go2rtc-1.2.0 tcp6 0 0 :::8554 ::: LISTEN 97063/go2rtc-1.2.0 tcp6 0 0 :::8555 :::* LISTEN 97063/go2rtc-1.2.0

000al000 commented 1 year ago

Should i check anyting else?

AlexxIT commented 1 year ago

"codec undefined" - looks like it is browser cache from integration v2.

000al000 commented 1 year ago

Full reboot of infrastructure solve my problem. Thank you.