Sunoo / homebridge-camera-ffmpeg

Homebridge Plugin Providing FFmpeg-based Camera Support
https://sunoo.github.io/homebridge-camera-ffmpeg/
Apache License 2.0
1.09k stars 227 forks source link

Tapo C520WS audio not working #1444

Closed TillyMasters1 closed 4 months ago

TillyMasters1 commented 5 months ago

Describe The Problem: Ok, so if i have audio disabled it works fine and everything but i dont get any audio if i have it enabled then the stream will not start

Logs:

[Camera FFmpeg] [Driveway] Video stream requested: 1280 x 720, 30 fps, 299 kbps
[Camera FFmpeg] [Driveway] Starting video stream: 1280 x 720, 30 fps, 299 kbps (AAC-eld)
[Camera FFmpeg] [Driveway] Stream command: ffmpeg -rtsp_transport tcp -re -i rtsp://syno:password@ip:554/Sms=2.unicast -an -sn -dn -codec:v libx264 -pix_fmt yuv420p -color_range mpeg -r 30 -f rawvideo -preset ultrafast -tune zerolatency -filter:v scale='min(1280,iw)':'min(720,ih)':force_original_aspect_ratio=decrease,scale=trunc(iw/2)*2:trunc(ih/2)*2 -b:v 299k -payload_type 99 -ssrc 7384993 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params 9fI/Kb9CRCvGA1zZqt/KIahC56fmc10rZcRomWIE srtp://192.168.1.62:55681?rtcpport=55681&pkt_size=100 -vn -sn -dn -codec:a libfdk_aac -profile:a aac_eld -flags +global_header -f null -ar 16k -b:a 24k -ac 1 -payload_type 110 -ssrc 9530555 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params AgRUx8f3LwXVhv0wpdTR9K7/aY2UHIVaP3OPbBuC srtp://192.168.1.62:64449?rtcpport=64449&pkt_size=188 -loglevel level+verbose -progress pipe:1
[Camera FFmpeg] [Driveway] [info] ffmpeg version 4.4.1-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2021 the FFmpeg developers
[Camera FFmpeg] [Driveway] [info]   built with gcc 8 (Debian 8.3.0-6)
[Camera FFmpeg] [Driveway] [info]   configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
[Camera FFmpeg] [Driveway] [info]   libavutil      56. 70.100 / 56. 70.100
[Camera FFmpeg] [Driveway] [info]   libavcodec     58.134.100 / 58.134.100
[Camera FFmpeg] [Driveway] [info]   libavformat    58. 76.100 / 58. 76.100
[Camera FFmpeg] [Driveway] [info]   libavdevice    58. 13.100 / 58. 13.100
[Camera FFmpeg] [Driveway] [info]   libavfilter     7.110.100 /  7.110.100
[Camera FFmpeg] [Driveway] [info]   libswscale      5.  9.100 /  5.  9.100
[Camera FFmpeg] [Driveway] [info]   libswresample   3.  9.100 /  3.  9.100
[Camera FFmpeg] [Driveway] [info]   libpostproc    55.  9.100 / 55.  9.100
[Camera FFmpeg] [Driveway] [tcp @ 0x73b0ec0] [verbose] Starting connection attempt to ip port 554
[Camera FFmpeg] [Driveway] [tcp @ 0x73b0ec0] [verbose] Successfully connected to ip port 554
[Camera FFmpeg] [Driveway] [rtsp @ 0x73ade00] [verbose] SDP:
[Camera FFmpeg] [Driveway] v=0
[Camera FFmpeg] [Driveway] o=- 1712375888464302 1 IN IP4 ip
[Camera FFmpeg] [Driveway] s=Session streamed by "ssrtspd"
[Camera FFmpeg] [Driveway] i=1,2_high.unicast
[Camera FFmpeg] [Driveway] t=0 0
[Camera FFmpeg] [Driveway] a=tool:LIVE555 Streaming Media v2020.08.12
[Camera FFmpeg] [Driveway] a=type:broadcast
[Camera FFmpeg] [Driveway] a=control:*
[Camera FFmpeg] [Driveway] a=range:npt=0-
[Camera FFmpeg] [Driveway] a=x-qt-text-nam:Session streamed by "ssrtspd"
[Camera FFmpeg] [Driveway] a=x-qt-text-inf:1,2_high.unicast
[Camera FFmpeg] [Driveway] m=video 0 RTP/AVP 96
[Camera FFmpeg] [Driveway] c=IN IP4 0.0.0.0
[Camera FFmpeg] [Driveway] b=AS:500
[Camera FFmpeg] [Driveway] a=rtpmap:96 H264/90000
[Camera FFmpeg] [Driveway] a=fmtp:96 packetization-mode=1;profile-level-id=4D0032;sprop-parameter-sets=Z00AMoqKUDwBE/LNkAAAPoAAB1MAQA==,aO48gA==
[Camera FFmpeg] [Driveway] a=control:track1
[Camera FFmpeg] [Driveway] m=audio 0 RTP/AVP 8
[Camera FFmpeg] [Driveway] c=IN IP4 0.0.0.0
[Camera FFmpeg] [Driveway] b=AS:64
[Camera FFmpeg] [Driveway] a=control:track2
[Camera FFmpeg] [Driveway] 
[Camera FFmpeg] [Driveway] [rtsp @ 0x73ade00] [verbose] setting jitter buffer size to 0
[Camera FFmpeg] [Driveway] [rtsp @ 0x73ade00] [verbose] setting jitter buffer size to 0
[Camera FFmpeg] [Driveway] [h264 @ 0x73b3500] [verbose] Reinit context to 1920x1088, pix_fmt: yuvj420p
[Camera FFmpeg] [Driveway] [warning] Guessed Channel Layout for Input Stream #0.1 : mono
[Camera FFmpeg] [Driveway] [info] Input #0, rtsp, from 'rtsp://syno:password@ip:554/Sms=2.unicast':
[Camera FFmpeg] [Driveway] [info]   Metadata:
[Camera FFmpeg] [Driveway] [info]     title           : Session streamed by "ssrtspd"
[Camera FFmpeg] [Driveway] [info]     comment         : 1,2_high.unicast
[Camera FFmpeg] [Driveway] [info]   Duration: N/A, start: 0.000000, bitrate: N/A
[Camera FFmpeg] [Driveway] [info]   Stream #0:0: Video: h264 (Main), 1 reference frame, yuvj420p(pc, progressive, left), 1920x1080 (1920x1088), 15 fps, 25 tbr, 90k tbn, 30 tbc
[Camera FFmpeg] [Driveway] [info]   Stream #0:1: Audio: pcm_alaw, 8000 Hz, mono, s16, 64 kb/s
[Camera FFmpeg] [Driveway] [fatal] Unknown encoder 'libfdk_aac'
[Camera FFmpeg] [Driveway] [AVIOContext @ 0x73d6ec0] [verbose] Statistics: 0 seeks, 0 writeouts
[Camera FFmpeg] [Driveway] FFmpeg exited with code: 1 and signal: null (Error)
[Camera FFmpeg] [Driveway] Stopped video stream.

Homebridge Config:

{
    "name": "Camera FFmpeg",
    "videoProcessor": "ffmpeg",
    "cameras": [
        {
            "name": "Driveway",
            "manufacturer": "TP-Link",
            "model": "C520WS",
            "serialNumber": "22396W8004786",
            "motion": false,
            "unbridge": true,
            "videoConfig": {
                "source": "-rtsp_transport tcp -re -i rtsp://syno:password@ip:554/Sms=2.unicast",
                "maxStreams": 2,
                "maxWidth": 1920,
                "maxHeight": 1080,
                "maxFPS": 30,
                "maxBitrate": 3000,
                "packetSize": 100,
                "audio": true,
                "debug": true
            }
        }
    ],
    "platform": "Camera-ffmpeg"
}

Environment:

Also the camera is connected to synology surveillance station then i use the rtsp share stream path in the plugin

TillyMasters1 commented 5 months ago

I have done the ffmpeg command in the terminal of homebridge and the "--enable-libfdk-aac" thing doesn't seem to be in the config? could that be the reason and how do I change this?

github-actions[bot] commented 4 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.