AlexxIT / WebRTC

Home Assistant custom component for real-time viewing of almost any camera stream using WebRTC and other technologies.
https://github.com/AlexxIT/Blog
MIT License
1.36k stars 161 forks source link

Audio and video not working at the same with Eufy cam #610

Open skp19 opened 7 months ago

skp19 commented 7 months ago

I have a Eufy cam 2k and when I create a custom card, it can only play either audio or video. It does not play both at the same time. I can create separate cards to play the video and audio separately and that works but it's an ugly solution. I have Wyze cams setup that work correctly.

I have the WebRTC Camera integration installed through HACS and WebRTC Camera integration installed under Devices and services.

If I use the following to create the card, video plays with no audio. (This works with the Wyze cams)

type: custom:webrtc-camera url: rtsp://{url}

If I add 'media: audio', the audio will play with no video. If i add 'media:video,audio', only the video will play.

Am I missing something?

AlexxIT commented 4 months ago
  1. Check stream info in the go2rtc WebUI
  2. Check stream type in the top right corner of the card
kobelka commented 2 months ago

Hi Alexx, I have the same problem with this camera.

  1. { "producers": [ { "type": "RTSP active producer", "url": "rtsp://xx.xx.x.xx/live0", "remote_addr": "xx.xx.x.xx:554", "user_agent": "go2rtc/1.8.4", "sdp": "v=0\r\no=- 0 0 IN IP4 127.0.0.1\r\ns=H.264 Video,leco stream\r\nc=IN IP4 0.0.0.0\r\nt=0 0\r\na=tool:prv\r\na=control:*\r\nm=video 0 RTP/AVP 96\r\nb=AS:134\r\na=rtpmap:96 H264/90000\r\na=fmtp:96 packetization-mode=1;profile-level-id=276400;sprop-parameter-sets=J2QAKq0AzoB4AiflmoCAgPgAAAMACAAAAwDxgYABDzwADLbv/+BQ,KO48sA==\r\na=control:trackID=0\r\nm=audio 0 RTP/AVP 97\r\nb=AS:131\r\na=rtpmap:97 MPEG4-GENERIC/16000/1\r\na=fmtp:97 profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3; config=1408\r\na=control:trackID=1\r\n\r\n", "medias": [ "video, recvonly, H.264 High 4.2", "audio, recvonly, MPEG4-GENERIC/16000" ], "receivers": [ "96 H264, bytes=1630086, senders=1" ], "recv": 1657806 } ], "consumers": [ { "type": "WebRTC/WebSocket async passive consumer", "remote_addr": "udp4 prflx 10.50.50.15:51102 related :0", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36", "medias": [ "video, sendonly, VP8, RTX, VP9, H264, AV1, RED, ULPFEC, FLEXFEC-03", "audio, sendonly, OPUS/48000/2, RED/48000/2, G722/8000, PCMU/8000, PCMA/8000, CN/8000, TELEPHONE-EVENT/48000, TELEPHONE-EVENT/8000, L16, PCML" ], "senders": [ "102 H264, bytes=1630086, receivers=1" ], "send": 1532412 } ] }

  2. RTC

Regards Jörg

AlexxIT commented 2 months ago

@kobelka https://github.com/AlexxIT/go2rtc?tab=readme-ov-file#codecs-madness