question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Camera Support]: Tapo C200 RTSP used to work but not anymore

See original GitHub issue

Describe the problem you are having

I had a Tapo C200 camera connected to Frigate and it worked great until last month when I updated to 0.11.1. Now Frigate keeps throwing an error "ffmpeg.garage.detect ERROR : rtsp://<user>:<pass>@c200cam1:554/stream2: Invalid data found when processing input

I tried reverting to 0.10.1, 0.9.4, and 0.8.4 and it never worked again.

Version

0.10.1

Frigate config file

mqtt:
  host: mqtt.behbeh.home
  user: frigate
  password: <pass>
cameras:
  garage:
    ffmpeg:
      inputs:
        - path: rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@c200cam1:554/stream2
          roles:
            - detect
        - path: rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@c200cam1:554/stream1
          roles:
#            - record
            - rtmp
    detect:
      width: 640
      height: 360
      fps: 5
    rtmp:
      enabled: True

Relevant log output

[2022-11-13 22:04:21] frigate.app                    INFO    : Starting Frigate (0.10.1-83481af)
Starting migrations
[2022-11-13 22:04:21] peewee_migrate                 INFO    : Starting migrations
There is nothing to migrate
[2022-11-13 22:04:21] peewee_migrate                 INFO    : There is nothing to migrate
[2022-11-13 22:04:21] frigate.app                    INFO    : Output process started: 218
[2022-11-13 22:04:21] detector.cpu                   INFO    : Starting detection process: 217
[2022-11-13 22:04:21] frigate.edgetpu                WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.
[2022-11-13 22:04:21] ws4py                          INFO    : Using epoll
[2022-11-13 22:04:21] frigate.app                    INFO    : Camera processor started for garage: 223
[2022-11-13 22:04:21] frigate.app                    INFO    : Capture process started for garage: 226
[2022-11-13 22:04:21] ws4py                          INFO    : Using epoll
[2022-11-13 22:04:26] frigate.video                  ERROR   : garage: Unable to read frames from ffmpeg process.
[2022-11-13 22:04:26] frigate.video                  ERROR   : garage: ffmpeg process is not running. exiting capture thread...
[2022-11-13 22:04:41] watchdog.garage                ERROR   : Ffmpeg process crashed unexpectedly for garage.
[2022-11-13 22:04:41] watchdog.garage                ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2022-11-13 22:04:41] ffmpeg.garage.detect           ERROR   : rtsp://<user>:<pass>@c200cam1:554/stream2: Invalid data found when processing input
[2022-11-13 22:04:41] ffmpeg.garage.rtmp             ERROR   : rtsp://<user>:<pass>@c200cam1:554/stream1: Invalid data found when processing input
[2022-11-13 22:04:41] watchdog.garage                INFO    : Terminating the existing ffmpeg process...
[2022-11-13 22:04:41] watchdog.garage                INFO    : Waiting for ffmpeg to exit gracefully...
[2022-11-13 22:04:46] frigate.video                  ERROR   : garage: Unable to read frames from ffmpeg process.
[2022-11-13 22:04:46] frigate.video                  ERROR   : garage: ffmpeg process is not running. exiting capture thread...
[2022-11-13 22:04:51] watchdog.garage                ERROR   : Ffmpeg process crashed unexpectedly for garage.
[2022-11-13 22:04:51] watchdog.garage                ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2022-11-13 22:04:51] ffmpeg.garage.detect           ERROR   : rtsp://<user>:<pass>@c200cam1:554/stream2: Invalid data found when processing input
[2022-11-13 22:04:51] ffmpeg.garage.rtmp             ERROR   : rtsp://<user>:<pass>@c200cam1:554/stream1: Invalid data found when processing input
[2022-11-13 22:04:51] watchdog.garage                INFO    : Terminating the existing ffmpeg process...
[2022-11-13 22:04:51] watchdog.garage                INFO    : Waiting for ffmpeg to exit gracefully...

FFprobe output from your camera

root@c2a74e2777ae:/opt/frigate# ffprobe rtsp://<user>:<pass>@c200cam1:554/stream1
ffprobe version 4.3.1 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libfreetype --enable-libvidstab --enable-libmfx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-vaapi --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
[rtsp @ 0x562d0e96db80] max delay reached. need to consume packet
[rtsp @ 0x562d0e96db80] RTP: missed 1 packets
Input #0, rtsp, from 'rtsp://<user>:<pass>@c200cam1:554/stream1':
  Metadata:
    title           : Session streamed by "TP-LINK RTSP Server"
    comment         : stream1
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: h264, yuvj420p(pc, bt709, progressive), 1920x1080, 15 fps, 14.92 tbr, 90k tbn, 30 tbc
    Stream #0:1: Audio: pcm_alaw, 8000 Hz, 1 channels, s16, 64 kb/s
root@c2a74e2777ae:/opt/frigate#

Frigate stats

No response

Operating system

Debian

Install method

Docker Compose

Coral version

CPU (no coral)

Network connection

Wired

Camera make and model

TP-Link Tapo C200

Any other information that may be helpful

I’ve tried saving the video directly with ffmpeg -i rtsp://<user>:<pass>@c200cam1:554/stream1 -an -vcodec copy /config/abc.mp4 and that worked. I also added the camera directly in Home Assistant and that also worked.

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:14

github_iconTop GitHub Comments

1reaction
viperk1commented, Nov 14, 2022

No, it’s on an older laptop but definitely 64bit: Intel® Core™ i5-6300U CPU @ 2.40GHz

0reactions
NickM-27commented, Nov 14, 2022

Thanks for the help! Resource usage is <10% on the system so I’m quite happy to leave it this way, haha.

Doesn’t appear that you’re using hardware acceleration so it could probably be even lower.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tapo C200 RTSP unauthorized - Smart Home Community
Failed to open LIRC support. You will not be able to use your remote control. ... How to view Tapo camera on PC...
Read more >
Turned my Security Camera into a Webcam using RTSP
Using RTSP to turn a Tp-Link Smart Cam Pan Tilt Home WiFi Camera into a Webcam Wireless Indoor Security 360° 2Mp 1080P (Full...
Read more >
Problems adding TP-Link Tapo C200 to BI 4 - IP Cam Talk
I have a TP-Link Tapo C200 cam which is onvif compliant (including ... ...but I get no video stream - just: "RTSP: 404...
Read more >
How to view Tapo camera on PC through RTSP stream?
The Tapo camera supports the RTSP protocol, so it can work with third-party NVR or NAS devices that also support the RTSP protocol....
Read more >
Tapo C100/C200 Any luck? #193 - keshavdv/unifi-cam-proxy
The problem is that this camera has only 2 streams and each stream support a max of 2 connections. If you don't pass...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found