Samfox2 / homebridge-videodoorbell

Video-Doorbell plugin based on homebridge-camera-ffmpeg for Homebridge.
Apache License 2.0
95 stars 17 forks source link

Two way audio ? #25

Open Partizan7676 opened 5 years ago

Partizan7676 commented 5 years ago

Is it possible? No one camera makers even "Works with homekit" logo dont have two way audio feature. Somfy is announce, but sales is not starting yet. Is it homekit problem or not? Seems that happened when apple removes doorbell category from list...

burnbrigther commented 4 years ago

@llemtt I now have ffmpeg tested audio working via audio out jack on my camera with this configuration: ffmpeg -y -i ../speaker.mp4 -af "highpass=f=300, lowpass=f=3400" -c:a pcm_mulaw -ar 12300 -f mulaw -chunked_post 0 -content_type audio/axis-mulaw-128 http://XXXX:XXXXX@192.168.1.231/axis-cgi/audio/transmit.cgi

The sound is a bit muddy, but it's as best as I could do with the audio frequency input - I messed about with it quite a bit. It's at least audibly understandable to the listener. The audio filters I don't care too much about. I played a pre-recorded mp4 audio file through ffmpeg.

I'm wondering something now, because I translated the above ffmpeg configuration to the audio section, prefaced with "2way" like this:

2way -c:a pcm_mulaw -ar 12300 -f mulaw -chunked_post 0 -content_type audio/axis-mulaw-128 http://XXXX:XXXXX@192.168.1.231/axis-cgi/audio/transmit.cgi

My source line, is this: -rtsp_transport tcp -i rtsp://XXXX:XXXXX@192.168.1.231:554/axis-media/media.amp?streamprofile=Media?tcp?videocodec=h264?resolution=1280x1024

All I am hearing is the audio IN from camera (has external microphone attached). I feel like I have everything now set up correctly, it's just a matter of getting the configuration plugged in to the right place. I think there must be a mistake in how I have the audio in and out arranged? I do not appear to be sending any audio from the ipad to the camera's audio out/speaker. All I can hear on the ipad is audio back from the camera's audio in (microphone). I tested by enabling both icons.

Here is the logging output Here is my raw config.json section for video doorbell

I am so close now I think!

SmartScrimper commented 3 years ago

@llemtt How can i achieve this? I already got a homebridge. Also i want to include a bit more (fingerprint door opener, ring button and motion sensor) so i got a second rpi which is connected with camera speaker and mic. How can i stream those to the homebridge to use the config on the homebridge? Do i need skills in web developement to achieving? Because i dont. Or may i can do sth. like video over ethernet and audio over ethernet so that i stream those and on my homebridge i see them as direct connected?