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 working fine, but no video in HA due to "Uncaught error from Chrome" / "this.ondata is not a function" errors #677

Open
SR-G opened this issue Apr 2, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@SR-G
Copy link

SR-G commented Apr 2, 2024

Summary : i'm not able to view any stream from an EZVIZ inside HomeAssistant. However, the URL taken from WebRTC (through WebRTC UI) does work with ffplay. And i have numerous errors in ha log :

WebSocket.<anonymous> (/webrtc/video-rtc.js:338:22)
2024-04-02 23:34:41.868 ERROR (MainThread) [frontend.js.latest.202403070] Uncaught error from Chrome 123.0.0.0 on Linux x86_64
TypeError: this.ondata is not a function

Home Assistant is installed through docker (latest docker image = up to date + fresh install)
WebRTC has been installed manually from github release (= 3.5.1)

My card in HA UI is : (password removed) :

type: custom:webrtc-camera
url: rtsp://admin:XXXXXX@192.168.8.194:554/Streaming/Channels/101
muted: true

(note : it's the same with /102 (lower resolution) + this exact same rtsp URL works fine when directly used with ffplay)
(also the same with muted line being there or not)

If i go under the :1984 WebRTC page and under "links.html" for that stream, i see this (i suppose) proxified URL :

ffplay -fflags nobuffer -flags low_delay -rtsp_transport tcp "rtsp://<server running HA and webrtc>:8554/rtsp://admin:XXXXXX@192.168.8.194:554/Streaming/channels/102"

And ... this command is working fine !
So i believe that the WebRTC proxy is working.
But not the rendering inside CHROME.
Due to these "this.ondata is not a function" errors ...

Any ideas ?

Extra notes :

  • The camera is a EZVIZ CP1 PRO (with h265 codec + ONVIF since some recent firmware) (of course RTSP has been activated in settings)
  • This is also not working with FIREFOX
  • however in firefox it seems the stream is "MSE"
  • if i force a differernt mode (like webrtc) i have then another error : webrtc/offer: streams not matched: H265, AAC => VP8, RTX, VP9, H264, ULPFEC, RED, OPUS, G722, PCMU, PCMA, TELEPHONE-EVENT, S16B, S16L
@SR-G
Copy link
Author

SR-G commented Apr 2, 2024

Mhh, ok, have just tested on a different computer (this time running Windows 11 and not Archlinux), and on that one (with Vivaldi) :

  • webrtc mode gives the same error
  • but on that 2nd computer, the mse mode is working !

The non-working station (my main station) is running latest ARCHLINUX / CHROME (version = 123, supposedely with x265 decoding features) (Version 123.0.6312.86 (Official Build) (64-bit), of course with hardware acceleration activated in settings) + a NVIDIA T600 GPU

                  .o+`                   ----------- 
                 `ooo/                   OS: Arch Linux x86_64 
                `+oooo:                  Kernel: 6.6.10-arch1-1 
               `+oooooo:                 Uptime: 4 days, 1 hour, 18 mins 
               -+oooooo+:                Packages: 1651 (pacman), 5 (flatpak) 
             `/:-:++oooo+:               Shell: zsh 5.9 
            `/++++/+++++++:              Resolution: 1920x1080, 1920x1080, 1200x1920, 1920x1080 
           `/++++++++++++++:             DE: GNOME 46.0 
          `/+++ooooooooooooo/`           WM: Mutter 
         ./ooosssso++osssssso+`          WM Theme: Adwaita 
        .oossssso-````/ossssss+`         Theme: Adwaita [GTK2/3] 
       -osssssso.      :ssssssso.        Icons: Adwaita [GTK2/3] 
      :osssssss/        osssso+++.       Terminal: terminator 
     /ossssssss/        +ssssooo/-       CPU: 11th Gen Intel i7-11700K (16) @ 4.900GHz 
   `/ossssso+/:-        -:/+osssso+-     GPU: Intel RocketLake-S GT1 [UHD Graphics 750] 
  `+sso+:-`                 `.-/+oso:    GPU: NVIDIA T600 
 `++:.                           `-/+/   Memory: 18706MiB / 31832MiB 

@AlexxIT AlexxIT added the bug Something isn't working label Apr 7, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented Apr 7, 2024

I don't think I can make a test stand with Arch Linux and Chrome 123. I think some problem with HTML5 MSE for this environment.

@songochain

This comment was marked as off-topic.

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