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.28k stars 349 forks source link

C200 - go2rtc: "Play Audio" #1274

Closed ostracizado closed 1 month ago

ostracizado commented 1 month ago

WebRTC Camera: v3.5.2 Tapo Cameras Control: v5.5.4 Tapo C200: 1.3.9 Build 231019 - (I know there are some documented problems after 230921- but I had no problem with it) Frigate add-on: 0.13.2


Honestly, I've tried to setup this so I can send audio files to the Tapo C200, using this integration, many - many - times before. But unfortunately I was never able to do it...

Hopping someone can give me so ideas how to solve this. :sweat_smile:

go2rtc:

api:
  origin: '*'
ffmpeg:
  h264/rk: -c:v h264_rkmpp_encoder -g 50 -bf 0
  h265/rk: -c:v hevc_rkmpp_encoder -g 50 -bf 0
hass:
  config: /config
log:
  format: text
rtsp:
  default_query: mp4
streams:
  hall:
  - ffmpeg:rtsp://hallcamera:password@192.168.1.XXX:554/stream1
  outside_back:
  - ffmpeg:rtsp://outsideback:password@192.168.1.XXX:554/stream1
  outside_front:
  - ffmpeg:rtsp://outsidefront:password@192.168.1.XXX:554/stream1
  outside_gate:
  - ffmpeg:rtsp://outsidegate:password@192.168.1.XXX:554/stream1
webrtc:
  candidates:
  - 192.168.1.XXX:8555
  - stun:8555

configuration.yaml:

media_player:
  - platform: webrtc
    name: Tapo Camera - Hall Media
    stream: ffmpeg:rtsp://hallcamera:password@192.168.1.XXX:554/stream1
    audio: pcma

With this configuration the media player always has the state as: "Unknown". I did try to change the stream as a test, for instance to: "rtsp://hallcamera:password@192.168.1.XXX:554/stream1", or something of that sort, and the media player's state changes to: "Unavailable".

edit: I have no problem with streaming or listening audio from the camera. It's just the two-way/play audio that I can't seem to make it work.

AlexxIT commented 1 month ago
  1. This is wrong place for your problem. Your issue about WebRTC integration
  2. stream value wrong. You should use stream name from go2rtc config
  3. ffmpeg:rtsp can't be used for two way audio (including "play audio"). Only tapo protocol support it for Tapo cameras