RTSP camera and audio

same question…any help?

I have the same issue with reolink cameras, sound and video works fine in VLC, only video works in HA.

1 Like

same. ill try to figure it out and give you guys answers

3 Likes

Reviving the topic, hoping someone has a solution :slight_smile:

Because service camera.record doesn’t work well I bought Xeoma app and enable recording from Home Assistant using TensorFlow. It’s quite expensive and additional modules prices are just ridiculous but main app is ok.

same here - no sound ,
camera define as:

  
  - platform: ffmpeg
    name: intercom_camera
    input: rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0
    extra_arguments: '-q:v 1 -r 25 -vf "scale=640:360"'

Not trying to be rude, I love HA. But I’m realizing lately that it is not an NVR and sucks when it comes to cameras, and besides previews in Lovelace, it’s probably worth just setting up motioneye or something similar

2 Likes

@shanem - agree

same here no audio

Same here. Would be nice to have audio and a better card interface. You can’t zoom in, it’s locked into position and it’s annoying.

hey, is there any alternative to get a camera live stream into the HA Lovelace UI wothout using the stream component? The lack of audio is really a pitty :frowning:

I will have a look at this https://github.com/Roverr/rtsp-stream/blob/e7614b8d8ce207368407a8feba4682a775aa50ce/docs/api/README.md.

looks interesting, and how will you integrate this into lovelace?

That is what I am looking at. There is another option I am looking at

https://github.com/tiensvanzyl/ezvizviewer

I use the following workaround found on this webpage. Works for Chrome only.

https://community.home-assistant.io/t/workaround-rtsp-with-sound/218086

Plays back audio on rtsp streams no problem.

Hi ppl!

Let me explain why audio in some cameras/dvr is not working.
HA supports a few audio codecs natively.
Most of the low/mid profile cams/dvr, uses low quality PCM audio as audio channel.
HA do not support (yet) this codec fully.
To make audio works in records, need to be transcoded. This can be done using custom FFMPEG commands (i can explain it, its no so difficult) but, using ffmpeg transcoding features impacts really bad in performance (and response times, generating a delay). More, even, in low profile hardware (like a raspberry pi)

So, the ideal solution is that HA can natively support this audio codecs. Even for 2-way audio, so, we can use cams as sound devices.

Hope this clarify a bit the scene.

greets

1 Like

Because this is an old thread, in many cases the issue was fixed in August 2020 with this PR: Add audio to stream by uvjustin · Pull Request #38846 · home-assistant/core · GitHub

The Unifi cameras never used to have audio, and now they do, for example.

Surely no two-way audio though…

Still hoping we get support for other codecs too so more cameras become compatible.

Hi guys, any updates with audio? Im using generic cameras added through UI with latest HA, but I cant hear audio when added cameras live stream to lovelaces

I have found test option for ones who uses docker
Run this container:
https://registry.hub.docker.com/r/aler9/rtsp-simple-server
Run this command to trans code rtsp camera stream:

ffmpeg -re -stream_loop -1   -rtsp_transport tcp -i rtsp://yourscameraorginalstream -c copy -acodec aac  -f rtsp rtsp://ipofyourmachine:8554/mystream

After add generaic camera with this address:

rtsp://ipofyourmachine:8554/mystream

I testing this with my Tapo C200 and there is picture and sound, but sound is delayed and with sound enabled stream looses frames (run the ffmpeg comand but with “-an” option to remove sound, and stream is smooth)

Have fun