blakeblackshear / frigate

NVR with realtime local object detection for IP cameras
https://frigate.video
MIT License
19.46k stars 1.79k forks source link

Frigate Ezviz grey video stream #5623

Closed Ma7amed closed 1 year ago

Ma7amed commented 1 year ago

Describe the problem you are having

Camera video appear as gray image and sometimes parts of the video appear.

I have Ezviz C3W Pro camera and it to Frigate in Home Assistant. RTSP stream appear normally in VLC, but it appear as grey color 99% of time.

home-assistant-firgate

Version

Frigate Full Access Current version: 0.11.1

Frigate config file

mqtt:
  host: 10.0.1.122
  user: mymqttuser
  password: mypass@123
  port: 1883

rtmp:
  enabled: False

cameras:
  camera_1:
    ffmpeg:
      inputs:
        - path: rtsp://admin:DJWIQV@10.0.1.111:554/user=admin_password=DJWIQV_channel=0_stream=0.sdp

Relevant log output

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[2023-03-02 07:57:16] frigate.app                    INFO    : Starting Frigate (0.11.1-2eada21)
[2023-03-02 07:57:16] frigate.app                    INFO    : Creating directory: /tmp/cache
Starting migrations
[2023-03-02 07:57:16] peewee_migrate                 INFO    : Starting migrations
There is nothing to migrate
[2023-03-02 07:57:16] peewee_migrate                 INFO    : There is nothing to migrate
[2023-03-02 07:57:16] frigate.app                    INFO    : Output process started: 219
[2023-03-02 07:57:16] detector.cpu                   INFO    : Starting detection process: 218
[2023-03-02 07:57:16] frigate.edgetpu                WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.
[2023-03-02 07:57:16] frigate.app                    INFO    : Camera processor started for camera_1: 222
[2023-03-02 07:57:16] frigate.app                    INFO    : Capture process started for camera_1: 223
[2023-03-02 07:57:16] ws4py                          INFO    : Using epoll
[2023-03-02 07:57:17] ws4py                          INFO    : Using epoll
[2023-03-02 07:57:20] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:45610]
[2023-03-02 07:57:44] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:45610]
[2023-03-02 07:57:44] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:60238]
[2023-03-02 07:57:46] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:52416]
[2023-03-02 07:59:27] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:60238]
[2023-03-02 08:02:39] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:46474]
[2023-03-02 08:02:49] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:46474]
[2023-03-02 08:02:54] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:40600]
[2023-03-02 08:03:40] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:40600]

FFprobe output from your camera

ffprobe version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2007-2021 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
  configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
[rtsp @ 0x55fccff1abc0] Could not find codec parameters for stream 0 (Video: hevc, none): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, rtsp, from 'rtsp://admin:DJWIQV@10.0.1.111:554/user=admin_password=DJWIQV_channel=0_stream=0.sdp':
  Metadata:
    title           : Media Presentation
  Duration: N/A, bitrate: N/A
  Stream #0:0: Video: hevc, none, 90k tbr, 90k tbn, 90k tbc
  Stream #0:1: Audio: aac, 16000 Hz, mono, fltp
adminuser@home_pc:~$

Frigate stats

No response

Operating system

HassOS

Install method

HassOS Addon

Coral version

CPU (no coral)

Network connection

Wireless

Camera make and model

Ezviz C3W Pro

Any other information that may be helpful

No response

banthungprong commented 1 year ago

HEVC Stream = H265 = Browser doesn't like it. (You shoulf remove password in the ffprobe output above). Try with a beta of chrome (I am using HEVC-Streams there without problems).

Ma7amed commented 1 year ago

HEVC Stream = H265 = Browser doesn't like it. (You shoulf remove password in the ffprobe output above). Try with a beta of chrome (I am using HEVC-Streams there without problems).

I tried chrome beta, but it still have the same issue. Note: I already changed password and IPs to fake ones while submitting the question in all the text above.

banthungprong commented 1 year ago

Try this one. The "normal" Betas are still older... https://github.com/RobRich999/Chromium_Clang/releases

NickM-27 commented 1 year ago

In this case HEVC does not matter because the stream being viewed in the browser is jsmpeg which is mpeg1 encoded.

blakeblackshear commented 1 year ago

Is it gray when you switch to debug view?

Ma7amed commented 1 year ago

Is it gray when you switch to debug view?

There is no picture/video for the the camera in the debug page. Or you mean other thing by debug view ?

frigate-hassio1

blakeblackshear commented 1 year ago

When you are viewing the live stream, there is a link to the debug stream view on the top right. It's in the previous screenshot you posted.

Ma7amed commented 1 year ago

When you are viewing the live stream, there is a link to the debug stream view on the top right. It's in the previous screenshot you posted.

It is also grey in the debug view

frigate-hassio2

blakeblackshear commented 1 year ago

Then for some reason ffmpeg is outputting a gray frame for this camera. I haven't ever seen another user report this before, and the logs you provided don't show any errors. I don't have any idea what could cause this.

github-actions[bot] commented 1 year 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.

Ma7amed commented 1 year ago

The camera now connected via Ethernet instead of WIFI, but issue still exist.

I have a feeling it is related to high CPU usage and Raspberry bi can't handle it.

Is there a way to check/confirm that ?

Ma7amed commented 1 year ago

I just installed frigate docker in my PC, and used the same config.yml file and there is no grey color and it is running normally. so it is 100% something related to it running on hassio/raspberry bi.

github-actions[bot] commented 1 year 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.