kerberos-io / agent

An open and scalable video surveillance system for anyone making this world a better and more peaceful place.
https://kerberos.io
MIT License
642 stars 78 forks source link

Tapo Camera Audio Support #77

Closed harpyeagle closed 6 months ago

harpyeagle commented 1 year ago

Hi @cedricve

I am using the agent to record birds in a number of nestboxs. I am also signed up to the Hub as the analytics is a great addition to quickly see the activity during the day. The issue I have is no audio, the rtsp stream contains audio and I have verified this on VLC player but the agent / hub are not picking this up. Is there a setting I am missing to enable audio on the recording.

Thanks John

cedricve commented 1 year ago

hey there @harpyeagle which audio codec do you have selected for your Tapo Camera?

harpyeagle commented 1 year ago

Hi @cedricve

Based on VLC it is PCM ALAW

Screenshot 2023-02-13 at 20 08 10
cedricve commented 1 year ago

Is there an option to modify to PCM_MULAW?

cedricve commented 1 year ago

Apologies modify to AAC (this is required for MP4). We are still working on audio for livestream, but you can expect this enhancement soon. AAC audio is already supported for recordings.

cedricve commented 1 year ago

PCM_ALAW is now supported in live streaming (Kerberos Hub / WebRTC), still needs transcoding to AAC to work in MP4.

cedricve commented 6 months ago

Bi-directional audio is now added, but it lacks support (incoming) for Tapo cameras as they don't support the ONVIF backchannel method; this means you can hear audio as described next, but you'll not be able to transfer audio to the camera using a microphone. To transfer audio through the livestream on Kerberos Hub, the camera stream needs to support (and has enabled) PCM_ULAW. To record audio in a MP4 file (recording) the audio needs to be set to AAC.

At the moment we are working on transcoding from AAC -> PCM_ULAW and AAC -> PCM_ULAW to make sure we can support both scenarios.