[HW Accel Support]: Tapo C120 audio recording on RPI CM4 #18435
-
Describe the problem you are havingUnable to record audio from Tapo C120 camera connected to Frigate on Raspberry Pi CM4 module. The same camera with the same config as shown bellow is working on Intel N100 cpu with audio recording correctly. Version0.15.0-6cb5cfb Frigate config filemqtt:
enabled: false
# Optional: Detectors configuration. Defaults to a single CPU detector
detectors:
coral:
type: edgetpu
device: usb
# if you want to decode a h264 stream
# ffmpeg:
# hwaccel_args: preset-vaapi
ffmpeg:
# raspberrypi to decode a h264 stream
hwaccel_args: preset-rpi-64-h264
# Optional: birdseye configuration
birdseye:
enabled: false
# to enable webrtc birdseye url
restream: false
width: 1280
height: 960
quality: 16
mode: continuous
# Optional: Detect configuration
detect:
width: 640
height: 480
fps: 5
enabled: true
min_initialized: 2
max_disappeared: 25
stationary:
interval: 50
threshold: 50
# Optional: Object configuration
objects:
track:
- person
- dog
- car
- motorcycle
- bus
# Optional: Motion configuration
motion:
threshold: 25
lightning_threshold: 0.8
contour_area: 10
frame_alpha: 0.01
frame_height: 100
#mask:
#- 397,48,640,52,640,0,393,0
# Optional: Record configuration
record:
enabled: true
expire_interval: 60
retain:
days: 5
mode: all
# events:
# pre_capture: 8
# post_capture: 5
# retain:
# default: 8
# mode: active_objects
# Optional: Configuration for the jpg snapshots written to the clips directory for each event
snapshots:
enabled: true
clean_copy: true
timestamp: true
bounding_box: true
crop: true
height: 200
retain:
default: 8
# Optional: Restream configuration
go2rtc:
streams:
cam2:
- rtsp://name:[email protected]:554/stream1
- ffmpeg:cam2#audio=aac
cam2_sub:
- rtsp://name:[email protected]:554/stream2
# - ffmpeg:cam2_sub#audio=aac
# Required
cameras:
cam2:
enabled: true
ffmpeg:
output_args:
# record: preset-record-generic-audio-copy
record: preset-record-generic-audio-aac
inputs:
- path: rtsp://127.0.0.1:8554/cam2_sub
input_args: preset-rtsp-restream
roles:
- detect
- path: rtsp://127.0.0.1:8554/cam2
input_args: preset-rtsp-restream
roles:
- record
detect:
width: 640
height: 360
fps: 5
live:
stream_name: cam2_sub
height: 360
quality: 20
review: {}
motion:
threshold: 25
contour_area: 7
improve_contrast: true
mask: 0,0,0.004,0.996,0.319,0.992,0.375,0
zones: {}
version: 0.15-1 docker-compose file or Docker CLI commandservices:
#frigate docker compose config
frigate:
container_name: frigate
# this may not be necessary for all setups
privileged: true
restart: unless-stopped
image: ghcr.io/blakeblackshear/frigate:stable
#image: ghcr.io/blakeblackshear/frigate:0.16.0-beta2-standard-arm64
# update for your cameras based on calculation
shm_size: "1024mb"
devices:
- /dev/bus/usb:/dev/bus/usb # passes the USB Coral, needs to be modified for other versions
# for intel hwaccel, needs to be updated for your hardware
#- /dev/dri/renderD128
- /dev/video11:/dev/video11
volumes:
- /etc/localtime:/etc/localtime:ro
- ./frigate/config:/config
#- ./frigate/media:/media/frigate
- /mnt/nvme/frigate/media:/media/frigate
# Optional: 1GB of memory, reduces SSD/SD Card wear
- type: tmpfs
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- "8971:8971"
- "5000:5000"
#- "1935:1935" # RTMP feeds
- "8554:8554" # Birdseye In v 0.12
- "1984:1984" # go2rtc port
#- "8555:8555/tcp" # WebRTC over tcp
#- "8555:8555/udp" # WebRTC over udp
environment:
FRIGATE_RTSP_PASSWORD: "password"
#network_mode: host Relevant Frigate log output2025-05-27 22:19:49.562516328 [INFO] Preparing Frigate...
2025-05-27 22:19:50.767087517 [INFO] Starting Frigate...
2025-05-27 22:20:04.786980051 [2025-05-27 22:20:04] frigate.util.config INFO : Checking if frigate config needs migration...
2025-05-27 22:20:04.883290748 [2025-05-27 22:20:04] frigate.util.config INFO : frigate config does not need migration...
2025-05-27 22:20:05.057399894 [2025-05-27 22:20:05] frigate.app INFO : Starting Frigate (0.15.0-6cb5cfb)
2025-05-27 22:20:05.102936563 [2025-05-27 22:20:05] peewee_migrate.logs INFO : Starting migrations
2025-05-27 22:20:05.107424303 [2025-05-27 22:20:05] peewee_migrate.logs INFO : There is nothing to migrate
2025-05-27 22:20:05.167201052 [2025-05-27 22:20:05] frigate.app INFO : Recording process started: 368
2025-05-27 22:20:05.168146503 [2025-05-27 22:20:05] frigate.app INFO : Review process started: 373
2025-05-27 22:20:05.191707874 [2025-05-27 22:20:05] frigate.app INFO : go2rtc process pid: 100
2025-05-27 22:20:05.247705985 [2025-05-27 22:20:05] detector.coral INFO : Starting detection process: 384
2025-05-27 22:20:05.282055350 [2025-05-27 22:20:05] frigate.app INFO : Output process started: 402
2025-05-27 22:20:05.382743159 [2025-05-27 22:20:05] frigate.app INFO : Camera processor started for cam2: 425
2025-05-27 22:20:05.437193883 [2025-05-27 22:20:05] frigate.app INFO : Capture process started for cam2: 431
2025-05-27 22:20:05.713595634 [2025-05-27 22:20:05] frigate.api.fastapi_app INFO : Starting FastAPI app
2025-05-27 22:20:06.666604947 [2025-05-27 22:20:06] frigate.api.fastapi_app INFO : FastAPI started
2025-05-27 22:20:08.561464360 [2025-05-27 22:20:05] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as usb
2025-05-27 22:20:08.599390236 [2025-05-27 22:20:08] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found
2025-05-27 22:26:05.599632187 [2025-05-27 22:26:05] watchdog.cam2 ERROR : No new recording segments were created for cam2 in the last 120s. restarting the ffmpeg record process...
2025-05-27 22:26:05.600206181 [2025-05-27 22:26:05] watchdog.cam2 INFO : Terminating the existing ffmpeg process...
2025-05-27 22:26:05.600948950 [2025-05-27 22:26:05] watchdog.cam2 INFO : Waiting for ffmpeg to exit gracefully... Relevant go2rtc log output2025-05-27 22:19:49.546104295 [INFO] Preparing new go2rtc config...
2025-05-27 22:19:52.770232838 [INFO] Starting go2rtc...
2025-05-27 22:19:53.051074453 22:19:53.047 INF go2rtc platform=linux/arm64 revision=b2399f3 version=1.9.2
2025-05-27 22:19:53.051090804 22:19:53.047 INF config path=/dev/shm/go2rtc.yaml
2025-05-27 22:19:53.051095582 22:19:53.050 INF [rtsp] listen addr=:8554
2025-05-27 22:19:53.051099952 22:19:53.050 INF [api] listen addr=:1984
2025-05-27 22:19:53.052116440 22:19:53.051 INF [webrtc] listen addr=:8555/tcp
2025-05-27 22:19:59.562551341 [INFO] Starting go2rtc healthcheck service... FFprobe output from your camera{
"producers": [
{
"type": "RTSP active producer",
"url": "rtsp://192.168.211.135:554/stream1/",
"remote_addr": "192.168.211.135:554",
"user_agent": "go2rtc/1.9.2",
"sdp": "v=0\r\no=- 14665860 31787219 1 IN IP4 192.168.211.135\r\ns=Session streamed by \"TP-LINK RTSP Server\"\r\nt=0 0\r\nm=video 0 RTP/AVP 96\r\nc=IN IP4 0.0.0.0\r\nb=AS:4096\r\na=range:npt=0-\r\na=control:track1\r\na=rtpmap:96 H264/90000\r\na=fmtp:96 packetization-mode=1; profile-level-id=640032; sprop-parameter-sets=Z2QAMqzSAKAC1oQAAA+kAAJxoBA=,aOqPLA==\r\nm=audio 0 RTP/AVP 8\r\na=rtpmap:8 PCMA/8000\r\na=control:track2\r\n",
"medias": [
"video, recvonly, H.264 High 5.0",
"audio, recvonly, PCMA/8000"
],
"receivers": [
"96 H264, bytes=159489599, senders=1"
],
"recv": 161450959
},
{
"url": "ffmpeg:cam2#audio=aac"
}
],
"consumers": [
{
"type": "RTSP passive consumer",
"url": "rtsp://127.0.0.1:8554/cam2",
"remote_addr": "127.0.0.1:35398",
"user_agent": "FFmpeg Frigate/0.15.0-6cb5cfb",
"sdp": "v=0\r\no=- 1 1 IN IP4 0.0.0.0\r\ns=go2rtc/1.9.2\r\nc=IN IP4 0.0.0.0\r\nt=0 0\r\nm=video 0 RTP/AVP 96\r\na=rtpmap:96 H264/90000\r\na=fmtp:96 packetization-mode=1; profile-level-id=640032; sprop-parameter-sets=Z2QAMqzSAKAC1oQAAA+kAAJxoBA=,aOqPLA==\r\na=control:trackID=0\r\n",
"medias": [
"video, sendonly, H264, H265",
"audio, sendonly, MPEG4-GENERIC"
],
"senders": [
"96 H264, bytes=159489599, receivers=1"
],
"send": 161970751
}
]
}
{
"producers": [
{
"type": "RTSP active producer",
"url": "rtsp://192.168.211.135:554/stream2/",
"remote_addr": "192.168.211.135:554",
"user_agent": "go2rtc/1.9.2",
"sdp": "v=0\r\no=- 14665860 31787219 1 IN IP4 192.168.211.135\r\ns=Session streamed by \"TP-LINK RTSP Server\"\r\nt=0 0\r\nm=video 0 RTP/AVP 96\r\nc=IN IP4 0.0.0.0\r\nb=AS:4096\r\na=range:npt=0-\r\na=control:track1\r\na=rtpmap:96 H264/90000\r\na=fmtp:96 packetization-mode=1; profile-level-id=640016; sprop-parameter-sets=Z2QAFqzSAoC/5YQAAA+kAAJxoBA=,aOqPLA==\r\nm=audio 0 RTP/AVP 8\r\na=rtpmap:8 PCMA/8000\r\na=control:track2\r\n",
"medias": [
"video, recvonly, H.264 High 2.2",
"audio, recvonly, PCMA/8000"
],
"receivers": [
"96 H264, bytes=16069325, senders=1",
"8 PCMA/8000, bytes=12775424, senders=0"
],
"recv": 29823077
}
],
"consumers": [
{
"type": "RTSP passive consumer",
"url": "rtsp://127.0.0.1:8554/cam2_sub",
"remote_addr": "127.0.0.1:56690",
"user_agent": "FFmpeg Frigate/0.15.0-6cb5cfb",
"sdp": "v=0\r\no=- 1 1 IN IP4 0.0.0.0\r\ns=go2rtc/1.9.2\r\nc=IN IP4 0.0.0.0\r\nt=0 0\r\nm=video 0 RTP/AVP 96\r\na=rtpmap:96 H264/90000\r\na=fmtp:96 packetization-mode=1; profile-level-id=640016; sprop-parameter-sets=Z2QAFqzSAoC/5YQAAA+kAAJxoBA=,aOqPLA==\r\na=control:trackID=0\r\n",
"medias": [
"video, sendonly, H264, H265",
"audio, sendonly, MPEG4-GENERIC"
],
"senders": [
"96 H264, bytes=16069325, receivers=1"
],
"send": 16813053
}
]
} Install methodDocker Compose Object DetectorCoral Network connectionWireless Camera make and modelTP-Link Tapo C120 Screenshots of the Frigate UI's System metrics pages![]() Any other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Answered by
hawkeye217
May 30, 2025
Replies: 1 comment 20 replies
-
It looks like everything works for about 6 minutes before errors appear in the Frigate logs. Perhaps the Pi just cannot keep up? |
Beta Was this translation helpful? Give feedback.
20 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'd also give ffmpeg 5 a try. Add
path: "5.0"
to your global ffmpeg config, eg: