Does the C220 work fluently? I have just bought a Tapo C220 and the image is not stable and frigate throws lot of errors from ffmpeg. I think I’m going to return this shit.
Do you have ONVIF configured in Frigate under that specific camera?
Here’s my tapo camera Frigate config for reference:
kitchen_tapo:
ffmpeg:
retry_interval: 60
inputs:
- path: rtsp://127.0.0.1:8554/kitchen_tapo?video=copy&audio=aac
input_args: preset-rtsp-restream
roles:
- record
- audio
- detect
audio:
enabled: true
listen:
- bark
- scream
- yell
- glass
- smash
- speech
- fire_alarm
- smoke_detector
filters:
speech:
threshold: 0.6
glass:
threshold: 0.5
fire_alarm:
threshold: 0.5
smoke_detector:
threshold: 0.5
snapshots:
enabled: false
timestamp: false
record:
enabled: true
retain:
# Optional: Number of days to retain recordings regardless of events (default: shown below)
# NOTE: This should be set to 0 and retention should be defined in events section below
# if you only want to retain recordings of events.
days: 1
# Optional: Mode for retention. Available options are: all, motion, and active_objects
# all - save all recording segments regardless of activity
# motion - save all recordings segments with any detected motion
# active_objects - save all recording segments with active/moving objects
# NOTE: this mode only applies when the days setting above is greater than 0
mode: all
detect:
enabled: false
fps: 1
onvif:
# Required: host of the camera being connected to.
host: 192.168.0.14
# Optional: ONVIF port for device (default: shown below).
port: 2020
# Optional: username for login.
# NOTE: Some devices require admin to access ONVIF.
user: username
# Optional: password for login.
password: mypassword1
# Optional: PTZ camera object autotracking. Keeps a moving object in
# the center of the frame by automatically moving the PTZ camera.
autotracking:
# Optional: enable/disable object autotracking. (default: shown below)
enabled: false
# Optional: list of objects to track from labelmap.txt (default: shown below)
track:
- person
# Required: Begin automatically tracking an object when it enters any of the listed zones.
#required_zones:
# - all
# Required: Name of ONVIF preset in camera's firmware to return to when tracking is over. (default: shown below)
return_preset: '3'
# Optional: Seconds to delay before returning to preset. (default: shown below)
On the other hand, I have the camera set to 20fps. Sometimes the video runs smoothly, but other times the image becomes choppy or freezes and then suddenly speeds up to catch up to real-time.
This happens both in Frigate and in the Tapo app. The camera is located next to the router, and the RSSI is good (-24dB).
Additionally, Frigate keeps logging errors related to this camera, like the following:
[segment @ 0x62c0ebffcd40] Non-monotonous DTS in output stream 0:0; previous: 3446867, current: 304128; changing to 3446868. This may result in incorrect timestamps in the output file.
Here are my full Tapo related settings, have a look at my config and try to copy it to see if your camera works better.
I’ve put my rtsp feed through ffmpeg in go2rtc and specified video copy, audio copy and audio aac for full compatibility with Frigate and Home Assistant. I use ‘input_args: preset-rtsp-restream’ and ‘output_args: preset-record-generic-audio-copy’.
go2rtc:
streams:
kitchen_tapo:
- ffmpeg:rtsp://username:[email protected]/stream1#video=copy#audio=copy#audio=aac
- tapo://[email protected]
webrtc:
candidates:
- stun:8555
api:
origin: '*'
cameras:
kitchen_tapo:
ffmpeg:
retry_interval: 60
inputs:
- path: rtsp://127.0.0.1:8554/kitchen_tapo?video=copy&audio=aac
input_args: preset-rtsp-restream
roles:
- record
- audio
- detect
#Audio detection settings:
audio:
enabled: true
listen:
- bark
- scream
- yell
- glass
- smash
- speech
- fire_alarm
- smoke_detector
filters:
speech:
threshold: 0.6
glass:
threshold: 0.5
fire_alarm:
threshold: 0.5
smoke_detector:
threshold: 0.5
snapshots:
enabled: false
timestamp: false
record:
enabled: true
retain:
# Optional: Number of days to retain recordings regardless of events (default: shown below)
# NOTE: This should be set to 0 and retention should be defined in events section below
# if you only want to retain recordings of events.
days: 1
# Optional: Mode for retention. Available options are: all, motion, and active_objects
# all - save all recording segments regardless of activity
# motion - save all recordings segments with any detected motion
# active_objects - save all recording segments with active/moving objects
# NOTE: this mode only applies when the days setting above is greater than 0
mode: all
detect:
enabled: false
fps: 1
onvif:
# Required: host of the camera being connected to.
host: 192.168.0.14
# Optional: ONVIF port for device (default: shown below).
port: 2020
# Optional: username for login.
# NOTE: Some devices require admin to access ONVIF.
user: username
# Optional: password for login.
password: password
# Optional: PTZ camera object autotracking. Keeps a moving object in
# the center of the frame by automatically moving the PTZ camera.
autotracking:
# Optional: enable/disable object autotracking. (default: shown below)
enabled: false
# Optional: list of objects to track from labelmap.txt (default: shown below)
track:
- person
# Required: Begin automatically tracking an object when it enters any of the listed zones.
#required_zones:
# - all
# Required: Name of ONVIF preset in camera's firmware to return to when tracking is over. (default: shown below)
return_preset: '3'
# Optional: Seconds to delay before returning to preset. (default: shown below)
ffmpeg:
hwaccel_args: preset-vaapi #or, depending on your CPU use preset-intel-qsv-h264 / preset-intel-qsv-h265
output_args:
record: preset-record-generic-audio-copy