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.

Unable to get Frigate to work with Android IP Cam

See original GitHub issue

Describe the bug I have a new install of Frigate using the HomeAssistant supervisor install method addon I have a single camera that is an Android cellphone running Android IP Cam application Below errors come up in the log when starting and nothing works:

ffmpeg.front_yard.detect ERROR : Option stimeout not found. frigate.video INFO : front_yard: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures frigate.video INFO : front_yard: ffmpeg process is not running. exiting capture thread…

Version of frigate Current version: 1.13

Config file Include your full config file wrapped in triple back ticks.

mqtt:
  # Required: host name
  host: 192.168.0.52
  # Optional: port (default: shown below)
  port: 1883
  # Optional: topic prefix (default: shown below)
  # WARNING: must be unique if you are running multiple instances
  topic_prefix: frigate
  # Optional: client id (default: shown below)
  # WARNING: must be unique if you are running multiple instances
  client_id: frigate
  # Optional: user
  user: mosquitto
  # Optional: password
  # NOTE: Environment variables that begin with 'FRIGATE_' may be referenced in {}.
  #       eg. password: '{FRIGATE_MQTT_PASSWORD}'
  password: password
  # Optional: interval in seconds for publishing stats (default: shown below)
  stats_interval: 60

cameras:
  # Name of your camera
  front_yard:
    ffmpeg:
      inputs:
        - path: http://192.168.1.45:8080/video
          roles:
            - detect
            - rtmp
    width: 1920
    height: 1080

detectors:
  cpu1:
    type: cpu
  cpu2:
    type: cpu

ffmpeg:
  # Optional: global ffmpeg args (default: shown below)
  global_args: -hide_banner -loglevel verbose

Frigate container logs

 * Starting nginx nginx
   ...done.
frigate.app                    INFO    : Creating directory: /tmp/cache
frigate.app                    WARNING : Camera front_yard has rtmp enabled, but rtmp is not assigned to an input.
Starting migrations
peewee_migrate                 INFO    : Starting migrations
There is nothing to migrate
peewee_migrate                 INFO    : There is nothing to migrate
frigate.mqtt                   INFO    : MQTT connected
detector.cpu2                  INFO    : Starting detection process: 37
detector.cpu1                  INFO    : Starting detection process: 35
frigate.app                    INFO    : Camera processor started for front_yard: 40
frigate.app                    INFO    : Capture process started for front_yard: 41
frigate.video                  INFO    : front_yard: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate.video                  INFO    : front_yard: ffmpeg process is not running. exiting capture thread...
ffmpeg.front_yard.detect       ERROR   : [tcp @ 0x55c7c175d500] Starting connection attempt to 192.168.1.45 port 8080
ffmpeg.front_yard.detect       ERROR   : [tcp @ 0x55c7c175d500] Successfully connected to 192.168.1.45 port 8080
ffmpeg.front_yard.detect       ERROR   : Option stimeout not found.
frigate.video                  INFO    : front_yard: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate.video                  INFO    : front_yard: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate.video                  INFO    : front_yard: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate.video                  INFO    : front_yard: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate.video                  INFO    : front_yard: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate.video                  INFO    : front_yard: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate.video                  INFO    : front_yard: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate.video                  INFO    : front_yard: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate.video                  INFO    : front_yard: ffmpeg process is not running. exiting capture thread...
ffmpeg.front_yard.detect       ERROR   : [tcp @ 0x562c7a4fe500] Starting connection attempt to 192.168.1.45 port 8080
ffmpeg.front_yard.detect       ERROR   : [tcp @ 0x562c7a4fe500] Successfully connected to 192.168.1.45 port 8080
ffmpeg.front_yard.detect       ERROR   : Option stimeout not found.
frigate.video                  INFO    : front_yard: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate.video                  INFO    : front_yard: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate.video                  INFO    : front_yard: ffmpeg process is not running. exiting capture thread...
ffmpeg.front_yard.detect       ERROR   : [tcp @ 0x55ddec565500] Starting connection attempt to 192.168.1.45 port 8080
ffmpeg.front_yard.detect       ERROR   : [tcp @ 0x55ddec565500] Successfully connected to 192.168.1.45 port 8080
ffmpeg.front_yard.detect       ERROR   : Option stimeout not found.
frigate.video                  INFO    : front_yard: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate.video                  INFO    : front_yard: ffmpeg process is not running. exiting capture thread...
ffmpeg.front_yard.detect       ERROR   : [tcp @ 0x5620aa163500] Starting connection attempt to 192.168.1.45 port 8080
ffmpeg.front_yard.detect       ERROR   : [tcp @ 0x5620aa163500] Successfully connected to 192.168.1.45 port 8080
ffmpeg.front_yard.detect       ERROR   : Option stimeout not found.
frigate.video                  INFO    : front_yard: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate.video                  INFO    : front_yard: ffmpeg process is not running. exiting capture thread...
ffmpeg.front_yard.detect       ERROR   : [tcp @ 0x55b310d06500] Starting connection attempt to 192.168.1.45 port 8080
ffmpeg.front_yard.detect       ERROR   : [tcp @ 0x55b310d06500] Successfully connected to 192.168.1.45 port 8080
ffmpeg.front_yard.detect       ERROR   : Option stimeout not found.
frigate.video                  INFO    : front_yard: ffmpeg sent a broken frame. memoryview assignment: lvalue and rvalue have different structures
frigate.video                  INFO    : front_yard: ffmpeg process is not running. exiting capture thread...

Frigate stats

{
  "cameras": {
    "front_yard": {
      "best_image_timeout": 60,
      "clips": {
        "enabled": false,
        "objects": null,
        "post_capture": 5,
        "pre_capture": 5,
        "required_zones": [],
        "retain": {
          "default": 10,
          "objects": {}
        }
      },
      "detect": {
        "enabled": true,
        "max_disappeared": 25
      },
      "ffmpeg_cmds": [
        {
          "cmd": "ffmpeg -hide_banner -loglevel verbose -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i http://192.168.1.45:8080/video -c copy -f flv rtmp://127.0.0.1/live/front_yard -f rawvideo -pix_fmt yuv420p pipe:",
          "roles": [
            "detect",
            "rtmp"
          ]
        }
      ],
      "fps": null,
      "frame_shape": [
        1080,
        1920
      ],
      "height": 1080,
      "motion": {
        "contour_area": 100,
        "delta_alpha": 0.2,
        "frame_alpha": 0.2,
        "frame_height": 180,
        "mask": null,
        "threshold": 25
      },
      "mqtt": {
        "bounding_box": true,
        "crop": true,
        "enabled": true,
        "height": 270,
        "required_zones": [],
        "timestamp": true
      },
      "name": "front_yard",
      "objects": {
        "filters": {
          "person": {
            "mask": [],
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          }
        },
        "mask": null,
        "track": [
          "person"
        ]
      },
      "record": {
        "enabled": false,
        "retain_days": 30
      },
      "rtmp": {
        "enabled": true
      },
      "snapshots": {
        "bounding_box": false,
        "crop": false,
        "enabled": false,
        "height": null,
        "required_zones": [],
        "retain": {
          "default": 10,
          "objects": {}
        },
        "timestamp": false
      },
      "width": 1920,
      "zones": {}
    }
  },
  "clips": {
    "max_seconds": 300,
    "retain": {
      "default": 10,
      "objects": {}
    },
    "tmpfs_cache_size": ""
  },
  "database": {
    "path": "/media/frigate/clips/frigate.db"
  },
  "detectors": {
    "cpu1": {
      "device": "usb",
      "num_threads": 3,
      "type": "cpu"
    },
    "cpu2": {
      "device": "usb",
      "num_threads": 3,
      "type": "cpu"
    }
  },
  "environment_vars": {},
  "logger": {
    "default": "INFO",
    "logs": {}
  },
  "model": {
    "height": 320,
    "width": 320
  },
  "mqtt": {
    "client_id": "frigate",
    "host": "192.168.0.52",
    "port": 1883,
    "stats_interval": 60,
    "topic_prefix": "frigate",
    "user": "mosquitto"
  },
  "snapshots": {
    "retain": {
      "default": 10,
      "objects": {}
    }
  }
}

FFprobe from your camera

Run the following command and paste output below

 ffprobe https://192.168.1.45:8080/video
ffprobe version 4.0.5 Copyright (c) 2007-2019 the FFmpeg developers
  built with gcc 8 (GCC)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' --extra-ldflags='-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' --extra-cflags=' ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm --enable-libjack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzvbi --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100
Input #0, mpjpeg, from 'https://192.168.1.45:8080/video':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 1920x1080 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc

Screenshots If applicable, add screenshots to help explain your problem.

Computer Hardware

  • OS: Proxmox with Hassos Virtual
  • Install method: Addon
  • Virtualization: Proxmox
  • Coral Version: None
  • Network Setup: Wifi

Camera Info:

  • Manufacturer: Android IP Cam on Android device
  • Model: na
  • Resolution: 1920
  • FPS: 5

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
bgbakercommented, Aug 2, 2021

Thank you Blake. I got this working with the RTP link for Android IP Cam. I tried this initially but there must have been a typo or something. For reference you use: rtsp://IPAddress:Port/h264_pcm.sdp for the RTP stream of Android IP Cam

0reactions
kevvarcommented, Oct 23, 2022

Maybe you can change the path to the rtsp link provided by the app

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cant get Frigate notifications working : r/homeassistant
I am running Home Assistant, Mosquitto, and Frigate as Docker containers with docker-compose.
Read more >
Unable to View Live Camera Feed on Mobile Data
I've setup multiple cameras using the Frigate Lovelace Card (WebRTC). They work perfectly on my Android phone both on wifi and on mobile ......
Read more >
ESP32-CAM Video Streaming Web Server works with ...
In this project we're going to build an IP surveillance camera with the ESP32-CAM board. The ESP32 camera is going to host a...
Read more >
Home Assistant | is anyone using frigate
frigate cameras are very slow in the interface. I would suggest WebRTC (realtime display) or the new Frigate Lovelace Card(i cant seem to...
Read more >
Frigate and Home Assistant - YouTube
Your browser can't play this video. Learn more. Switch camera.
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