blakeblackshear / frigate

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

ffmpeg sent a broken frame. something is wrong. #304

Closed Hogster closed 3 years ago

Hogster commented 3 years ago

Describe the bug ffmpeg is "crashing" and generates "ffmpeg sent a broken frame. something is wrong."

Version of frigate blakeblackshear/frigate:stable-armv7

Config file

web_port: 5000

mqtt:
  host: 192.168.0.160
  port: 1883
  topic_prefix: frigate
  user: hassio_mqtt_user # Optional
  password: hassio_mqtt_passwd # Optional

save_clips:
  max_seconds: 180 #3 minutes
  clips_dir: /clips
  cache_dir: /cache

ffmpeg:
  global_args:
    - -hide_banner
    - -loglevel
    - debug
    #- info
    #- panic
  hwaccel_args:
    - -c:v
    - h264_mmal
  input_args:
    - -avoid_negative_ts
    - make_zero
    - -fflags
    - nobuffer
    - -flags
    - low_delay
    - -strict
    - experimental
    - -fflags
    - +genpts+discardcorrupt
    - -rtsp_transport
    - tcp
    - -stimeout
    - '5000000'
    - -use_wallclock_as_timestamps
    - '1'
  output_args:
    - -f
    - rawvideo
    - -pix_fmt
    - yuv420p

objects:
  track:
    - person
  filters:
    person:
      min_area: 5000
      max_area: 100000
      threshold: 0.85

cameras:
  front:
    ffmpeg:
      input: rtsp://192.168.0.xxx:xxx/h264?username=xxx&password=xxx
    mask: front-mask.bmp

    mqtt:
      crop_to_region: True

    save_clips:
      enabled: False
      pre_capture: 10

    snapshots:
      show_timestamp: True
      draw_zones: False
      draw_bounding_boxes: True

    objects:
      track:
        - person
      filters:
        person:
          min_area: 5000
          max_area: 100000
          min_score: 0.5
          threshold: 0.85

Logs

Starting frigate-stable ... done
Attaching to frigate-stable
frigate-stable | On connect called
frigate-stable | ffprobe -v panic -show_error -show_streams -of json "rtsp://192.168.0.xx:xxx/h264?username=xxxxx&password=xxxxx"
frigate-stable | Starting detection process: 12
frigate-stable | Attempting to load TPU as usb
frigate-stable | TPU found
frigate-stable | {'streams': [{'index': 0, 'codec_name': 'h264', 'codec_long_name': 'unknown', 'profile': '77', 'codec_type': 'video', 'codec_time_base': '1/10', 'codec_tag_string': '[0][0][0][0]', 'codec_tag': '0x0000', 'width': 1280, 'height': 704, 'coded_width': 1280, 'coded_height': 704, 'closed_captions': 0, 'has_b_frames': 0, 'pix_fmt': 'yuv420p', 'level': 31, 'chroma_location': 'left', 'field_order': 'progressive', 'refs': 1, 'is_avc': 'false', 'nal_length_size': '0', 'r_frame_rate': '5/1', 'avg_frame_rate': '5/1', 'time_base': '1/90000', 'start_pts': 125820, 'start_time': '1.398000', 'bits_per_raw_sample': '8', 'disposition': {'default': 0, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}}, {'index': 1, 'codec_name': 'aac', 'codec_long_name': 'unknown', 'codec_type': 'audio', 'codec_time_base': '1/16000', 'codec_tag_string': '[0][0][0][0]', 'codec_tag': '0x0000', 'sample_fmt': 'fltp', 'sample_rate': '16000', 'channels': 1, 'channel_layout': 'mono', 'bits_per_sample': 0, 'r_frame_rate': '0/0', 'avg_frame_rate': '0/0', 'time_base': '1/16000', 'disposition': {'default': 0, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}}]}
frigate-stable | Camera capture process started for front: 23
frigate-stable | Creating ffmpeg process...
frigate-stable | ffmpeg -hide_banner -loglevel debug -c:v h264_mmal -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://192.168.0.xxx:xxx/h264?username=xxx&password=xxx -f rawvideo -pix_fmt yuv420p pipe:
frigate-stable | Camera process started for front: 24
frigate-stable |  * Serving Flask app "detect_objects" (lazy loading)
frigate-stable |  * Environment: development
frigate-stable |  * Debug mode: off
frigate-stable | Splitting the commandline.
frigate-stable | Reading option '-hide_banner' ... matched as option 'hide_banner' (do not show program banner) with argument '1'.
frigate-stable | Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
frigate-stable | Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'h264_mmal'.
frigate-stable | Reading option '-avoid_negative_ts' ... matched as AVOption 'avoid_negative_ts' with argument 'make_zero'.
frigate-stable | Reading option '-fflags' ... matched as AVOption 'fflags' with argument 'nobuffer'.
frigate-stable | Reading option '-flags' ... matched as AVOption 'flags' with argument 'low_delay'.
frigate-stable | Reading option '-strict' ...Routing option strict to both codec and muxer layer
frigate-stable |  matched as AVOption 'strict' with argument 'experimental'.
frigate-stable | Reading option '-fflags' ... matched as AVOption 'fflags' with argument '+genpts+discardcorrupt'.
frigate-stable | Reading option '-rtsp_transport' ... matched as AVOption 'rtsp_transport' with argument 'tcp'.
frigate-stable | Reading option '-stimeout' ... matched as AVOption 'stimeout' with argument '5000000'.
frigate-stable | Reading option '-use_wallclock_as_timestamps' ... matched as AVOption 'use_wallclock_as_timestamps' with argument '1'.
frigate-stable | Reading option '-i' ... matched as input url with argument 'rtsp://192.168.0.xxx:xxx/h264?username=xxx&password=xxx'.
frigate-stable | Reading option '-f' ... matched as option 'f' (force format) with argument 'rawvideo'.
frigate-stable | Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel format) with argument 'yuv420p'.
frigate-stable | Reading option 'pipe:' ... matched as output url.
frigate-stable | Finished splitting the commandline.
frigate-stable | Parsing a group of options: global .
frigate-stable | Applying option hide_banner (do not show program banner) with argument 1.
frigate-stable | Applying option loglevel (set logging level) with argument debug.
frigate-stable | Successfully parsed a group of options.
frigate-stable | Parsing a group of options: input url rtsp://192.168.0.xxx:xxx/h264?username=xxx&password=xxx.
frigate-stable | Applying option c:v (codec name) with argument h264_mmal.
frigate-stable | Successfully parsed a group of options.
frigate-stable | Opening an input file: rtsp://192.168.0.xxx:xxx/h264?username=xxx&password=xxx.
frigate-stable | [tcp @ 0x1f6a830] No default whitelist set
frigate-stable | [tcp @ 0x1f6a830] Original list of addresses:
frigate-stable | [tcp @ 0x1f6a830] Address 192.168.0.33 port 554
frigate-stable | [tcp @ 0x1f6a830] Interleaved list of addresses:
frigate-stable | [tcp @ 0x1f6a830] Address 192.168.0.33 port 554
frigate-stable | [tcp @ 0x1f6a830] Starting connection attempt to 192.168.0.33 port 554
frigate-stable | [tcp @ 0x1f6a830] Successfully connected to 192.168.0.33 port 554
frigate-stable | [rtsp @ 0x1f68560] SDP:
frigate-stable | v=0
frigate-stable | o=- 1109162014219182 1109162014219192 IN IP4 x.y.z.w
frigate-stable | s=RTSP/RTP stream from anjvision ipcamera
frigate-stable | e=NONE
frigate-stable | c=IN IP4 0.0.0.0
frigate-stable | a=tool:LIVE555 Streaming Media v2011.05.25 CHAM.LI@ANJVISION.COM
frigate-stable | t=0 0
frigate-stable | a=range:npt=0-
frigate-stable | a=control:*
frigate-stable | m=video 0 RTP/AVP 96
frigate-stable | a=rtpmap:96 H264/90000
frigate-stable | a=control:trackID=1
frigate-stable | a=fmtp:96 profile-level-id=4D401F;packetization-mode=0;sprop-parameter-sets=Z01AH6aAUAWaEAAAPpAAAnGgQA==,aO48gA==;config=00000001674d401fa68050059a1000003e90000271a0400000000168ee3c80
frigate-stable | a=x-dimensions: 1280, 720
frigate-stable | a=x-framerate: 5
frigate-stable | m=audio 0 RTP/AVP 0
frigate-stable | a=rtpmap:0 MPEG4-GENERIC/16000/2
frigate-stable | a=fmtp:0 config=1408
frigate-stable | a=control:trackID=2
frigate-stable | a=Media_header:MEDIAINFO=494D4B48010100000400010010710110401F000000FA000000000000000000000000000000000000;
frigate-stable | a=appversion:1.0
frigate-stable | 
frigate-stable | Failed to parse interval end specification ''
frigate-stable | [rtsp @ 0x1f68560] video codec set to: h264
frigate-stable | [rtsp @ 0x1f68560] RTP Profile IDC: 4d Profile IOP: 40 Level: 1f
frigate-stable | [rtsp @ 0x1f68560] RTP Packetization Mode: 0
frigate-stable | [rtsp @ 0x1f68560] Extradata set to 0x1f6bfc8 (size: 31)
frigate-stable | [rtsp @ 0x1f68560] audio codec set to: aac
frigate-stable | [rtsp @ 0x1f68560] audio samplerate set to: 16000
frigate-stable | [rtsp @ 0x1f68560] audio channels set to: 2
frigate-stable | [rtsp @ 0x1f68560] setting jitter buffer size to 0
frigate-stable |     Last message repeated 1 times
frigate-stable | [rtsp @ 0x1f68560] hello state=0
frigate-stable | Failed to parse interval end specification ''
frigate-stable | [h264 @ 0x1f6bb20] nal_unit_type: 7(SPS), nal_ref_idc: 3
frigate-stable | [h264 @ 0x1f6bb20] nal_unit_type: 8(PPS), nal_ref_idc: 3
frigate-stable | [h264 @ 0x1f6bb20] nal_unit_type: 7(SPS), nal_ref_idc: 3
frigate-stable | [h264 @ 0x1f6bb20] nal_unit_type: 8(PPS), nal_ref_idc: 3
frigate-stable | [rtsp @ 0x1f68560] Error parsing AU headers
frigate-stable |     Last message repeated 2 times
frigate-stable | [h264 @ 0x1f6bb20] nal_unit_type: 7(SPS), nal_ref_idc: 3
frigate-stable | [h264 @ 0x1f6bb20] nal_unit_type: 8(PPS), nal_ref_idc: 3
frigate-stable | [h264 @ 0x1f6bb20] nal_unit_type: 5(IDR), nal_ref_idc: 3
frigate-stable | [h264 @ 0x1f6bb20] Format yuv420p chosen by get_format().
frigate-stable | [h264 @ 0x1f6bb20] Reinit context to 1280x704, pix_fmt: yuv420p
frigate-stable | [rtsp @ 0x1f68560] Error parsing AU headers
frigate-stable |     Last message repeated 2 times
frigate-stable | [h264 @ 0x1f6bb20] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate-stable | [rtsp @ 0x1f68560] Error parsing AU headers
frigate-stable |     Last message repeated 3 times
frigate-stable | [h264 @ 0x1f6bb20] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate-stable | [rtsp @ 0x1f68560] Error parsing AU headers
frigate-stable |     Last message repeated 1 times
frigate-stable | [h264 @ 0x1f6bb20] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate-stable | [rtsp @ 0x1f68560] Error parsing AU headers
frigate-stable |     Last message repeated 3 times
frigate-stable | [h264 @ 0x1f6bb20] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate-stable | [rtsp @ 0x1f68560] Error parsing AU headers
frigate-stable |     Last message repeated 2 times
frigate-stable | [h264 @ 0x1f6bb20] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate-stable | [rtsp @ 0x1f68560] Error parsing AU headers
frigate-stable |     Last message repeated 2 times
frigate-stable | [h264 @ 0x1f6bb20] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate-stable | [rtsp @ 0x1f68560] Error parsing AU headers
frigate-stable |     Last message repeated 65 times
frigate-stable | [rtsp @ 0x1f68560] max_analyze_duration 5000000 reached at 5000000 microseconds st:0
frigate-stable | [rtsp @ 0x1f68560] rfps: 4.916667 0.016127
frigate-stable | [rtsp @ 0x1f68560] rfps: 5.000000 0.001668
frigate-stable |     Last message repeated 1 times
frigate-stable | [rtsp @ 0x1f68560] rfps: 5.083333 0.016097
frigate-stable | [rtsp @ 0x1f68560] rfps: 10.000000 0.006672
frigate-stable |     Last message repeated 1 times
frigate-stable | [rtsp @ 0x1f68560] rfps: 15.000000 0.015012
frigate-stable | [rtsp @ 0x1f68560] rfps: 14.985015 0.015488
frigate-stable | Input #0, rtsp, from 'rtsp://192.168.0.xxx:xxx/h264?username=xxx&password=xxx':
frigate-stable |   Metadata:
frigate-stable |     title           : RTSP/RTP stream from anjvision ipcamera
frigate-stable |   Duration: N/A, start: 1605464772.410433, bitrate: N/A
frigate-stable |     Stream #0:0, 27, 1/90000: Video: h264, 1 reference frame, yuv420p(progressive, left), 1280x704, 0/1, 5 fps, 5 tbr, 90k tbn, 10 tbc
frigate-stable |     Stream #0:1, 0, 1/16000: Audio: aac, 16000 Hz, mono, fltp
frigate-stable | Successfully opened the file.
frigate-stable | Parsing a group of options: output url pipe:.
frigate-stable | Applying option f (force format) with argument rawvideo.
frigate-stable | Applying option pix_fmt (set pixel format) with argument yuv420p.
frigate-stable | Successfully parsed a group of options.
frigate-stable | Opening an output file: pipe:.
frigate-stable | [pipe @ 0x1fcaff0] Setting default whitelist 'crypto,data'
frigate-stable | Successfully opened the file.
frigate-stable | [h264_mmal @ 0x1f8ae80] Format yuv420p chosen by get_format().
frigate-stable | [h264_mmal @ 0x1f8ae80] Using MMAL H264 encoding.
frigate-stable | Stream mapping:
frigate-stable |   Stream #0:0 -> #0:0 (h264 (h264_mmal) -> rawvideo (native))
frigate-stable | Press [q] to stop, [?] for help
frigate-stable | cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
frigate-stable | [rtsp @ 0x1f68560] Error parsing AU headers
frigate-stable |     Last message repeated 2 times
frigate-stable | cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
frigate-stable | [rtsp @ 0x1f68560] Error parsing AU headers
frigate-stable |     Last message repeated 2 times
frigate-stable | cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
frigate-stable | [rtsp @ 0x1f68560] Error parsing AU headers
frigate-stable |     Last message repeated 2 times
frigate-stable | cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
frigate-stable | [rtsp @ 0x1f68560] Error parsing AU headers
frigate-stable |     Last message repeated 2 times
frigate-stable | cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
frigate-stable | [rtsp @ 0x1f68560] Error parsing AU headers
frigate-stable |     Last message repeated 2 times
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) 
frigate-stable | [rtsp @ 0x1f68560] Error parsing AU headers
frigate-stable |     Last message repeated 2 times
frigate-stable | cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
frigate-stable | [rtsp @ 0x1f68560] Error parsing AU headers
frigate-stable |     Last message repeated 3 times
frigate-stable | cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
frigate-stable | [rtsp @ 0x1f68560] Error parsing AU headers
frigate-stable |     Last message repeated 2 times
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) 
frigate-stable | [rtsp @ 0x1f68560] Error parsing AU headers
frigate-stable |     Last message repeated 2 times
frigate-stable | cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
frigate-stable | [rtsp @ 0x1f68560] Error parsing AU headers
frigate-stable |     Last message repeated 2 times
frigate-stable | cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
frigate-stable | [rtsp @ 0x1f68560] Error parsing AU headers
frigate-stable |     Last message repeated 2 times
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) 
frigate-stable | [rtsp @ 0x1f68560] Error parsing AU headers
frigate-stable |     Last message repeated 2 times
frigate-stable | cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
frigate-stable | [rtsp @ 0x1f68560] Error parsing AU headers
frigate-stable |     Last message repeated 2 times
frigate-stable | cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
frigate-stable | [rtsp @ 0x1f68560] Error parsing AU headers
frigate-stable |     Last message repeated 2 times
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) 
frigate-stable | [rtsp @ 0x1f68560] Error parsing AU headers
frigate-stable |     Last message repeated 3 times
frigate-stable | cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
frigate-stable | [rtsp @ 0x1f68560] Error parsing AU headers
frigate-stable |     Last message repeated 2 times
frigate-stable | cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
frigate-stable | [rtsp @ 0x1f68560] Error parsing AU headers
frigate-stable |     Last message repeated 2 times
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream) 
frigate-stable | [rtsp @ 0x1f68560] Error parsing AU headers
frigate-stable |     Last message repeated 2 times
frigate-stable | cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
frigate-stable | [rtsp @ 0x1f68560] Error parsing AU headers
frigate-stable |     Last message repeated 2 times
frigate-stable | cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
frigate-stable | [rtsp @ 0x1f68560] Error parsing AU headers
frigate-stable | No frames received from front in 5 seconds. Exiting ffmpeg...
frigate-stable | Waiting for ffmpeg to exit gracefully...
frigate-stable |     Last message repeated 2 times
[h264_mmal @ 0x1f8ae80] Did not get output frame from MMAL.time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
frigate-stable | Error while decoding stream #0:0: Unknown error occurred
frigate-stable | Finishing stream 0:0 without any data written to it.
frigate-stable | detected 4 logical cores
frigate-stable | [graph 0 input from stream 0:0 @ 0x1fd4890] Setting 'video_size' to value '1280x704'
frigate-stable | [graph 0 input from stream 0:0 @ 0x1fd4890] Setting 'pix_fmt' to value '0'
frigate-stable | [graph 0 input from stream 0:0 @ 0x1fd4890] Setting 'time_base' to value '1/90000'
frigate-stable | [graph 0 input from stream 0:0 @ 0x1fd4890] Setting 'pixel_aspect' to value '0/1'
frigate-stable | [graph 0 input from stream 0:0 @ 0x1fd4890] Setting 'frame_rate' to value '5/1'
frigate-stable | [graph 0 input from stream 0:0 @ 0x1fd4890] w:1280 h:704 pixfmt:yuv420p tb:1/90000 fr:5/1 sar:0/1
frigate-stable | [format @ 0x1fd5070] Setting 'pix_fmts' to value 'yuv420p'
frigate-stable | [AVFilterGraph @ 0x1f94e00] query_formats: 4 queried, 3 merged, 0 already done, 0 delayed
frigate-stable | Output #0, rawvideo, to 'pipe:':
frigate-stable |   Metadata:
frigate-stable |     title           : RTSP/RTP stream from anjvision ipcamera
frigate-stable |     encoder         : Lavf58.45.100
frigate-stable |     Stream #0:0, 0, 1/5: Video: rawvideo, 1 reference frame (I420 / 0x30323449), yuv420p(left), 1280x704, 0/1, q=2-31, 54067 kb/s, 5 fps, 5 tbn, 5 tbc
frigate-stable |     Metadata:
frigate-stable |       encoder         : Lavc58.91.100 rawvideo
frigate-stable | frame=    0 fps=0.0 q=0.0 Lsize=       0kB time=00:00:00.00 bitrate=N/A speed=   0x    
frigate-stable | video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
frigate-stable | Input file #0 (rtsp://192.168.0.xxx:xxx/h264?username=xxx&password=xxx):
frigate-stable |   Input stream #0:0 (video): 20 packets read (10061 bytes); 0 frames decoded; 
frigate-stable |   Input stream #0:1 (audio): 0 packets read (0 bytes); 
frigate-stable |   Total: 20 packets (10061 bytes) demuxed
frigate-stable | Output file #0 (pipe:):
frigate-stable |   Output stream #0:0 (video): 0 frames encoded; 0 packets muxed (0 bytes); 
frigate-stable |   Total: 0 packets (0 bytes) muxed
frigate-stable | Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
frigate-stable | 0 frames successfully decoded, 1 decoding errors
frigate-stable | [AVIOContext @ 0x1fd7390] Statistics: 0 seeks, 0 writeouts
frigate-stable | Exiting normally, received signal 15.
frigate-stable | front: ffmpeg sent a broken frame. something is wrong.
frigate-stable | front: ffmpeg process is not running. exiting capture thread...
frigate-stable | Creating ffmpeg process...

Frigate debug stats

{"detection_fps":0.0,"detectors":{"coral":{"detection_start":0.0,"inference_speed":10.0,"pid":13}},"front":{"camera_fps":0.0,"capture_pid":24,"detection_fps":0.0,"frame_info":{"detect":0.0,"process":0.0},"pid":25,"process_fps":0.0,"skipped_fps":0.0}}

FFprobe from your camera

Run the following command and paste output below

ffprobe <stream_url>
ffprobe version 4.3.1 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libass --enable-fontconfig --enable-libfreetype --enable-libvidstab --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-libbluray --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-omx --enable-omx-rpi --enable-mmal --enable-v4l2_m2m --enable-neon --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
[udp @ 0x19f1a10] attempted to set receive buffer to size 393216 but it only ended up set as 360448
[udp @ 0x1a01d50] attempted to set receive buffer to size 393216 but it only ended up set as 360448
[udp @ 0x1a12960] attempted to set receive buffer to size 393216 but it only ended up set as 360448
[udp @ 0x1a22c00] attempted to set receive buffer to size 393216 but it only ended up set as 360448
[rtsp @ 0x19eaa90] Error parsing AU headers
    Last message repeated 89 times
Input #0, rtsp, from 'rtsp://xxx:xxx@192.168.0.xx:xxx/h264':
  Metadata:
    title           : RTSP/RTP stream from anjvision ipcamera
  Duration: N/A, start: 1.400000, bitrate: N/A
    Stream #0:0: Video: h264, yuv420p(progressive), 1280x704, 5 fps, 5 tbr, 90k tbn, 10 tbc
    Stream #0:1: Audio: aac, 16000 Hz, mono, fltp

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

Computer Hardware

Camera Info:

Additional context I have a second container running Frigate with Kpine's docker file (kpine/frigate-raspberrypi) (from this thread: https://github.com/blakeblackshear/frigate/issues/109) that works great.

I have tried the following: Removing hwaccel_args Turning of "Save_Clips" (https://github.com/blakeblackshear/frigate/issues/251) and also "What happens if you remove the -map 0 parameters all together?" as suggested in the same thread Tried turning of audio and setting audio to G711 I also tried to increase the UDP buffers (https://medium.com/@CameronSparr/increase-os-udp-buffers-to-improve-performance-51d167bb1360)

I all out of ideas...

blakeblackshear commented 3 years ago

Can you post the ffmpeg command in the logs from both versions?

Hogster commented 3 years ago

Sorry for being slow, but what exactly do you want me to do?

blakeblackshear commented 3 years ago

Post the logs from the working version too.

Hogster commented 3 years ago

This is everything for the other container runniong Kpines version:

Debug stats: {"coral":{"detection_start":0.0,"fps":0.0,"inference_speed":18.62,"pid":22},"front":{"camera_fps":5.0,"detection_fps":0.0,"ffmpeg_pid":33,"frame_info":{"detect":1605602237.72496,"process":1605602237.72496,"read":1605602237.72496},"pid":35,"process_fps":5.0,"read_start":1605602237.740513,"skipped_fps":0.0},"plasma_store_rc":null}

Frigate docker log:

$ docker-compose up
Starting frigate ... done
Attaching to frigate
frigate    | On connect called
frigate    | ffprobe -v panic -show_error -show_streams -of json "rtsp://192.168.0.xxx:xxx/h264?username=xxx&password=xxx"
frigate    | Starting detection process: 22
frigate    | {'streams': [{'index': 0, 'codec_name': 'h264', 'codec_long_name': 'H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10', 'profile': 'Main', 'codec_type': 'video', 'codec_time_base': '1/10', 'codec_tag_string': '[0][0][0][0]', 'codec_tag': '0x0000', 'width': 1280, 'height': 704, 'coded_width': 1280, 'coded_height': 704, 'has_b_frames': 0, 'pix_fmt': 'yuv420p', 'level': 31, 'chroma_location': 'left', 'field_order': 'progressive', 'refs': 1, 'is_avc': 'false', 'nal_length_size': '0', 'r_frame_rate': '5/1', 'avg_frame_rate': '5/1', 'time_base': '1/90000', 'start_pts': 126000, 'start_time': '1.400000', 'bits_per_raw_sample': '8', 'disposition': {'default': 0, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}}, {'index': 1, 'codec_name': 'aac', 'codec_long_name': 'AAC (Advanced Audio Coding)', 'codec_type': 'audio', 'codec_time_base': '1/16000', 'codec_tag_string': '[0][0][0][0]', 'codec_tag': '0x0000', 'sample_fmt': 'fltp', 'sample_rate': '16000', 'channels': 1, 'channel_layout': 'mono', 'bits_per_sample': 0, 'r_frame_rate': '0/0', 'avg_frame_rate': '0/0', 'time_base': '1/16000', 'disposition': {'default': 0, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}}]}
frigate    | Creating ffmpeg process...
frigate    | ffmpeg -hide_banner -loglevel debug -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts+discardcorrupt -vsync drop -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://192.168.0.xxx:xxx/h264?username=xxx&password=xxx -f rawvideo -pix_fmt rgb24 pipe:
frigate    | Camera_process started for front: 35
frigate    | Starting process for front: 35
frigate    |  * Serving Flask app "detect_objects" (lazy loading)
frigate    |  * Environment: production
frigate    |    WARNING: Do not use the development server in a production environment.
frigate    |    Use a production WSGI server instead.
frigate    |  * Debug mode: off
frigate    | Splitting the commandline.
frigate    | Reading option '-hide_banner' ... matched as option 'hide_banner' (do not show program banner) with argument '1'.
frigate    | Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
frigate    | Reading option '-avoid_negative_ts' ... matched as AVOption 'avoid_negative_ts' with argument 'make_zero'.
frigate    | Reading option '-fflags' ... matched as AVOption 'fflags' with argument 'nobuffer'.
frigate    | Reading option '-flags' ... matched as AVOption 'flags' with argument 'low_delay'.
frigate    | Reading option '-strict' ...Routing option strict to both codec and muxer layer
frigate    |  matched as AVOption 'strict' with argument 'experimental'.
frigate    | Reading option '-fflags' ... matched as AVOption 'fflags' with argument '+genpts+discardcorrupt'.
frigate    | Reading option '-vsync' ... matched as option 'vsync' (video sync method) with argument 'drop'.
frigate    | Reading option '-rtsp_transport' ... matched as AVOption 'rtsp_transport' with argument 'tcp'.
frigate    | Reading option '-stimeout' ... matched as AVOption 'stimeout' with argument '5000000'.
frigate    | Reading option '-use_wallclock_as_timestamps' ... matched as AVOption 'use_wallclock_as_timestamps' with argument '1'.
frigate    | Reading option '-i' ... matched as input url with argument 'rtsp://192.168.0.xxx:xxx/h264?username=xxx&password=xxx'.
frigate    | Reading option '-f' ... matched as option 'f' (force format) with argument 'rawvideo'.
frigate    | Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel format) with argument 'rgb24'.
frigate    | Reading option 'pipe:' ... matched as output url.
frigate    | Finished splitting the commandline.
frigate    | Parsing a group of options: global .
frigate    | Applying option hide_banner (do not show program banner) with argument 1.
frigate    | Applying option loglevel (set logging level) with argument debug.
frigate    | Applying option vsync (video sync method) with argument drop.
frigate    | Successfully parsed a group of options.
frigate    | Parsing a group of options: input url rtsp://192.168.0.xxx:xxx/h264?username=xxx&password=xxx.
frigate    | Successfully parsed a group of options.
frigate    | Opening an input file: rtsp://192.168.0.xxx:xxx/h264?username=xxx&password=xxx.
frigate    | [tcp @ 0xf6c4b0] No default whitelist set
frigate    | [tcp @ 0xf6c4b0] Original list of addresses:
frigate    | [tcp @ 0xf6c4b0] Address 192.168.0.33 port 554
frigate    | [tcp @ 0xf6c4b0] Interleaved list of addresses:
frigate    | [tcp @ 0xf6c4b0] Address 192.168.0.33 port 554
frigate    | [tcp @ 0xf6c4b0] Starting connection attempt to 192.168.0.33 port 554
frigate    | [tcp @ 0xf6c4b0] Successfully connected to 192.168.0.33 port 554
frigate    | [rtsp @ 0xf6a390] SDP:
frigate    | v=0
frigate    | o=- 1109162014219182 1109162014219192 IN IP4 x.y.z.w
frigate    | s=RTSP/RTP stream from anjvision ipcamera
frigate    | e=NONE
frigate    | c=IN IP4 0.0.0.0
frigate    | a=tool:LIVE555 Streaming Media v2011.05.25 CHAM.LI@ANJVISION.COM
frigate    | t=0 0
frigate    | a=range:npt=0-
frigate    | a=control:*
frigate    | m=video 0 RTP/AVP 96
frigate    | a=rtpmap:96 H264/90000
frigate    | a=control:trackID=1
frigate    | a=fmtp:96 profile-level-id=4D401F;packetization-mode=0;sprop-parameter-sets=Z01AH6aAUAWaEAAAPpAAAnGgQA==,aO48gA==;config=00000001674d401fa68050059a1000003e90000271a0400000000168ee3c80
frigate    | a=x-dimensions: 1280, 720
frigate    | a=x-framerate: 5
frigate    | m=audio 0 RTP/AVP 0
frigate    | a=rtpmap:0 MPEG4-GENERIC/16000/2
frigate    | a=fmtp:0 config=1408
frigate    | a=control:trackID=2
frigate    | a=Media_header:MEDIAINFO=494D4B48010100000400010010710110401F000000FA000000000000000000000000000000000000;
frigate    | a=appversion:1.0
frigate    | 
frigate    | Failed to parse interval end specification ''
frigate    | [rtsp @ 0xf6a390] video codec set to: h264
frigate    | [rtsp @ 0xf6a390] RTP Profile IDC: 4d Profile IOP: 40 Level: 1f
frigate    | [rtsp @ 0xf6a390] RTP Packetization Mode: 0
frigate    | [rtsp @ 0xf6a390] Extradata set to 0xf6dbe8 (size: 31)
frigate    | [rtsp @ 0xf6a390] audio codec set to: aac
frigate    | [rtsp @ 0xf6a390] audio samplerate set to: 16000
frigate    | [rtsp @ 0xf6a390] audio channels set to: 2
frigate    | [rtsp @ 0xf6a390] setting jitter buffer size to 0
frigate    |     Last message repeated 1 times
frigate    | [rtsp @ 0xf6a390] hello state=0
frigate    | Failed to parse interval end specification ''
frigate    | [h264 @ 0xf6d720] nal_unit_type: 7(SPS), nal_ref_idc: 3
frigate    | [h264 @ 0xf6d720] nal_unit_type: 8(PPS), nal_ref_idc: 3
frigate    | [h264 @ 0xf6d720] nal_unit_type: 7(SPS), nal_ref_idc: 3
frigate    | [h264 @ 0xf6d720] nal_unit_type: 8(PPS), nal_ref_idc: 3
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0xf6d720] nal_unit_type: 7(SPS), nal_ref_idc: 3
frigate    | [h264 @ 0xf6d720] nal_unit_type: 8(PPS), nal_ref_idc: 3
frigate    | [h264 @ 0xf6d720] nal_unit_type: 5(IDR), nal_ref_idc: 3
frigate    | [h264 @ 0xf6d720] Format yuv420p chosen by get_format().
frigate    | [h264 @ 0xf6d720] Reinit context to 1280x704, pix_fmt: yuv420p
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0xf6d720] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0xf6d720] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0xf6d720] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0xf6d720] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0xf6d720] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0xf6d720] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 65 times
frigate    | [rtsp @ 0xf6a390] max_analyze_duration 5000000 reached at 5000000 microseconds st:0
frigate    | [rtsp @ 0xf6a390] rfps: 4.916667 0.015962
frigate    | [rtsp @ 0xf6a390] rfps: 5.000000 0.001622
frigate    |     Last message repeated 1 times
frigate    | [rtsp @ 0xf6a390] rfps: 5.083333 0.016173
frigate    | [rtsp @ 0xf6a390] rfps: 10.000000 0.006487
frigate    | [rtsp @ 0xf6a390] rfps: 15.000000 0.014596
frigate    | [rtsp @ 0xf6a390] rfps: 14.985015 0.015006
frigate    | Input #0, rtsp, from 'rtsp://192.168.0.xxx:xxx/h264?username=xxx&password=xxx':
frigate    |   Metadata:
frigate    |     title           : RTSP/RTP stream from anjvision ipcamera
frigate    |   Duration: N/A, start: 1605601998.257122, bitrate: N/A
frigate    |     Stream #0:0, 27, 1/90000: Video: h264 (Main), 1 reference frame, yuv420p(progressive, left), 1280x704, 0/1, 5 fps, 5 tbr, 90k tbn, 10 tbc
frigate    |     Stream #0:1, 0, 1/16000: Audio: aac, 16000 Hz, mono, fltp
frigate    | Successfully opened the file.
frigate    | Parsing a group of options: output url pipe:.
frigate    | Applying option f (force format) with argument rawvideo.
frigate    | Applying option pix_fmt (set pixel format) with argument rgb24.
frigate    | Successfully parsed a group of options.
frigate    | Opening an output file: pipe:.
frigate    | [pipe @ 0xfbc770] Setting default whitelist 'crypto'
frigate    | Successfully opened the file.
frigate    | detected 4 logical cores
frigate    | [h264 @ 0x100d660] nal_unit_type: 7(SPS), nal_ref_idc: 3
frigate    | [h264 @ 0x100d660] nal_unit_type: 8(PPS), nal_ref_idc: 3
frigate    | Stream mapping:
frigate    |   Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native))
frigate    | Press [q] to stop, [?] for help
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | [h264 @ 0x100d660] Format yuv420p chosen by get_format().
frigate    | [h264 @ 0x100d660] Reinit context to 1280x704, pix_fmt: yuv420p
frigate    | [h264 @ 0x100d660] Frame num gap 28 26
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 3 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 1 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
cur_dts is invalid (this is harmless if it occurs once at the start per stream)trate=  -0.0kbits/s speed=N/A    
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 3 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
cur_dts is invalid (this is harmless if it occurs once at the start per stream)trate=  -0.0kbits/s speed=N/A    
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
cur_dts is invalid (this is harmless if it occurs once at the start per stream)trate=  -0.0kbits/s speed=N/A    
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 3 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
cur_dts is invalid (this is harmless if it occurs once at the start per stream)trate=  -0.0kbits/s speed=N/A    
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
cur_dts is invalid (this is harmless if it occurs once at the start per stream)trate=  -0.0kbits/s speed=N/A    
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 3 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
cur_dts is invalid (this is harmless if it occurs once at the start per stream)trate=  -0.0kbits/s speed=N/A    
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
cur_dts is invalid (this is harmless if it occurs once at the start per stream)trate=  -0.0kbits/s speed=N/A    
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
cur_dts is invalid (this is harmless if it occurs once at the start per stream)trate=  -0.0kbits/s speed=N/A    
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 3 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 1 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
cur_dts is invalid (this is harmless if it occurs once at the start per stream)trate=  -0.0kbits/s speed=N/A    
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 3 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
cur_dts is invalid (this is harmless if it occurs once at the start per stream)trate=  -0.0kbits/s speed=N/A    
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
cur_dts is invalid (this is harmless if it occurs once at the start per stream)trate=  -0.0kbits/s speed=N/A    
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 3 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 1 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 3 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
cur_dts is invalid (this is harmless if it occurs once at the start per stream)trate=  -0.0kbits/s speed=N/A    
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
cur_dts is invalid (this is harmless if it occurs once at the start per stream)trate=  -0.0kbits/s speed=N/A    
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 3 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
cur_dts is invalid (this is harmless if it occurs once at the start per stream)trate=  -0.0kbits/s speed=N/A    
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 1 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 3 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
cur_dts is invalid (this is harmless if it occurs once at the start per stream)trate=  -0.0kbits/s speed=N/A    
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
cur_dts is invalid (this is harmless if it occurs once at the start per stream)trate=  -0.0kbits/s speed=N/A    
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 3 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
frigate    | cur_dts is invalid (this is harmless if it occurs once at the start per stream)
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
cur_dts is invalid (this is harmless if it occurs once at the start per stream)trate=  -0.0kbits/s speed=N/A    
frigate    | [rtsp @ 0xf6a390] Error parsing AU headers
frigate    |     Last message repeated 2 times
frigate    | [h264 @ 0x100d660] nal_unit_type: 7(SPS), nal_ref_idc: 3
frigate    | [h264 @ 0x100d660] nal_unit_type: 8(PPS), nal_ref_idc: 3
frigate    | [h264 @ 0x100d660] nal_unit_type: 5(IDR), nal_ref_idc: 3
frigate    | [graph 0 input from stream 0:0 @ 0xf9afa0] Setting 'video_size' to value '1280x704'
frigate    | [graph 0 input from stream 0:0 @ 0xf9afa0] Setting 'pix_fmt' to value '0'
frigate    | [graph 0 input from stream 0:0 @ 0xf9afa0] Setting 'time_base' to value '1/90000'
frigate    | [graph 0 input from stream 0:0 @ 0xf9afa0] Setting 'pixel_aspect' to value '0/1'
frigate    | [graph 0 input from stream 0:0 @ 0xf9afa0] Setting 'sws_param' to value 'flags=2'
frigate    | [graph 0 input from stream 0:0 @ 0xf9afa0] Setting 'frame_rate' to value '5/1'
frigate    | [graph 0 input from stream 0:0 @ 0xf9afa0] w:1280 h:704 pixfmt:yuv420p tb:1/90000 fr:5/1 sar:0/1 sws_param:flags=2
frigate    | [format @ 0xf96d00] Setting 'pix_fmts' to value 'rgb24'
frigate    | [auto_scaler_0 @ 0xf87c20] Setting 'flags' to value 'bicubic'
frigate    | [auto_scaler_0 @ 0xf87c20] w:iw h:ih flags:'bicubic' interl:0
frigate    | [format @ 0xf96d00] auto-inserting filter 'auto_scaler_0' between the filter 'Parsed_null_0' and the filter 'format'
frigate    | [AVFilterGraph @ 0x1008af0] query_formats: 4 queried, 2 merged, 1 already done, 0 delayed
frigate    | [swscaler @ 0x109a270] No accelerated colorspace conversion found from yuv420p to rgb24.
frigate    | [auto_scaler_0 @ 0xf87c20] w:1280 h:704 fmt:yuv420p sar:0/1 -> w:1280 h:704 fmt:rgb24 sar:0/1 flags:0x4
frigate    | Output #0, rawvideo, to 'pipe:':
frigate    |   Metadata:
frigate    |     title           : RTSP/RTP stream from anjvision ipcamera
frigate    |     encoder         : Lavf58.20.100
frigate    |     Stream #0:0, 0, 1/5: Video: rawvideo, 1 reference frame (RGB[24] / 0x18424752), rgb24(left), 1280x704, 0/1, q=2-31, 108134 kb/s, 5 fps, 5 tbn, 5 tbc
frigate    |     Metadata:
frigate    |       encoder         : Lavc58.35.100 rawvideo

ffprobe rtsp://XXX:XXX@192.168.0.XXX:XXX/h264

ffprobe version 4.1.4-1+rpt7~deb10u1 Copyright (c) 2007-2019 the FFmpeg developers
  built with gcc 8 (Raspbian 8.3.0-6+rpi1)
  configuration: --prefix=/usr --extra-version='1+rpt7~deb10u1' --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --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-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared --libdir=/usr/lib/arm-linux-gnueabihf --cpu=arm1176jzf-s --arch=arm
  WARNING: library configuration mismatch
  avutil      configuration: --prefix=/usr --extra-version='1+rpt7~deb10u1' --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --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-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
  avcodec     configuration: --prefix=/usr --extra-version='1+rpt7~deb10u1' --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --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-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
  avformat    configuration: --prefix=/usr --extra-version='1+rpt7~deb10u1' --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --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-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
  avdevice    configuration: --prefix=/usr --extra-version='1+rpt7~deb10u1' --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --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-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
  avfilter    configuration: --prefix=/usr --extra-version='1+rpt7~deb10u1' --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --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-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
  avresample  configuration: --prefix=/usr --extra-version='1+rpt7~deb10u1' --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --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-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
  swscale     configuration: --prefix=/usr --extra-version='1+rpt7~deb10u1' --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --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-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
  swresample  configuration: --prefix=/usr --extra-version='1+rpt7~deb10u1' --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --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-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
  postproc    configuration: --prefix=/usr --extra-version='1+rpt7~deb10u1' --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --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-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --libdir=/usr/lib/arm-linux-gnueabihf/neon/vfp --cpu=cortex-a7 --arch=armv6t2 --disable-thumb --enable-shared --disable-doc --disable-programs
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
[rtsp @ 0xe49a00] Error parsing AU headers
    Last message repeated 10 times
[rtsp @ 0xe49a00] max delay reached. need to consume packet
[rtsp @ 0xe49a00] RTP: missed 146 packets
[h264 @ 0xe4cd10] error while decoding MB 77 8, bytestream -48
[h264 @ 0xe4cd10] concealing 2852 DC, 2852 AC, 2852 MV errors in I frame
[rtsp @ 0xe49a00] Error parsing AU headers
    Last message repeated 78 times
Input #0, rtsp, from 'rtsp://XXX:XXX@192.168.0.XXX:XXX/h264':
  Metadata:
    title           : RTSP/RTP stream from anjvision ipcamera
  Duration: N/A, start: 1.400000, bitrate: N/A
    Stream #0:0: Video: h264 (Main), yuv420p(progressive), 1280x704, 5 fps, 5 tbr, 90k tbn, 10 tbc
    Stream #0:1: Audio: aac, 16000 Hz, mono, fltp

Config

web_port: 5000

mqtt:
  host: 192.168.0.xxx
  port: 1883
  topic_prefix: xxx
  user: hassmqtt # Optional
  password: xxxx # Optional

ffmpeg:
  global_args:
    - -hide_banner
    - -loglevel
    - debug

objects:
  track:
    - person
  filters:
    person:
      min_area: 5000
      max_area: 100000
      threshold: 0.85

cameras:
  front:
    ffmpeg:
      input: rtsp://192.168.0.xxx:xxx/h264?username=xxx&password=xxx
    mask: front-mask.bmp
    take_frame: 1

    snapshots:
      show_timestamp: True
      draw_zones: False

    objects:
      track:
        - person
      filters:
        person:
          min_area: 5000
          max_area: 100000
          threshold: 0.85
blakeblackshear commented 3 years ago

Try the new version with this config:

web_port: 5000

mqtt:
  host: 192.168.0.160
  port: 1883
  topic_prefix: frigate
  user: hassio_mqtt_user # Optional
  password: hassio_mqtt_passwd # Optional

save_clips:
  max_seconds: 180 #3 minutes
  clips_dir: /clips
  cache_dir: /cache

objects:
  track:
    - person
  filters:
    person:
      min_area: 5000
      max_area: 100000
      threshold: 0.85

cameras:
  front:
    ffmpeg:
      input: rtsp://192.168.0.xxx:xxx/h264?username=xxx&password=xxx
    fps: 5
    mask: front-mask.bmp

    mqtt:
      crop_to_region: True

    save_clips:
      enabled: False
      pre_capture: 10

    snapshots:
      show_timestamp: True
      draw_zones: False
      draw_bounding_boxes: True

    objects:
      track:
        - person
      filters:
        person:
          min_area: 5000
          max_area: 100000
          min_score: 0.5
          threshold: 0.85
Hogster commented 3 years ago

This is the log with your above config...

$ docker-compose up
Starting frigate-stable ... done
Attaching to frigate-stable
frigate-stable | On connect called
frigate-stable | ffprobe -v panic -show_error -show_streams -of json "rtsp://xxx:xxx@192.168.0.xxx:xxx/h264"
frigate-stable | Starting detection process: 12
frigate-stable | Attempting to load TPU as usb
frigate-stable | TPU found
frigate-stable | {'streams': [{'index': 0, 'codec_name': 'h264', 'codec_long_name': 'unknown', 'profile': '77', 'codec_type': 'video', 'codec_time_base': '1/10', 'codec_tag_string': '[0][0][0][0]', 'codec_tag': '0x0000', 'width': 1280, 'height': 704, 'coded_width': 1280, 'coded_height': 704, 'closed_captions': 0, 'has_b_frames': 0, 'pix_fmt': 'yuv420p', 'level': 31, 'chroma_location': 'left', 'field_order': 'progressive', 'refs': 1, 'is_avc': 'false', 'nal_length_size': '0', 'r_frame_rate': '5/1', 'avg_frame_rate': '5/1', 'time_base': '1/90000', 'start_pts': 126000, 'start_time': '1.400000', 'bits_per_raw_sample': '8', 'disposition': {'default': 0, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}}, {'index': 1, 'codec_name': 'aac', 'codec_long_name': 'unknown', 'codec_type': 'audio', 'codec_time_base': '1/16000', 'codec_tag_string': '[0][0][0][0]', 'codec_tag': '0x0000', 'sample_fmt': 'fltp', 'sample_rate': '16000', 'channels': 1, 'channel_layout': 'mono', 'bits_per_sample': 0, 'r_frame_rate': '0/0', 'avg_frame_rate': '0/0', 'time_base': '1/16000', 'disposition': {'default': 0, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}}]}
frigate-stable | Camera capture process started for front: 23
frigate-stable | Creating ffmpeg process...
frigate-stable | ffmpeg -hide_banner -loglevel panic -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://xxx:xxx@192.168.0.xxx:xxx/h264 -r 5 -f rawvideo -pix_fmt yuv420p pipe:
frigate-stable | Camera process started for front: 24
frigate-stable |  * Serving Flask app "detect_objects" (lazy loading)
frigate-stable |  * Environment: development
frigate-stable |  * Debug mode: off
frigate-stable | No frames received from front in 5 seconds. Exiting ffmpeg...
frigate-stable | Waiting for ffmpeg to exit gracefully...
frigate-stable | front: ffmpeg sent a broken frame. something is wrong.
frigate-stable | front: ffmpeg process is not running. exiting capture thread...
frigate-stable | Creating ffmpeg process...
frigate-stable | ffmpeg -hide_banner -loglevel panic -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://xxx:xxx@192.168.0.xxx:xxx/h264 -r 5 -f rawvideo -pix_fmt yuv420p pipe:
frigate-stable | No frames received from front in 5 seconds. Exiting ffmpeg...
frigate-stable | Waiting for ffmpeg to exit gracefully...
frigate-stable | front: ffmpeg sent a broken frame. something is wrong.
frigate-stable | front: ffmpeg process is not running. exiting capture thread...
frigate-stable | Creating ffmpeg process...
frigate-stable | ffmpeg -hide_banner -loglevel panic -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://xxx:xxx@192.168.0.xxx:xxx/h264 -r 5 -f rawvideo -pix_fmt yuv420p pipe:
frigate-stable | No frames received from front in 5 seconds. Exiting ffmpeg...
frigate-stable | Waiting for ffmpeg to exit gracefully...
frigate-stable | front: ffmpeg sent a broken frame. something is wrong.
frigate-stable | front: ffmpeg sent a broken frame. something is wrong.
frigate-stable | front: ffmpeg sent a broken frame. something is wrong.
frigate-stable | front: ffmpeg sent a broken frame. something is wrong.
frigate-stable | front: ffmpeg sent a broken frame. something is wrong.
frigate-stable | front: ffmpeg process is not running. exiting capture thread...
frigate-stable | Creating ffmpeg process...
blakeblackshear commented 3 years ago

Hmm. Add back ffmpeg logging to see what it says now:

web_port: 5000

mqtt:
  host: 192.168.0.160
  port: 1883
  topic_prefix: frigate
  user: hassio_mqtt_user # Optional
  password: hassio_mqtt_passwd # Optional

save_clips:
  max_seconds: 180 #3 minutes
  clips_dir: /clips
  cache_dir: /cache

objects:
  track:
    - person
  filters:
    person:
      min_area: 5000
      max_area: 100000
      threshold: 0.85

ffmpeg:
  global_args:
    - -hide_banner
    - -loglevel
    - info

cameras:
  front:
    ffmpeg:
      input: rtsp://192.168.0.xxx:xxx/h264?username=xxx&password=xxx
    fps: 5
    mask: front-mask.bmp

    mqtt:
      crop_to_region: True

    save_clips:
      enabled: False
      pre_capture: 10

    snapshots:
      show_timestamp: True
      draw_zones: False
      draw_bounding_boxes: True

    objects:
      track:
        - person
      filters:
        person:
          min_area: 5000
          max_area: 100000
          min_score: 0.5
          threshold: 0.85
Hogster commented 3 years ago

Thanks for your swift response.

Please see below:

$ docker-compose up
Starting frigate-stable ... done
Attaching to frigate-stable
frigate-stable | ffprobe -v panic -show_error -show_streams -of json "rtsp://xxx:xxx@192.168.0.xxx:xxx/h264"
frigate-stable | Starting detection process: 13
frigate-stable | Attempting to load TPU as usb
frigate-stable | On connect called
frigate-stable | TPU found
frigate-stable | {'streams': [{'index': 0, 'codec_name': 'h264', 'codec_long_name': 'unknown', 'profile': '77', 'codec_type': 'video', 'codec_time_base': '1/10', 'codec_tag_string': '[0][0][0][0]', 'codec_tag': '0x0000', 'width': 1280, 'height': 704, 'coded_width': 1280, 'coded_height': 704, 'closed_captions': 0, 'has_b_frames': 0, 'pix_fmt': 'yuv420p', 'level': 31, 'chroma_location': 'left', 'field_order': 'progressive', 'refs': 1, 'is_avc': 'false', 'nal_length_size': '0', 'r_frame_rate': '5/1', 'avg_frame_rate': '5/1', 'time_base': '1/90000', 'start_pts': 126000, 'start_time': '1.400000', 'bits_per_raw_sample': '8', 'disposition': {'default': 0, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}}, {'index': 1, 'codec_name': 'aac', 'codec_long_name': 'unknown', 'codec_type': 'audio', 'codec_time_base': '1/16000', 'codec_tag_string': '[0][0][0][0]', 'codec_tag': '0x0000', 'sample_fmt': 'fltp', 'sample_rate': '16000', 'channels': 1, 'channel_layout': 'mono', 'bits_per_sample': 0, 'r_frame_rate': '0/0', 'avg_frame_rate': '0/0', 'time_base': '1/16000', 'disposition': {'default': 0, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}}]}
frigate-stable | Camera capture process started for front: 24
frigate-stable | Creating ffmpeg process...
frigate-stable | ffmpeg -hide_banner -loglevel info -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://xxx:xxx@192.168.0.xxx:xxx/h264 -r 5 -f rawvideo -pix_fmt yuv420p pipe:
frigate-stable | Camera process started for front: 25
frigate-stable |  * Serving Flask app "detect_objects" (lazy loading)
frigate-stable |  * Environment: development
frigate-stable |  * Debug mode: off
frigate-stable | [rtsp @ 0x10d2520] Error parsing AU headers
frigate-stable |     Last message repeated 86 times
frigate-stable | Input #0, rtsp, from 'rtsp://xxx:xxx@192.168.0.xxx:xxx/h264':
frigate-stable |   Metadata:
frigate-stable |     title           : RTSP/RTP stream from anjvision ipcamera
frigate-stable |   Duration: N/A, start: 1605621018.877533, bitrate: N/A
frigate-stable |     Stream #0:0: Video: h264, yuv420p(progressive), 1280x704, 5 fps, 5 tbr, 90k tbn, 10 tbc
frigate-stable |     Stream #0:1: Audio: aac, 16000 Hz, mono, fltp
frigate-stable | Stream mapping:
frigate-stable |   Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native))
frigate-stable | Press [q] to stop, [?] for help
frigate-stable | [rtsp @ 0x10d2520] Error parsing AU headers
frigate-stable |     Last message repeated 12 times
[rtsp @ 0x10d2520] Error parsing AU headerssize=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
frigate-stable |     Last message repeated 8 times
[rtsp @ 0x10d2520] Error parsing AU headerssize=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
frigate-stable |     Last message repeated 8 times
[rtsp @ 0x10d2520] Error parsing AU headerssize=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
frigate-stable |     Last message repeated 9 times
[rtsp @ 0x10d2520] Error parsing AU headerssize=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
frigate-stable |     Last message repeated 8 times
[rtsp @ 0x10d2520] Error parsing AU headerssize=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
frigate-stable |     Last message repeated 8 times
[rtsp @ 0x10d2520] Error parsing AU headerssize=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
frigate-stable | No frames received from front in 5 seconds. Exiting ffmpeg...
frigate-stable | Waiting for ffmpeg to exit gracefully...
frigate-stable |     Last message repeated 3 times
frigate-stable | Finishing stream 0:0 without any data written to it.
frigate-stable | Output #0, rawvideo, to 'pipe:':
frigate-stable |   Metadata:
frigate-stable |     title           : RTSP/RTP stream from anjvision ipcamera
frigate-stable |     encoder         : Lavf58.45.100
frigate-stable |     Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1280x704, q=2-31, 54067 kb/s, 5 fps, 5 tbn, 5 tbc
frigate-stable |     Metadata:
frigate-stable |       encoder         : Lavc58.91.100 rawvideo
frigate-stable | frame=    0 fps=0.0 q=0.0 Lsize=       0kB time=00:00:00.00 bitrate=N/A speed=   0x    
frigate-stable | video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
frigate-stable | Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
frigate-stable | Exiting normally, received signal 15.
frigate-stable | front: ffmpeg sent a broken frame. something is wrong.
frigate-stable | front: ffmpeg process is not running. exiting capture thread...
frigate-stable | Creating ffmpeg process...
frigate-stable | ffmpeg -hide_banner -loglevel info -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://xxx:xxx@192.168.0.xxx:xxx/h264 -r 5 -f rawvideo -pix_fmt yuv420p pipe:
frigate-stable | [rtsp @ 0x18bb520] Error parsing AU headers
frigate-stable |     Last message repeated 87 times
frigate-stable | Input #0, rtsp, from 'rtsp://xxx:xxx@192.168.0.xxx:xxx/h264':
frigate-stable |   Metadata:
frigate-stable |     title           : RTSP/RTP stream from anjvision ipcamera
frigate-stable |   Duration: N/A, start: 1605621039.080911, bitrate: N/A
frigate-stable |     Stream #0:0: Video: h264, yuv420p(progressive), 1280x704, 5 fps, 5 tbr, 90k tbn, 10 tbc
frigate-stable |     Stream #0:1: Audio: aac, 16000 Hz, mono, fltp
frigate-stable | Stream mapping:
frigate-stable |   Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native))
frigate-stable | Press [q] to stop, [?] for help
frigate-stable | [rtsp @ 0x18bb520] Error parsing AU headers
frigate-stable |     Last message repeated 11 times
[rtsp @ 0x18bb520] Error parsing AU headerssize=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
frigate-stable |     Last message repeated 9 times
[rtsp @ 0x18bb520] Error parsing AU headerssize=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
frigate-stable |     Last message repeated 8 times
[rtsp @ 0x18bb520] Error parsing AU headerssize=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
frigate-stable |     Last message repeated 9 times
[rtsp @ 0x18bb520] Error parsing AU headerssize=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
frigate-stable |     Last message repeated 8 times
[rtsp @ 0x18bb520] Error parsing AU headerssize=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
frigate-stable |     Last message repeated 8 times
[rtsp @ 0x18bb520] Error parsing AU headerssize=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
frigate-stable | No frames received from front in 5 seconds. Exiting ffmpeg...
frigate-stable | Waiting for ffmpeg to exit gracefully...
frigate-stable |     Last message repeated 2 times
frigate-stable | Finishing stream 0:0 without any data written to it.
frigate-stable | Output #0, rawvideo, to 'pipe:':
frigate-stable |   Metadata:
frigate-stable |     title           : RTSP/RTP stream from anjvision ipcamera
frigate-stable |     encoder         : Lavf58.45.100
frigate-stable |     Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1280x704, q=2-31, 54067 kb/s, 5 fps, 5 tbn, 5 tbc
frigate-stable |     Metadata:
frigate-stable |       encoder         : Lavc58.91.100 rawvideo
frigate-stable | frame=    0 fps=0.0 q=0.0 Lsize=       0kB time=00:00:00.00 bitrate=N/A speed=   0x    
frigate-stable | video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
frigate-stable | Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
frigate-stable | Exiting normally, received signal 15.
frigate-stable | front: ffmpeg sent a broken frame. something is wrong.
frigate-stable | front: ffmpeg sent a broken frame. something is wrong.
frigate-stable | front: ffmpeg sent a broken frame. something is wrong.
frigate-stable | front: ffmpeg process is not running. exiting capture thread...
blakeblackshear commented 3 years ago

I think its something to do with the Error parsing AU headers messages. Try adding -vsync drop (this breaks save_clips) to see if it works.

web_port: 5000

mqtt:
  host: 192.168.0.160
  port: 1883
  topic_prefix: frigate
  user: hassio_mqtt_user # Optional
  password: hassio_mqtt_passwd # Optional

save_clips:
  max_seconds: 180 #3 minutes
  clips_dir: /clips
  cache_dir: /cache

objects:
  track:
    - person
  filters:
    person:
      min_area: 5000
      max_area: 100000
      threshold: 0.85

ffmpeg:
  global_args:
    - -hide_banner
    - -loglevel
    - info
  input_args:
    - -avoid_negative_ts
    - make_zero
    - -fflags
    - nobuffer
    - -flags
    - low_delay
    - -strict
    - experimental
    - -fflags
    - +genpts+discardcorrupt
    - -rtsp_transport
    - tcp
    - -stimeout
    - '5000000'
    - -use_wallclock_as_timestamps
    - '1'
    - -vsync
    - drop

cameras:
  front:
    ffmpeg:
      input: rtsp://192.168.0.xxx:xxx/h264?username=xxx&password=xxx
    fps: 5
    mask: front-mask.bmp

    mqtt:
      crop_to_region: True

    save_clips:
      enabled: False
      pre_capture: 10

    snapshots:
      show_timestamp: True
      draw_zones: False
      draw_bounding_boxes: True

    objects:
      track:
        - person
      filters:
        person:
          min_area: 5000
          max_area: 100000
          min_score: 0.5
          threshold: 0.85
tubalainen commented 3 years ago

I do have the same experience with broken frames and "camera restarts". I have not reported it because after like 30 minutes and multiple restarts of each camera instance settles down and the errors and restarts disappears or goes back to one every day or so.

I have now enabled:

ffmpeg:
  global_args:
    - -vsync
    - drop

With the following attached textfile as log output (lots of rows). dump.txt

tubalainen commented 3 years ago

Can this be a timing issue related to too many dropped key frames in the stream? (just me guessing here).

blakeblackshear commented 3 years ago

You can't put -vsync drop in the global args like that. It will override the default global args. It should be added to the list of default input args. I guess it could be a timing issue if your iframe rate is set to 5x or more of your FPS, but that seems like a very long time to wait for a keyframe. You could also try disabling or switching the audio codec on the camera itself. I saw a few ffmpeg issues elsewhere that said it may be linked to the audio stream.

Hogster commented 3 years ago

I'll try the above but as you mentioned about audio, I've tried that as well. In my problem searching I found something about ffmpeg and audio so I tried both switching to G711 and turning off audio completely but the problem persisted so I don't believe it is correlated.

I'll be back with the outcome and I'll also try and just run it for a while and see if I get the same result as @tubalainen

Thanks for your support!

Hogster commented 3 years ago

No I tried with the -vsync drop and the logs looks the same (see below)...

I'll leave it on and see if it will eventually start.

docker-compose up
Starting frigate-stable ... done
Attaching to frigate-stable
frigate-stable | ffprobe -v panic -show_error -show_streams -of json "rtsp://xxx:xxx@192.168.0.xxx:xxx/h264"
frigate-stable | Starting detection process: 12
frigate-stable | Attempting to load TPU as usb
frigate-stable | On connect called
frigate-stable | TPU found
frigate-stable | {'streams': [{'index': 0, 'codec_name': 'h264', 'codec_long_name': 'unknown', 'profile': '77', 'codec_type': 'video', 'codec_time_base': '1/10', 'codec_tag_string': '[0][0][0][0]', 'codec_tag': '0x0000', 'width': 1280, 'height': 704, 'coded_width': 1280, 'coded_height': 704, 'closed_captions': 0, 'has_b_frames': 0, 'pix_fmt': 'yuv420p', 'level': 31, 'chroma_location': 'left', 'field_order': 'progressive', 'refs': 1, 'is_avc': 'false', 'nal_length_size': '0', 'r_frame_rate': '5/1', 'avg_frame_rate': '5/1', 'time_base': '1/90000', 'start_pts': 126000, 'start_time': '1.400000', 'bits_per_raw_sample': '8', 'disposition': {'default': 0, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}}, {'index': 1, 'codec_name': 'aac', 'codec_long_name': 'unknown', 'codec_type': 'audio', 'codec_time_base': '1/16000', 'codec_tag_string': '[0][0][0][0]', 'codec_tag': '0x0000', 'sample_fmt': 'fltp', 'sample_rate': '16000', 'channels': 1, 'channel_layout': 'mono', 'bits_per_sample': 0, 'r_frame_rate': '0/0', 'avg_frame_rate': '0/0', 'time_base': '1/16000', 'disposition': {'default': 0, 'dub': 0, 'original': 0, 'comment': 0, 'lyrics': 0, 'karaoke': 0, 'forced': 0, 'hearing_impaired': 0, 'visual_impaired': 0, 'clean_effects': 0, 'attached_pic': 0, 'timed_thumbnails': 0}}]}
frigate-stable | Camera capture process started for front: 23
frigate-stable | Creating ffmpeg process...
frigate-stable | ffmpeg -hide_banner -loglevel info -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -vsync drop -i rtsp://xxx:xxx@192.168.0.xxx:xxx/h264 -r 5 -f rawvideo -pix_fmt yuv420p pipe:
frigate-stable | Camera process started for front: 25
frigate-stable |  * Serving Flask app "detect_objects" (lazy loading)
frigate-stable |  * Environment: development
frigate-stable |  * Debug mode: off
frigate-stable | [rtsp @ 0x1f60560] Error parsing AU headers
frigate-stable |     Last message repeated 87 times
frigate-stable | Input #0, rtsp, from 'rtsp://xxx:xxx@192.168.0.xxx:xxx/h264':
frigate-stable |   Metadata:
frigate-stable |     title           : RTSP/RTP stream from anjvision ipcamera
frigate-stable |   Duration: N/A, start: 1605688646.968733, bitrate: N/A
frigate-stable |     Stream #0:0: Video: h264, yuv420p(progressive), 1280x704, 5 fps, 5 tbr, 90k tbn, 10 tbc
frigate-stable |     Stream #0:1: Audio: aac, 16000 Hz, mono, fltp
frigate-stable | Stream mapping:
frigate-stable |   Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native))
frigate-stable | Press [q] to stop, [?] for help
frigate-stable | [rtsp @ 0x1f60560] Error parsing AU headers
frigate-stable |     Last message repeated 12 times
[rtsp @ 0x1f60560] Error parsing AU headerssize=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
frigate-stable |     Last message repeated 8 times
[rtsp @ 0x1f60560] Error parsing AU headerssize=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
frigate-stable |     Last message repeated 8 times
[rtsp @ 0x1f60560] Error parsing AU headerssize=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
frigate-stable |     Last message repeated 9 times
[rtsp @ 0x1f60560] Error parsing AU headerssize=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
frigate-stable |     Last message repeated 8 times
[rtsp @ 0x1f60560] Error parsing AU headerssize=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
frigate-stable |     Last message repeated 8 times
[rtsp @ 0x1f60560] Error parsing AU headerssize=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
frigate-stable | No frames received from front in 5 seconds. Exiting ffmpeg...
frigate-stable | Waiting for ffmpeg to exit gracefully...
frigate-stable |     Last message repeated 2 times
frigate-stable | Finishing stream 0:0 without any data written to it.
frigate-stable | Output #0, rawvideo, to 'pipe:':
frigate-stable |   Metadata:
frigate-stable |     title           : RTSP/RTP stream from anjvision ipcamera
frigate-stable |     encoder         : Lavf58.45.100
frigate-stable |     Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1280x704, q=2-31, 54067 kb/s, 5 fps, 5 tbn, 5 tbc
frigate-stable |     Metadata:
frigate-stable |       encoder         : Lavc58.91.100 rawvideo
frigate-stable | frame=    0 fps=0.0 q=0.0 Lsize=       0kB time=00:00:00.00 bitrate=N/A speed=   0x    
frigate-stable | video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
frigate-stable | Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
frigate-stable | Exiting normally, received signal 15.
frigate-stable | front: ffmpeg sent a broken frame. something is wrong.
frigate-stable | front: ffmpeg process is not running. exiting capture thread...
frigate-stable | Creating ffmpeg process...
frigate-stable | ffmpeg -hide_banner -loglevel info -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -vsync drop -i rtsp://xxx:xxx@192.168.0.xxx:xxx/h264 -r 5 -f rawvideo -pix_fmt yuv420p pipe:
frigate-stable | [rtsp @ 0x1a47560] Error parsing AU headers
frigate-stable |     Last message repeated 86 times
frigate-stable | Input #0, rtsp, from 'rtsp://xxx:xxx@192.168.0.xxx:xxx/h264':
frigate-stable |   Metadata:
frigate-stable |     title           : RTSP/RTP stream from anjvision ipcamera
frigate-stable |   Duration: N/A, start: 1605688667.166744, bitrate: N/A
frigate-stable |     Stream #0:0: Video: h264, yuv420p(progressive), 1280x704, 5 fps, 5 tbr, 90k tbn, 10 tbc
frigate-stable |     Stream #0:1: Audio: aac, 16000 Hz, mono, fltp
frigate-stable | Stream mapping:
frigate-stable |   Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native))
frigate-stable | Press [q] to stop, [?] for help
frigate-stable | [rtsp @ 0x1a47560] Error parsing AU headers
frigate-stable |     Last message repeated 12 times
[rtsp @ 0x1a47560] Error parsing AU headerssize=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
frigate-stable |     Last message repeated 9 times
[rtsp @ 0x1a47560] Error parsing AU headerssize=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
frigate-stable |     Last message repeated 8 times
[rtsp @ 0x1a47560] Error parsing AU headerssize=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
frigate-stable |     Last message repeated 8 times
[rtsp @ 0x1a47560] Error parsing AU headerssize=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
frigate-stable |     Last message repeated 9 times
[rtsp @ 0x1a47560] Error parsing AU headerssize=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
frigate-stable |     Last message repeated 8 times
[rtsp @ 0x1a47560] Error parsing AU headerssize=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
frigate-stable | No frames received from front in 5 seconds. Exiting ffmpeg...
frigate-stable | Waiting for ffmpeg to exit gracefully...
frigate-stable |     Last message repeated 2 times
frigate-stable | Finishing stream 0:0 without any data written to it.
frigate-stable | Output #0, rawvideo, to 'pipe:':
frigate-stable |   Metadata:
frigate-stable |     title           : RTSP/RTP stream from anjvision ipcamera
frigate-stable |     encoder         : Lavf58.45.100
frigate-stable |     Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1280x704, q=2-31, 54067 kb/s, 5 fps, 5 tbn, 5 tbc
frigate-stable |     Metadata:
frigate-stable |       encoder         : Lavc58.91.100 rawvideo
frigate-stable | frame=    0 fps=0.0 q=0.0 Lsize=       0kB time=00:00:00.00 bitrate=N/A speed=   0x    
frigate-stable | video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
frigate-stable | Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
frigate-stable | Exiting normally, received signal 15.
frigate-stable | front: ffmpeg sent a broken frame. something is wrong.
frigate-stable | front: ffmpeg process is not running. exiting capture thread...
frigate-stable | Creating ffmpeg process...
Hogster commented 3 years ago

It finally started working. I didn't measure after how long (will do that next start). Weird that it eventually starts.

I will now try adding back hwaccel_args

Hogster commented 3 years ago

Did not start with hwaccel_args... left it for over an hour without success!

Now when I started again without hwaccel_args it started instantly!

Hogster commented 3 years ago

So summary:

I would love to find a solution for this and appreciate any help.

Will get a new SD card and install the 64-bit version and see if I get better results but until this or a solution is found I guess I have to stick with the kpine version.

blakeblackshear commented 3 years ago

Since you are using identical ffmpeg commands here, the only difference that would matter is the newer version of ffmpeg in recent versions. It seems like the older version was handling whatever instability exists with your cameras better for some reason, and the new version is dropping too many frames from your cameras due to the "Error parsing AU headers" issue.

Maybe a simpler set of input_args will work:

web_port: 5000

mqtt:
  host: 192.168.0.160
  port: 1883
  topic_prefix: frigate
  user: hassio_mqtt_user # Optional
  password: hassio_mqtt_passwd # Optional

save_clips:
  max_seconds: 180 #3 minutes
  clips_dir: /clips
  cache_dir: /cache

objects:
  track:
    - person
  filters:
    person:
      min_area: 5000
      max_area: 100000
      threshold: 0.85

ffmpeg:
  global_args:
    - -hide_banner
    - -loglevel
    - info
  input_args:
    - -avoid_negative_ts
    - make_zero
    - -fflags
    - +genpts+discardcorrupt
    - -rtsp_transport
    - tcp
    - -stimeout
    - '5000000'
    - -use_wallclock_as_timestamps
    - '1'

cameras:
  front:
    ffmpeg:
      input: rtsp://192.168.0.xxx:xxx/h264?username=xxx&password=xxx
    fps: 5
    mask: front-mask.bmp

    mqtt:
      crop_to_region: True

    save_clips:
      enabled: False
      pre_capture: 10

    snapshots:
      show_timestamp: True
      draw_zones: False
      draw_bounding_boxes: True

    objects:
      track:
        - person
      filters:
        person:
          min_area: 5000
          max_area: 100000
          min_score: 0.5
          threshold: 0.85
blakeblackshear commented 3 years ago

The error message is clearly in the part of FFmpeg that parses the AAC audio data: https://github.com/FFmpeg/FFmpeg/blob/ab3044368f3fc10a3d43718a2bd664be8ce9fdb5/libavformat/rtpdec_mpeg4.c#L208

If you change the audio format, do the error messages go away? Maybe they are a red herring.

andreasfrosig commented 3 years ago

I had a very similar issue, and the suggestion with the simpler input args that you suggested worked like a charm. I do not know enough about ffmpeg to know what I am missing, but I know that it runs now.

blakeblackshear commented 3 years ago

The default args aggressively try to reduce latency by telling ffmpeg not to buffer and grab data from the camera as fast as possible.

Hogster commented 3 years ago

Thanks @blakeblackshear this seem to solve the issue.

First i tried with the above config and that resulted in that it started immediately without the "broken frame" issue.

When I then turned off the audio channel on the camera, the "Error parsing AU headerssize" error disappeared as well!

I also tried to add hwaccel_args which seems to work, however doesn't seem to improve inference speed, hovers between 15-20 ms...

Question: would the inference speed improve by switching to 64-bit OS?

Very much appreciate your support @blakeblackshear

blakeblackshear commented 3 years ago

The hwaccel args reduce CPU load for decoding the video. They will have no impact on inference speeds. I did see slightly better inference speeds on the 64bit OS.

Hogster commented 3 years ago

OK, thanks, will definitely give it a try.

After running with your suggested config I can conclude that it starts and runs but does not seem to be as responsive/consistent as before and tend to miss detection from time to time.

I'll get back when I have the new SD card and 64-bit up and running!

blakeblackshear commented 3 years ago

You can try adding back some of the parameters I removed to reduce latency. What version of the kpine image were you using before?

Hogster commented 3 years ago

I tried to add all of the removed parameters back and then removing them one by one from the bottom. With that approach none of the removed parameters worked. Maybe I can try each one separately and see if one or more works on its own.

I used "kpine/frigate-raspberrypi:latest" and if I use docker image ls it's apparently added 5 months ago.

stale[bot] commented 3 years 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.