gozoinks / homebridge-camera-ffmpeg-ufv

UniFi Video plugin for Homebridge
https://www.npmjs.com/package/homebridge-camera-ffmpeg-ufv
Other
75 stars 20 forks source link

No Sound in Home app #33

Open veearesix opened 5 years ago

veearesix commented 5 years ago

Hello,

I have been fighting issues with live streaming but finally have the video connecting. My issue now is that there is no sound played back when the stream is live. When viewing the stream in unifi video, there is sound, so this is not a disabled microphone issue.

There are no errors displayed in the log, one example from the log is:

-rtsp_transport http -re -i rtsp://192.168.1.161:7447/5a5101dae4b074af1014d7e3_0?apiKey=***** -threads 0 -vcodec libx264 -an -pix_fmt yuv420p -r 15 -f rawvideo -tune zerolatency -vf scale=1280:720 -b:v 299k -bufsize 299k -payload_type 99 -ssrc 3160828 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params FkZ8vzJ8Gaar0WPt9hgZnyBmLvmWjkXOayrDGBzL srtp://192.168.1.181:54249?rtcpport=54249&localrtcpport=54249&pkt_size=1378

I am running homebridge inside of docker on my synology DS918+ and have installed ffmpeg in both NPM and apt.

Any ideas how I can get sound? This has been incredibly useful to get the snapshot previews and quick loading of live video, the sound would truly be the icing on the cake.

shnhrrsn commented 5 years ago

I was playing with this a bit yesterday, the -an flag is turning off audio. If you remove it, ffmpeg will error saying the the srtp muxer doesn’t support multiple streams. It appears that srtp doesn’t support this yet, I found this draft from earlier in 2018: https://tools.ietf.org/id/draft-ietf-avtcore-multiplex-guidelines-04.html

We need to setup two different streams and send them to iOS, but I don’t know enough about Homebridge yet to do it myself, I’ll be digging into later in the week though!

shnhrrsn commented 5 years ago

I've opened a PR for this here - https://github.com/gozoinks/homebridge-camera-ffmpeg-ufv/pull/35

jnanes commented 5 years ago

Is audio available yet? If so, what do I need to edit in my config to enable?

I read I need to compile ffmpeg differently, I’m a bit of a noob, can anyone help?

coalfield commented 4 years ago

Same here real shame there is no audio, but running on docker via synology and need some guidance on what would need to be done with ffmpeg compile