Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(WORK IN PROGRESS): Add ArmNN and rknn2 detectors. Add docs about orange pi 5 #5733

Closed
wants to merge 14 commits into from

Conversation

podarok
Copy link

@podarok podarok commented Mar 15, 2023

TODO: - add https://github.com/rockchip-linux/rknpu2 support
There is yolov5 support already in examples

I was able to add armnn detector
See docs https://github.com/ARM-software/armnn#arm-nn

Arm NN is the most performant machine learning (ML) inference engine for Android and Linux, accelerating ML
on Arm Cortex-A CPUs and Arm Mali GPUs.

Some proofs

During detection
image

Events screen
image

Frigate log

2023-03-15 18:02:23.859197722  Info: ArmNN v32.0.0
2023-03-15 18:02:23.912813995  INFO: TfLiteArmnnDelegate: Created TfLite ArmNN delegate.
2023-03-15 18:02:23.920861496  Info: ArmnnSubgraph creation
2023-03-15 18:02:23.921845559  Info: Parse nodes to ArmNN time: 1.36 ms
2023-03-15 18:02:23.928672169  Info: Optimize ArmnnSubgraph time: 6.78 ms
2023-03-15 18:02:23.938988206  Info: Load ArmnnSubgraph time: 10.21 ms
2023-03-15 18:02:23.938998706  Info: Overall ArmnnSubgraph creation time: 18.55 ms
2023-03-15 18:47:46.976453964  Info: Execution time: 85.86 ms.
2023-03-15 18:47:47.051249177  Info: Execution time: 66.77 ms.
2023-03-15 18:47:47.095818136  Info: Execution time: 36.33 ms.
2023-03-15 18:47:47.135602818  Info: Execution time: 30.93 ms.
2023-03-15 18:47:47.173205671  Info: Execution time: 28.05 ms.
2023-03-15 18:47:47.774321566  Info: Execution time: 64.16 ms.
2023-03-15 18:47:47.856035512  Info: Execution time: 68.95 ms.
2023-03-15 18:47:47.897944775  Info: Execution time: 32.51 ms.
2023-03-15 18:47:48.144896242  Info: Execution time: 66.46 ms.
2023-03-15 18:47:48.208655015  Info: Execution time: 51.46 ms.
...

clinfo output

root@23cfa5ff7203:/opt/frigate# clinfo
Number of platforms                               1
  Platform Name                                   ARM Platform
  Platform Vendor                                 ARM
  Platform Version                                OpenCL 2.1 v1.g6p0-01eac0.efb75e2978d783a80fe78be1bfb0efc1
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_3d_image_writes cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_fp16 cl_khr_icd cl_khr_egl_image cl_khr_image2d_from_buffer cl_khr_depth_images cl_khr_subgroups cl_khr_subgroup_extended_types cl_khr_subgroup_non_uniform_vote cl_khr_subgroup_ballot cl_khr_il_program cl_khr_priority_hints cl_khr_create_command_queue cl_khr_spirv_no_integer_wrap_decoration cl_khr_extended_versioning cl_khr_device_uuid cl_arm_core_id cl_arm_printf cl_arm_non_uniform_work_group_size cl_arm_import_memory cl_arm_import_memory_dma_buf cl_arm_import_memory_host cl_arm_integer_dot_product_int8 cl_arm_integer_dot_product_accumulate_int8 cl_arm_integer_dot_product_accumulate_saturate_int8 cl_arm_scheduling_controls cl_arm_controlled_kernel_termination cl_ext_cxx_for_opencl
  Platform Extensions function suffix             ARM
  Platform Host timer resolution                  1ns

  Platform Name                                   ARM Platform
Number of devices                                 1
arm_release_ver of this libmali is 'g6p0-01eac0', rk_so_ver is '5'.
  Device Name                                     Mali-LODX r0p0
  Device Vendor                                   ARM
  Device Vendor ID                                0xa8670000
  Device Version                                  OpenCL 2.1 v1.g6p0-01eac0.efb75e2978d783a80fe78be1bfb0efc1
  Device UUID                                     000067a8-0100-0000-0000-000000000000
  Driver UUID                                     d9495bef-ea91-7c52-8a43-8a3c2f7b49cc
  Valid Device LUID                               No
  Device LUID                                     0000-000000000000
  Device Node Mask                                0
  Device Numeric Version                          0x801000 (2.1.0)
  Driver Version                                  2.1
  Device OpenCL C Version                         OpenCL C 2.0 v1.g6p0-01eac0.efb75e2978d783a80fe78be1bfb0efc1
  Device OpenCL C Numeric Version                 0x800000 (2.0.0)
  Device C++ for OpenCL Numeric Version           0x400000 (1.0.0)
  Device Type                                     GPU
  Device Profile                                  FULL_PROFILE
  Device Available                                Yes
  Compiler Available                              Yes
  Linker Available                                Yes
  Max compute units                               4
  Available core IDs (ARM)                        0, 2, 16, 18
  Max clock frequency                             1000MHz
  Device Partition                                (core)
    Max number of sub-devices                     0
    Supported partition types                     None
    Supported affinity domains                    (n/a)
  Max work item dimensions                        3
  Max work item sizes                             1024x1024x1024
  Max work group size                             1024
  Preferred work group size multiple (kernel)     16
  Max sub-groups per work group                   64
  Preferred / native vector sizes                 
    char                                                16 / 4       
    short                                                8 / 2       
    int                                                  4 / 1       
    long                                                 2 / 1       
    half                                                 8 / 2        (cl_khr_fp16)
    float                                                4 / 1       
    double                                               0 / 0        (n/a)
  Half-precision Floating-point support           (cl_khr_fp16)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
  Single-precision Floating-point support         (core)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
    Correctly-rounded divide and sqrt operations  No
  Double-precision Floating-point support         (n/a)
  Address bits                                    64, Little-Endian
  Global memory size                              8055271424 (7.502GiB)
  Error Correction support                        No
  Max memory allocation                           8055271424 (7.502GiB)
  Unified memory for Host and Device              Yes
  Shared Virtual Memory (SVM) capabilities        (core)
    Coarse-grained buffer sharing                 Yes
    Fine-grained buffer sharing                   No
    Fine-grained system sharing                   No
    Atomics                                       No
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       1024 bits (128 bytes)
  Preferred alignment for atomics                 
    SVM                                           0 bytes
    Global                                        0 bytes
    Local                                         0 bytes
  Max size for global variable                    65536 (64KiB)
  Preferred total size of global vars             0
  Global Memory cache type                        Read/Write
  Global Memory cache size                        1048576 (1024KiB)
  Global Memory cache line size                   64 bytes
  Image support                                   Yes
    Max number of samplers per kernel             16
    Max size for 1D images from buffer            65536 pixels
    Max 1D or 2D image array size                 2048 images
    Base address alignment for 2D image buffers   32 bytes
    Pitch alignment for 2D image buffers          64 pixels
    Max 2D image size                             65536x65536 pixels
    Max 3D image size                             65536x65536x65536 pixels
    Max number of read image args                 128
    Max number of write image args                64
    Max number of read/write image args           64
  Max number of pipe args                         16
  Max active pipe reservations                    1
  Max pipe packet size                            1024
  Local memory type                               Global
  Local memory size                               32768 (32KiB)
  Max number of constant args                     128
  Max constant buffer size                        8055271424 (7.502GiB)
  Max size of kernel argument                     1024
  Queue properties (on host)                      
    Out-of-order execution                        Yes
    Profiling                                     Yes
  Queue properties (on device)                    
    Out-of-order execution                        Yes
    Profiling                                     Yes
    Preferred size                                2097152 (2MiB)
    Max size                                      16777216 (16MiB)
  Max queues on device                            1
  Max events on device                            1024
  Controlled termination caps. (ARM)              Controlled Success, Controlled Failurure
  Prefer user sync for interop                    No
  Profiling timer resolution                      1000ns
  Execution capabilities                          
    Run OpenCL kernels                            Yes
    Run native kernels                            No
    Sub-group independent forward progress        Yes
    Scheduling controls (ARM)                     Kernel batching, Work-group batch size, Work-group batch size modifier, Register allocation
    Supported reg allocs (ARM)                    32, 64
    Max warps/CU (ARM)                            <printDeviceInfo:211: get CL_DEVICE_MAX_WARP_COUNT_ARM : error -30>
    IL version                                    SPIR-V_1.0
    ILs with version                              SPIR-V                                                           0x400000 (1.0.0)
  printf() buffer size                            1048576 (1024KiB)
  Built-in kernels                                (n/a)
  Built-in kernels with version                   (n/a)
  Device Extensions                               cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_3d_image_writes cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_fp16 cl_khr_icd cl_khr_egl_image cl_khr_image2d_from_buffer cl_khr_depth_images cl_khr_subgroups cl_khr_subgroup_extended_types cl_khr_subgroup_non_uniform_vote cl_khr_subgroup_ballot cl_khr_il_program cl_khr_priority_hints cl_khr_create_command_queue cl_khr_spirv_no_integer_wrap_decoration cl_khr_extended_versioning cl_khr_device_uuid cl_arm_core_id cl_arm_printf cl_arm_non_uniform_work_group_size cl_arm_import_memory cl_arm_import_memory_dma_buf cl_arm_import_memory_host cl_arm_integer_dot_product_int8 cl_arm_integer_dot_product_accumulate_int8 cl_arm_integer_dot_product_accumulate_saturate_int8 cl_arm_scheduling_controls cl_arm_controlled_kernel_termination cl_ext_cxx_for_opencl
  Device Extensions with Version                  cl_khr_global_int32_base_atomics                                 0x400000 (1.0.0)
                                                  cl_khr_global_int32_extended_atomics                             0x400000 (1.0.0)
                                                  cl_khr_local_int32_base_atomics                                  0x400000 (1.0.0)
                                                  cl_khr_local_int32_extended_atomics                              0x400000 (1.0.0)
                                                  cl_khr_byte_addressable_store                                    0x400000 (1.0.0)
                                                  cl_khr_3d_image_writes                                           0x400000 (1.0.0)
                                                  cl_khr_int64_base_atomics                                        0x400000 (1.0.0)
                                                  cl_khr_int64_extended_atomics                                    0x400000 (1.0.0)
                                                  cl_khr_fp16                                                      0x400000 (1.0.0)
                                                  cl_khr_icd                                                       0x400000 (1.0.0)
                                                  cl_khr_egl_image                                                 0x400000 (1.0.0)
                                                  cl_khr_image2d_from_buffer                                       0x400000 (1.0.0)
                                                  cl_khr_depth_images                                              0x400000 (1.0.0)
                                                  cl_khr_subgroups                                                 0x400000 (1.0.0)
                                                  cl_khr_subgroup_extended_types                                   0x400000 (1.0.0)
                                                  cl_khr_subgroup_non_uniform_vote                                 0x400000 (1.0.0)
                                                  cl_khr_subgroup_ballot                                           0x400000 (1.0.0)
                                                  cl_khr_il_program                                                0x400000 (1.0.0)
                                                  cl_khr_priority_hints                                            0x400000 (1.0.0)
                                                  cl_khr_create_command_queue                                      0x400000 (1.0.0)
                                                  cl_khr_spirv_no_integer_wrap_decoration                          0x400000 (1.0.0)
                                                  cl_khr_extended_versioning                                       0x400000 (1.0.0)
                                                  cl_khr_device_uuid                                               0x400000 (1.0.0)
                                                  cl_arm_core_id                                                   0x400000 (1.0.0)
                                                  cl_arm_printf                                                    0x400000 (1.0.0)
                                                  cl_arm_non_uniform_work_group_size                               0x400000 (1.0.0)
                                                  cl_arm_import_memory                                             0x400000 (1.0.0)
                                                  cl_arm_import_memory_dma_buf                                     0x400000 (1.0.0)
                                                  cl_arm_import_memory_host                                        0x400000 (1.0.0)
                                                  cl_arm_integer_dot_product_int8                                  0x400000 (1.0.0)
                                                  cl_arm_integer_dot_product_accumulate_int8                       0x400000 (1.0.0)
                                                  cl_arm_integer_dot_product_accumulate_saturate_int8              0x400000 (1.0.0)
                                                  cl_arm_scheduling_controls                                         0x3000 (0.3.0)
                                                  cl_arm_controlled_kernel_termination                             0x400000 (1.0.0)
                                                  cl_ext_cxx_for_opencl                                            0x400000 (1.0.0)

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  ARM Platform
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   Success [ARM]
  clCreateContext(NULL, ...) [default]            Success [ARM]
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT)  Success (1)
    Platform Name                                 ARM Platform
    Device Name                                   Mali-LODX r0p0
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  Success (1)
    Platform Name                                 ARM Platform
    Device Name                                   Mali-LODX r0p0
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL)  Success (1)
    Platform Name                                 ARM Platform
    Device Name                                   Mali-LODX r0p0

ICD loader properties
  ICD loader Name                                 OpenCL ICD Loader
  ICD loader Vendor                               OCL Icd free software
  ICD loader Version                              2.3.1
  ICD loader Profile                              OpenCL 3.0
root@23cfa5ff7203:/opt/frigate# clinfo | grep Device Name
grep: Name: No such file or directory
root@23cfa5ff7203:/opt/frigate# clinfo | grep 'Device Name'
  Device Name                                     Mali-LODX r0p0
    Device Name                                   Mali-LODX r0p0
    Device Name                                   Mali-LODX r0p0
    Device Name                                   Mali-LODX r0p0
root@23cfa5ff7203:/opt/frigate# clinfo | grep ARM          
  Platform Name                                   ARM Platform
  Platform Vendor                                 ARM
  Platform Extensions function suffix             ARM
  Platform Name                                   ARM Platform
  Device Vendor                                   ARM
  Available core IDs (ARM)                        0, 2, 16, 18
  Controlled termination caps. (ARM)              Controlled Success, Controlled Failurure
    Scheduling controls (ARM)                     Kernel batching, Work-group batch size, Work-group batch size modifier, Register allocation
    Supported reg allocs (ARM)                    32, 64
    Max warps/CU (ARM)                            <printDeviceInfo:211: get CL_DEVICE_MAX_WARP_COUNT_ARM : error -30>
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  ARM Platform
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   Success [ARM]
  clCreateContext(NULL, ...) [default]            Success [ARM]
    Platform Name                                 ARM Platform
    Platform Name                                 ARM Platform
    Platform Name                                 ARM Platform
root@23cfa5ff7203:/opt/frigate# clinfo
Number of platforms                               1
  Platform Name                                   ARM Platform
  Platform Vendor                                 ARM
  Platform Version                                OpenCL 2.1 v1.g6p0-01eac0.efb75e2978d783a80fe78be1bfb0efc1
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_3d_image_writes cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_fp16 cl_khr_icd cl_khr_egl_image cl_khr_image2d_from_buffer cl_khr_depth_images cl_khr_subgroups cl_khr_subgroup_extended_types cl_khr_subgroup_non_uniform_vote cl_khr_subgroup_ballot cl_khr_il_program cl_khr_priority_hints cl_khr_create_command_queue cl_khr_spirv_no_integer_wrap_decoration cl_khr_extended_versioning cl_khr_device_uuid cl_arm_core_id cl_arm_printf cl_arm_non_uniform_work_group_size cl_arm_import_memory cl_arm_import_memory_dma_buf cl_arm_import_memory_host cl_arm_integer_dot_product_int8 cl_arm_integer_dot_product_accumulate_int8 cl_arm_integer_dot_product_accumulate_saturate_int8 cl_arm_scheduling_controls cl_arm_controlled_kernel_termination cl_ext_cxx_for_opencl
  Platform Extensions function suffix             ARM
  Platform Host timer resolution                  1ns

  Platform Name                                   ARM Platform
Number of devices                                 1
arm_release_ver of this libmali is 'g6p0-01eac0', rk_so_ver is '5'.
  Device Name                                     Mali-LODX r0p0
  Device Vendor                                   ARM
  Device Vendor ID                                0xa8670000
  Device Version                                  OpenCL 2.1 v1.g6p0-01eac0.efb75e2978d783a80fe78be1bfb0efc1
  Device UUID                                     000067a8-0100-0000-0000-000000000000
  Driver UUID                                     d9495bef-ea91-7c52-8a43-8a3c2f7b49cc
  Valid Device LUID                               No
  Device LUID                                     0000-000000000000
  Device Node Mask                                0
  Device Numeric Version                          0x801000 (2.1.0)
  Driver Version                                  2.1
  Device OpenCL C Version                         OpenCL C 2.0 v1.g6p0-01eac0.efb75e2978d783a80fe78be1bfb0efc1
  Device OpenCL C Numeric Version                 0x800000 (2.0.0)
  Device C++ for OpenCL Numeric Version           0x400000 (1.0.0)
  Device Type                                     GPU
  Device Profile                                  FULL_PROFILE
  Device Available                                Yes
  Compiler Available                              Yes
  Linker Available                                Yes
  Max compute units                               4
  Available core IDs (ARM)                        0, 2, 16, 18
  Max clock frequency                             1000MHz
  Device Partition                                (core)
    Max number of sub-devices                     0
    Supported partition types                     None
    Supported affinity domains                    (n/a)
  Max work item dimensions                        3
  Max work item sizes                             1024x1024x1024
  Max work group size                             1024
  Preferred work group size multiple (kernel)     16
  Max sub-groups per work group                   64
  Preferred / native vector sizes                 
    char                                                16 / 4       
    short                                                8 / 2       
    int                                                  4 / 1       
    long                                                 2 / 1       
    half                                                 8 / 2        (cl_khr_fp16)
    float                                                4 / 1       
    double                                               0 / 0        (n/a)
  Half-precision Floating-point support           (cl_khr_fp16)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
  Single-precision Floating-point support         (core)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
    Correctly-rounded divide and sqrt operations  No
  Double-precision Floating-point support         (n/a)
  Address bits                                    64, Little-Endian
  Global memory size                              8055271424 (7.502GiB)
  Error Correction support                        No
  Max memory allocation                           8055271424 (7.502GiB)
  Unified memory for Host and Device              Yes
  Shared Virtual Memory (SVM) capabilities        (core)
    Coarse-grained buffer sharing                 Yes
    Fine-grained buffer sharing                   No
    Fine-grained system sharing                   No
    Atomics                                       No
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       1024 bits (128 bytes)
  Preferred alignment for atomics                 
    SVM                                           0 bytes
    Global                                        0 bytes
    Local                                         0 bytes
  Max size for global variable                    65536 (64KiB)
  Preferred total size of global vars             0
  Global Memory cache type                        Read/Write
  Global Memory cache size                        1048576 (1024KiB)
  Global Memory cache line size                   64 bytes
  Image support                                   Yes
    Max number of samplers per kernel             16
    Max size for 1D images from buffer            65536 pixels
    Max 1D or 2D image array size                 2048 images
    Base address alignment for 2D image buffers   32 bytes
    Pitch alignment for 2D image buffers          64 pixels
    Max 2D image size                             65536x65536 pixels
    Max 3D image size                             65536x65536x65536 pixels
    Max number of read image args                 128
    Max number of write image args                64
    Max number of read/write image args           64
  Max number of pipe args                         16
  Max active pipe reservations                    1
  Max pipe packet size                            1024
  Local memory type                               Global
  Local memory size                               32768 (32KiB)
  Max number of constant args                     128
  Max constant buffer size                        8055271424 (7.502GiB)
  Max size of kernel argument                     1024
  Queue properties (on host)                      
    Out-of-order execution                        Yes
    Profiling                                     Yes
  Queue properties (on device)                    
    Out-of-order execution                        Yes
    Profiling                                     Yes
    Preferred size                                2097152 (2MiB)
    Max size                                      16777216 (16MiB)
  Max queues on device                            1
  Max events on device                            1024
  Controlled termination caps. (ARM)              Controlled Success, Controlled Failurure
  Prefer user sync for interop                    No
  Profiling timer resolution                      1000ns
  Execution capabilities                          
    Run OpenCL kernels                            Yes
    Run native kernels                            No
    Sub-group independent forward progress        Yes
    Scheduling controls (ARM)                     Kernel batching, Work-group batch size, Work-group batch size modifier, Register allocation
    Supported reg allocs (ARM)                    32, 64
    Max warps/CU (ARM)                            <printDeviceInfo:211: get CL_DEVICE_MAX_WARP_COUNT_ARM : error -30>
    IL version                                    SPIR-V_1.0
    ILs with version                              SPIR-V                                                           0x400000 (1.0.0)
  printf() buffer size                            1048576 (1024KiB)
  Built-in kernels                                (n/a)
  Built-in kernels with version                   (n/a)
  Device Extensions                               cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_3d_image_writes cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_fp16 cl_khr_icd cl_khr_egl_image cl_khr_image2d_from_buffer cl_khr_depth_images cl_khr_subgroups cl_khr_subgroup_extended_types cl_khr_subgroup_non_uniform_vote cl_khr_subgroup_ballot cl_khr_il_program cl_khr_priority_hints cl_khr_create_command_queue cl_khr_spirv_no_integer_wrap_decoration cl_khr_extended_versioning cl_khr_device_uuid cl_arm_core_id cl_arm_printf cl_arm_non_uniform_work_group_size cl_arm_import_memory cl_arm_import_memory_dma_buf cl_arm_import_memory_host cl_arm_integer_dot_product_int8 cl_arm_integer_dot_product_accumulate_int8 cl_arm_integer_dot_product_accumulate_saturate_int8 cl_arm_scheduling_controls cl_arm_controlled_kernel_termination cl_ext_cxx_for_opencl
  Device Extensions with Version                  cl_khr_global_int32_base_atomics                                 0x400000 (1.0.0)
                                                  cl_khr_global_int32_extended_atomics                             0x400000 (1.0.0)
                                                  cl_khr_local_int32_base_atomics                                  0x400000 (1.0.0)
                                                  cl_khr_local_int32_extended_atomics                              0x400000 (1.0.0)
                                                  cl_khr_byte_addressable_store                                    0x400000 (1.0.0)
                                                  cl_khr_3d_image_writes                                           0x400000 (1.0.0)
                                                  cl_khr_int64_base_atomics                                        0x400000 (1.0.0)
                                                  cl_khr_int64_extended_atomics                                    0x400000 (1.0.0)
                                                  cl_khr_fp16                                                      0x400000 (1.0.0)
                                                  cl_khr_icd                                                       0x400000 (1.0.0)
                                                  cl_khr_egl_image                                                 0x400000 (1.0.0)
                                                  cl_khr_image2d_from_buffer                                       0x400000 (1.0.0)
                                                  cl_khr_depth_images                                              0x400000 (1.0.0)
                                                  cl_khr_subgroups                                                 0x400000 (1.0.0)
                                                  cl_khr_subgroup_extended_types                                   0x400000 (1.0.0)
                                                  cl_khr_subgroup_non_uniform_vote                                 0x400000 (1.0.0)
                                                  cl_khr_subgroup_ballot                                           0x400000 (1.0.0)
                                                  cl_khr_il_program                                                0x400000 (1.0.0)
                                                  cl_khr_priority_hints                                            0x400000 (1.0.0)
                                                  cl_khr_create_command_queue                                      0x400000 (1.0.0)
                                                  cl_khr_spirv_no_integer_wrap_decoration                          0x400000 (1.0.0)
                                                  cl_khr_extended_versioning                                       0x400000 (1.0.0)
                                                  cl_khr_device_uuid                                               0x400000 (1.0.0)
                                                  cl_arm_core_id                                                   0x400000 (1.0.0)
                                                  cl_arm_printf                                                    0x400000 (1.0.0)
                                                  cl_arm_non_uniform_work_group_size                               0x400000 (1.0.0)
                                                  cl_arm_import_memory                                             0x400000 (1.0.0)
                                                  cl_arm_import_memory_dma_buf                                     0x400000 (1.0.0)
                                                  cl_arm_import_memory_host                                        0x400000 (1.0.0)
                                                  cl_arm_integer_dot_product_int8                                  0x400000 (1.0.0)
                                                  cl_arm_integer_dot_product_accumulate_int8                       0x400000 (1.0.0)
                                                  cl_arm_integer_dot_product_accumulate_saturate_int8              0x400000 (1.0.0)
                                                  cl_arm_scheduling_controls                                         0x3000 (0.3.0)
                                                  cl_arm_controlled_kernel_termination                             0x400000 (1.0.0)
                                                  cl_ext_cxx_for_opencl                                            0x400000 (1.0.0)

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  ARM Platform
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   Success [ARM]
  clCreateContext(NULL, ...) [default]            Success [ARM]
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT)  Success (1)
    Platform Name                                 ARM Platform
    Device Name                                   Mali-LODX r0p0
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  Success (1)
    Platform Name                                 ARM Platform
    Device Name                                   Mali-LODX r0p0
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL)  Success (1)
    Platform Name                                 ARM Platform
    Device Name                                   Mali-LODX r0p0

ICD loader properties
  ICD loader Name                                 OpenCL ICD Loader
  ICD loader Vendor                               OCL Icd free software
  ICD loader Version                              2.3.1
  ICD loader Profile                              OpenCL 3.0

@netlify
Copy link

netlify bot commented Mar 15, 2023

Deploy Preview for frigate-docs canceled.

Name Link
🔨 Latest commit 9e71434
🔍 Latest deploy log https://app.netlify.com/sites/frigate-docs/deploys/64216213a458860008e2772e

@blakeblackshear
Copy link
Owner

Thanks. We will need to integrate the dependencies in the dockerfile. This won't be in the 0.12 release. We will target 0.13 for this.

@podarok
Copy link
Author

podarok commented Mar 15, 2023

@blakeblackshear I'll check docker file.
Issue is frigate is on debian 11, but all of armnn now targeting newer version, so most likely we would need to upgrade base image in docker for this.

@blakeblackshear
Copy link
Owner

That will end up being a substantial amount of work as other dependencies may not be compatible with more recent versions.

@podarok
Copy link
Author

podarok commented Mar 15, 2023

@blakeblackshear I was able to add dedicated apt repos in order to install dependencies within Docker container of frigate, so maybe we could add anyway

Do we have any dev docs about docker configuration for a frigate?

@blakeblackshear
Copy link
Owner

There aren't an developer docs specific to docker. You should be able to see how everything works by looking at the Makefile and Dockerfile in the repo.


```yaml
ffmpeg:
hwaccel_args: -hwaccel drm -hwaccel_device /dev/dri/renderD128 -c:v h264_rkmpp
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this an ffmpeg preset?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not yet, because we need to get specifically compiled ffmpeg for this board

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How big is the ffmpeg binary? We may be able to include both in the image.

But if this pattern starts to be a thing, we need to reconsider. One approach is to download the ffmpeg binary automatically to /data/ on container startup, or skip it if the SHA validation of the existing binary passes.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be difficult for docker users since /data/ isn't mapped and we don't want to be pulling on each startup. I'm wondering how including both would work, how would frigate / go2rtc know which to use?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On container startup we can relocate the binaries according to the Frigate config, for example.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About /data, you are right. Maybe after #5219 the binary could be downloaded to /config.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But wait a sec, even /data would be fine, I think. When containers are restarted in docker, they are not recreated, so the data is kept (different than add-ons where restart=recreate, but in that case /data is kept anyway).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see what you mean, that could definitely make sense. Perhaps ffmpeg acceleration support for these devices would make sense as a separate PR and leave this PR just for the detector addition

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But wait a sec, even /data would be fine, I think. When containers are restarted in docker, they are not recreated, so the data is kept (different than add-ons where restart=recreate, but in that case /data is kept anyway).

It is bad practice to write to storage which is not mapped to user storage and only contained in the container, so that is not an option

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a script as you requested podarok#8 @NickM-27

@@ -15,6 +15,78 @@ ffmpeg:
hwaccel_args: preset-rpi-64-h264
```

### Orange Pi 5 ( ArmNN )

Ensure you have installed
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this an install script similar to the way TensorRT detector has?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid we need to stop overwhelming Dockerfile with if/if/else spaghetti and have Dockerfile / board / arch

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We just moved away from an approach like that to support multiarch builds with multiple detectors. I also don't see what that script would have to do with the Dockerfile

Copy link
Author

@podarok podarok Mar 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no sense to have armnn related detector for x86_64 board. No need to install packages from rkmpp scope for raspberry PI board, no need to have rknpu libraries for raspberry pi
We should stop using raspberry pi PPAs for non raspberry PI boards

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As an architect I see us start decoupling frigate from Docker
frigate should become an app, which is used by specific Docker as part of the whole system, depending from the hardware available

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no sense to have armnn related detector for x86_64 board. No need to install packages from rkmpp scope for raspberry PI board, no need to have rknpu libraries for raspberry pi We should stop using raspberry pi PPAs for non raspberry PI boards

of course, frigate already has examples of this case like how there is only a tensorrt image for amd64. However, you may very well want to run the ArmNN detector alongside OpenVINO via NCS2, Coral, etc.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, makes sense @NickM-27
I'll check if I can add proper PPAs and script for installing proper ffmpeg for hardware acceleration on this board


Also, for the CPU and GPU accelleration you should use `armnn` detector on this board [see](detectors.md)

Install packages [see tutorials](https://github.com/ARM-software/armnn/blob/branches/armnn_23_02/InstallationViaAptRepository.md)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, can this be an install script?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hopefully yes in this case

@podarok
Copy link
Author

podarok commented Mar 20, 2023

TODO - add https://github.com/rockchip-linux/rknpu2 support
There is yolov5 support already in examples

@gilankpam
Copy link

I was able to use rknpu2 using model I converted from tflite. Can check here https://github.com/gilankpam/frigate/tree/rk3588_ubuntu

I had to modify the base image to use ubuntu one, when I install ffmpeg debs for debian, it didnt work. And for the detector code, mostly I just copied and pasted from yolov5 repo, still not sure what it does but it works lol.

frigate logs

2023-03-22 15:40:09.952202910  I RKNN: [15:40:09.952] RKNN Runtime Information: librknnrt version: 1.4.0 (a10f100eb@2022-09-09T09:07:14)
2023-03-22 15:40:09.952244909  I RKNN: [15:40:09.952] RKNN Driver Information: version: 0.8.2
2023-03-22 15:40:09.953070602  I RKNN: [15:40:09.953] RKNN Model Information: version: 1, toolkit version: 1.4.0-22dcfef4(compiler version: 1.4.0 (3b4520e4f@2022-09-05T20:52:35)), target: RKNPU v2, target platform: rk3588, framework name: TFLite, framework layout: NHWC

@podarok
Copy link
Author

podarok commented Mar 22, 2023

I was able to use rknpu2 using model I converted from tflite. Can check here https://github.com/gilankpam/frigate/tree/rk3588_ubuntu

I had to modify the base image to use ubuntu one, when I install ffmpeg debs for debian, it didnt work. And for the detector code, mostly I just copied and pasted from yolov5 repo, still not sure what it does but it works lol.

frigate logs

2023-03-22 15:40:09.952202910  I RKNN: [15:40:09.952] RKNN Runtime Information: librknnrt version: 1.4.0 (a10f100eb@2022-09-09T09:07:14)
2023-03-22 15:40:09.952244909  I RKNN: [15:40:09.952] RKNN Driver Information: version: 0.8.2
2023-03-22 15:40:09.953070602  I RKNN: [15:40:09.953] RKNN Model Information: version: 1, toolkit version: 1.4.0-22dcfef4(compiler version: 1.4.0 (3b4520e4f@2022-09-05T20:52:35)), target: RKNPU v2, target platform: rk3588, framework name: TFLite, framework layout: NHWC

Sounds awesome
Can you see your rknpu detector in system tab in UI?

@podarok
Copy link
Author

podarok commented Mar 22, 2023

I see @gilankpam . You removed some dependencies and added your own plugin alongside what I created
Thank you for the insights

diff gilankpam@d39dc47#diff-791d51fadcffb7c2419b907f8d7155e0e708cd6b513a742e01fc94087a020402

Now we need to ensure this could be added to main repo for become part of the officially released frigate

I guess we need your help @blakeblackshear @NickM-27

I'm working on getting ffmpeg compiled with mpp and other arm64 hardware accelerated libraries to make it universal for different boards, but with Docker we'd need your suggestions probably.

@gilankpam
Copy link

@podarok this is the screenshot
Screenshot 2023-03-22 at 17 36 23
Screenshot 2023-03-22 at 17 36 32

I also noticed that the score output by the rknn model is lower compared with cpu_model.tflite not sure why. For person detection it tops like 0.65, so I lower the threshold value.

@podarok
Copy link
Author

podarok commented Mar 22, 2023

@gilankpam that could be because of yolov5 model is bigger and could load CPU more.
We can convert CPU tflite model to rknn format and use it with your detector plugin in order to compare performance

@podarok
Copy link
Author

podarok commented Mar 22, 2023

You may use armnn, rknn, and rknn2 detectors on your board

What is the difference between rknn and rknn2? @gilankpam
Do you have specific rknn hardware or it's just a secondary detector you added to your config?

@podarok podarok changed the title feat: Add ArmNN detector. Add docs about orange pi 5 feat: Add ArmNN and rknn2 detectors. Add docs about orange pi 5 Mar 22, 2023
@gilankpam
Copy link

@podarok its the same

detectors:
  rknn:
    type: rknn
    path: /yolov5s_f16.rknn

  rknn2:
    type: rknn
    path: /yolov5s_f16.rknn

just testing if having 2 detector would increase the performance. Still not sure lol

Anyway I will try to convert CPU tflite model to rknn and test. Thanks for the idea

@podarok
Copy link
Author

podarok commented Mar 22, 2023

@podarok its the same

detectors:
  rknn:
    type: rknn
    path: /yolov5s_f16.rknn

  rknn2:
    type: rknn
    path: /yolov5s_f16.rknn

just testing if having 2 detector would increase the performance. Still not sure lol

Anyway I will try to convert CPU tflite model to rknn and test. Thanks for the idea

rknn2 NPU has 3 cores.
Check config in rknn2 library.

@NickM-27
Copy link
Collaborator

Trying to get caught up, at this point what hardware would this PR enable? Is it only an entire board like the orangepi or would it support any type of USB accelerator?

@podarok
Copy link
Author

podarok commented Mar 22, 2023

Trying to get caught up, at this point what hardware would this PR enable? Is it only an entire board like the orangepi or would it support any type of USB accelerator?

at this point we have not yet finished with PR, it's work in progress
major blocker now is Dockerfile and needed dependencies + models

Plugins(detectors) seems like ready to be used if you have proper hardware and software installed @NickM-27

@NickM-27
Copy link
Collaborator

Trying to get caught up, at this point what hardware would this PR enable? Is it only an entire board like the orangepi or would it support any type of USB accelerator?

at this point we have not yet finished with PR, it's work in progress major blocker now is Dockerfile and needed dependencies + models

Plugins(detectors) seems like ready to be used if you have proper hardware and software installed @NickM-27

I'm asking this question to be able to give suggestions as the answer depends on how this new detector can be utilized. So, what all hardware variations are known that can take advantage of the new detector type(s) in this PR?

@podarok
Copy link
Author

podarok commented Mar 22, 2023

@NickM-27
All boards with
RK3566/RK3568
RK3588/RK3588S
RV1103/RV1106
CPUs will have 6TOPS AI acceleration via https://github.com/rockchip-linux/rknpu2 based plugin detection , created by @gilankpam

ALso all ARM64 + Mali GPUs will be supported by armnn detection plugin, created by me

Which outperform CPU detection by a lot!

@NickM-27
Copy link
Collaborator

Thanks, that's helpful.

I'd say in that case the rknpu2 work will likely match how tensorrt is done in the dockerfile meaning thst a separate image will be built for that on top of the base frigate image

The work for arm64 + mail GPU would (I think) fit into the base image just having the install_deps script installing the necessary deps for detection.

Ffmpeg custom build will probably be a different discussion depending on what that looks like.

@NickM-27
Copy link
Collaborator

NickM-27 commented Mar 22, 2023

Can provide more details this weekend if there are more questions. @felipecrs and @NateMeyer are also knowledgeable with this docker file work and may be able to provide suggestions

@NateMeyer
Copy link
Contributor

I have a Rock 5B to run this on. I'll take a look through it and let you know what questions I have in the next few days!

@podarok
Copy link
Author

podarok commented Mar 24, 2023

Just pushed mpp and ffmpeg compilation piece which helps to get rkmpp hardware acceleration for ffmpeg

@artem-zinnatullin
Copy link

@4ib3r is there something I'm missing trying to get gstreamer work in @simon511000 Docker image #5733 (comment)?

My OrangePi is barely keeping up with decoding full-res from cameras on CPU — it sits at 80C and I'm desperately looking for ways to shift decoding to GPU 😰

Happy to try any suggestions either for ffmpeg or gstreamer

image

@artem-zinnatullin
Copy link

Ok, what I missed was that I needed combination of all these docker run options (which were mentioned in Docker compose examples above, my bad!):

docker run --privileged --rm -it --entrypoint /bin/bash --group-add=110 --device /dev/dri/renderD128:/dev/dri/renderD128 --device /dev/rga:/dev/rga

Where group-add is groupId of ls -l /dev/dri/renderD128 render group (in my case) on the host OS.

Now I see mpp plugin being initialized correctly!

gst-inspect-1.0 | grep -i "video.*decoder"
mpp[5843]: mpp_info: mpp version: 0af9b5be author: xueman.ruan   2023-08-11 fix[h264d]: fix TSVC decode assert error.

mpp[5843]: mpp_info: mpp version: 0af9b5be author: xueman.ruan   2023-08-11 fix[h264d]: fix TSVC decode assert error.

mpp[5843]: mpp_info: mpp version: 0af9b5be author: xueman.ruan   2023-08-11 fix[h264d]: fix TSVC decode assert error.

mpp[5843]: mpp_info: mpp version: 0af9b5be author: xueman.ruan   2023-08-11 fix[h264d]: fix TSVC decode assert error.

dv:  dvdec: DV video decoder
rockchipmpp:  mppvideodec: Rockchip's MPP video decoder
flxdec:  flxdec: FLX video decoder
vmnc:  vmncdec: VMnc video decoder
mpeg2dec:  mpeg2dec: mpeg1 and mpeg2 video decoder
theora:  theoradec: Theora video decoder

Trying to get the pipeline to work now

@kcembrey
Copy link

kcembrey commented Sep 1, 2023

I've been spending way too much time on this, but have had some success. I've just forked the latest dev and pushed build changes (thanks to everyone in this thread) which accomplishes the following:

  • ArmNN compiled and running
  • hbiyik's custom ffmpeg builds in the docker image (shouldn't need to build outside of Frigate)
  • h264_rkmpp_decoder working in built image with ffmpeg
  • rknn additions from gilankpam integrated (but detection not quite working)

I just got the custom ffmpeg for hardware decoding setup this evening and it's made a noticeable performance improvement. With 3-1080p cameras and a 2k camera, my Orange Pi 5 Plus was constantly at 85 degrees, but now it sits between 75 and 80.

I've removed OpenVino support from the build, as I don't need it and it takes way too long to build on the Orange Pi.

If you want to give this a try, this should get you up and running. Everything should be done on your Orange Pi 5 device and you need to be running Ubuntu 22.04:

  1. Clone the repo here: https://github.com/kcembrey/frigate/tree/orangePi5 (you can see the diff changes here: dev...kcembrey:frigate:orangePi5)
  2. Go into the repo directory and run "make" (This will probably take 15-minutes. I'll try to improve the speed of this later)
  3. Once that's complete, your image is ready. Just modify the docker-compose.yml file and setup your config file (config.yml.example shows how to use h264_rkmpp_decoder in ffmpeg), then run docker compose up to get it running

I hope this works for others, but I can't say that I've run it on a clean machine, so I may have done something else to prep that I'm unaware of.

Over the next couple of weeks, I plan on cleaning this up a bit, compatibility with other Linux builds, and trying to get the rknn detector working. But for now, I hope this gets some of you up and running. I'll try to get a docker image up sometime soon, too.

@artem-zinnatullin
Copy link

Hey @kcembrey, thanks for posting your work!

I also finally got ffmpeg from @hbiyik https://github.com/hbiyik/FFmpeg working with librga mirror from https://github.com/jjm2473/librga, h264_rkmpp_decoder works for detection and my CPU usage is now at ~60% with 9 2K cameras running at full res!

However, recording stopped working, 10 second slices are malformed:

frigate.record                 WARNING : Failed to probe corrupt segment /tmp/cache/cam5-20230831224139.mp4: 1 - b'[mov,mp4,m4a,3gp,3g2,mj2 @ 0xaaaaf8e70bd0] moov atom not found\n/tmp/cache/cam5-20230831224139.mp4: Invalid data found when processing input\n'
frigate.record                 WARNING : Discarding a corrupt recording segment: /tmp/cache/cam5-20230831224139.mp4

I've tried adding -movflags +faststart and -err_detect aggressive, tried setting -threads 1 instead of -threads 2 but still the segments are corrupted for recording purposes.

@kcembrey, do recordings work on your fork?

@NateMeyer
Copy link
Contributor

As you're looking at cleaning this up, would it make sense to split this into multiple PRs? One for ArmNN that would apply to any Arm64 image, and one for the rk3588-related features?

@kcembrey
Copy link

kcembrey commented Sep 1, 2023

@artem-zinnatullin Yes, recording and detection are working great in my setup, although I have fewer cameras. I have seen that "moov atom not found" error on startup, but haven't looked into it yet. Doesn't seem to affect my recording.

I haven't tried the jjm2473 repo for librga, as that's coming from this PPA, which I believe, uses the old official packages. I'll try some tweaks this weekend to make it friendly to more distributions.

Agreed, @NateMeyer. I started setting this up for myself, but I would like to be able to contribute if I can. I'll probably split this into two branches with separate focuses. This is my first Docker project, so I'm finally getting comfortable with it. I think I have the skills to be useful for packaging the ArmNN install stuff, but I don't know if I'll ever get the rknn detector working without others' help.

@sylv3rblade
Copy link
Contributor

sylv3rblade commented Sep 1, 2023

If you want to give this a try, this should get you up and running. Everything should be done on your Orange Pi 5 device and you need to be running Ubuntu 22.04:

  1. Clone the repo here: https://github.com/kcembrey/frigate/tree/orangePi5 (you can see the diff changes here: dev...kcembrey:frigate:orangePi5)
  2. Go into the repo directory and run "make" (This will probably take 15-minutes. I'll try to improve the speed of this later)
  3. Once that's complete, your image is ready. Just modify the docker-compose.yml file and setup your config file (config.yml.example shows how to use h264_rkmpp_decoder in ffmpeg), then run docker compose up to get it running

I hope this works for others, but I can't say that I've run it on a clean machine, so I may have done something else to prep that I'm unaware of.

Over the next couple of weeks, I plan on cleaning this up a bit, compatibility with other Linux builds, and trying to get the rknn detector working. But for now, I hope this gets some of you up and running. I'll try to get a docker image up sometime soon, too.

Hi @kcembrey, I tried building your image but I ended up with an error for box_priors.txt
image

just want to confirm if this is what is needed? https://github.com/nnstreamer/nnstreamer-example/blob/main/Tizen.native/ObjectDetection/res/box_priors.txt

@NickM-27
Copy link
Collaborator

NickM-27 commented Sep 1, 2023

Make sure to read https://deploy-preview-6262--frigate-docs.netlify.app/development/contributing-boards if working on this type of contribution

@kcembrey
Copy link

kcembrey commented Sep 1, 2023

@sylv3rblade Sorry about that. I thought I had removed all references to that, but my build was cached when I tested it. box_priors.txt is not currently required for this build. It was for a version of the rknn detector but not currently needed.

I just updated the repo to remove that requirement and tested this time on my machine with the --no-cache flag and it was successful.

@a2nt
Copy link

a2nt commented Sep 1, 2023

@kcembrey
Getting following errors:

2023-09-01 21:23:05.841558079  /usr/local/lib/python3.9/dist-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: ''If you don't plan on using image functionality from `torchvision.io`, you can ignore this warning. Otherwise, there might be something wrong with your environment. Did you have `libjpeg` or `libpng` installed before building `torchvision` from source?

2023-09-01 21:23:20.868058451  Couldn't find any of the following OpenCL library: libOpenCL.so libGLES_mali.so libmali.so 
2023-09-01 21:23:20.868446362  INFO: TfLiteArmnnDelegate: Requested unknown backend GpuAcc
2023-09-01 21:23:20.868459778  INFO: TfLiteArmnnDelegate: Created TfLite ArmNN delegate.

frigate    | 2023-09-01 21:48:06.396417814  [2023-09-01 21:48:06] ffmpeg.camera_2.detect         ERROR   : [AVHWDeviceContext @ 0xaaaaf3ce3f80] drm device '/dev/dri/renderD128' does not support dumb buffers

@rnoxy
Copy link

rnoxy commented Sep 8, 2023

kcembrey

I was able to build the image from your branch.
Could you share your docker-compose.yml?
What devices do you mount?
Do you mount /dev/dri/renderD128?
Do you also mount:
/usr/lib/ArmNN-linux-aarch64:/usr/lib/ArmNN-linux-aarch64

Could share the config.yml?
How do you configure detectors and hw accel for input/oput in ffmpeg?

I have use the example files from your repo but the status is as follows:
image

I see no hw acceleration.

@kcembrey
Copy link

kcembrey commented Sep 15, 2023

@rnoxy here's my docker-compose that's working, as long as you've compiled the image yourself using the code in my branch:

services:
  frigate:
    container_name: frigate
    privileged: true
    restart: unless-stopped
    image: frigate
    shm_size: "256mb"
    group_add:
      - "106" # render
      - "44"  # video
      - "46"  # plugdev
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /home/kc/frigateDev/frigate/config/config.yml:/config/config.yml
      - /media/frigate:/media/frigate
      - /home/kc/frigateDev/frigate/config:/config
      - type: tmpfs
        target: /tmp/cache
        tmpfs:
          size: 1000000000
    ports:
      - "5000:5000"
      - "8554:8554" # RTSP feeds
      - "8555:8555/tcp" # WebRTC over tcp
      - "8555:8555/udp" # WebRTC over udp

@a2nt That error can be ignored, but I do think I've found a way to address it.

I've been putting some work into cleaning this up and trying to get the GPU acceleration working. It's just nothing ready for use. There's a "Requested unknown backend GpuAcc" error on startup which tells me it's not using the full capability of the GPU. Maybe it's just a device that needs to be passed in Docker, but my understanding is that "Privileged" mode gives the container full access to all of the hardware, so access shouldn't be an issue.

I'll try and get myself learned up on how the detector code works and get that GPU acceleration working this weekend, then post an update by Sunday evening. I'm a developer, but Docker and Python are brand new to me as of a couple of months ago, so I've got a steep learning curve. We'll get this going, though.

@divaldo95
Copy link

There's a "Requested unknown backend GpuAcc" error on startup which tells me it's not using the full capability of the GPU.

I ran into that issue too, as far as I remember adjusting LD_PRELOAD and LD_LIBRARY_PATH environmental variables solved the issue.

export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libdri2to3.so
export LD_LIBRARY_PATH=/usr/lib/aarch64-linux-gnu/libmali-x11:/usr/lib/aarch64-linux-gnu/gl4es

I added these to my docker-compose file:

environment:
      FRIGATE_RTSP_PASSWORD: "your_preferred_password"
      FFMPEG_RKMPP_PIXFMT: "YUV420P"
      LD_PRELOAD: /usr/lib/aarch64-linux-gnu/libdri2to3.so
      LD_LIBRARY_PATH: /usr/lib/aarch64-linux-gnu/libmali-x11:/usr/lib/aarch64-linux-gnu/gl4es

I remember I installed malirun which maybe installs some dependencies which are needed:
sudo apt update && sudo apt install malirun

@great9
Copy link

great9 commented Sep 22, 2023

I can confirm that on the rock5b with rk3588 armnn detector works using the cpu model.
rknn detector has many issues with detection and logging but this part is due to the npu toolkit.

To summarize:

  • armnn detector works with cpu_model.tflite and 8 threads
  • VPU decoding using drm and hwaccel might not be working
  • HEVC encoding using ffmpeg from @hbiyik could be producing out-of-memory errors on an 8GB board
  • H264 encoding using ffmpeg from @hbiyik could be producing out-of-memory errors on an 8GB board
  • RKNN detector logs a bunch of messages all the time and needs a threshold adjustement for detection

Using @kcembrey OrangePi5 branch with a little bit of modifications (thank you) and @hbiyik and ffmpeg-rk branch maintainer.

CPU usage is around 5.8 - 6 for 4 x 4k streams and dmesg produces these logs
mpp_rkvdec2 fdc38100.rkvdec-core: resetting...
[602400.861226] mpp_rkvdec2 fdc38100.rkvdec-core: reset done
which makes me think that the high load is due to no hwaccel (rkvdec2 resetting?)

Also, dmesg spits out so many buckets of the same log messages that it's hard to go through them.
For instance:
mali fb000000.gpu: OOM notifier: dev mali0 32 kB

This makes me think that the VPU decoder is not utilized regardless of using hwaccel drm and hwaccel hevc or h264 encoding.
I'm using the latest everything except for the yolov5s model that was built using toolkit 1.4.0

@faugconti
Copy link

I managed to build kc's image after a few tries , H264 & hevc decoding seems to be working but i was expecting less CPU usage , perhaps its due to the librga used in the build process? .. anyways.. im getting this warning when using RKNN detector

W RKNN: [16:01:32.494] Output(Identity): size_with_stride larger than model origin size, if need run OutputOperator in NPU, please call rknn_create_memory using size_with_stride.

@a2nt
Copy link

a2nt commented Oct 12, 2023

Found repositories with pre-built binaries for ubuntu.
There's pre-built ffmpeg available

# ArmNN
add-apt-repository ppa:armnn/ppa
apt update
apt install armnn-latest-all python3-pyarmnn

# GPU, FFMpeg, MPP, MPV
add-apt-repository ppa:liujianfeng1994/rockchip-multimedia
add-apt-repository ppa:liujianfeng1994/mainline-vpu

apt install mali-g610-firmware rockchip-multimedia-config ffmpeg
 ffmpeg -decoders | grep rkmpp
 V..... av1_rkmpp_decoder    av1 (rkmpp decoder ) (codec av1)
 V..... h263_rkmpp_decoder   h263 (rkmpp decoder ) (codec h263)
 V..... h264_rkmpp_decoder   h264 (rkmpp decoder ) (codec h264)
 V..... hevc_rkmpp_decoder   hevc (rkmpp decoder ) (codec hevc)
 V..... mpeg1_rkmpp_decoder  mpeg1 (rkmpp decoder ) (codec mpeg1video)
 V..... mpeg2_rkmpp_decoder  mpeg2 (rkmpp decoder ) (codec mpeg2video)
 V..... mpeg4_rkmpp_decoder  mpeg4 (rkmpp decoder ) (codec mpeg4)
 V..... vp8_rkmpp_decoder    vp8 (rkmpp decoder ) (codec vp8)
 V..... vp9_rkmpp_decoder    vp9 (rkmpp decoder ) (codec vp9)
ffmpeg -encoders | grep rkmpp
V..... h264_rkmpp_encoder   h264 (rkmpp encoder ) (codec h264)
 V..... hevc_rkmpp_encoder   hevc (rkmpp encoder ) (codec hevc)
 V..... vp8_rkmpp_encoder    vp8 (rkmpp encoder ) (codec vp8)

Hopefully it will be helpful to create docker image

@FrancisMurtagh-arm
Copy link

@kcembrey Getting following errors:

2023-09-01 21:23:05.841558079  /usr/local/lib/python3.9/dist-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: ''If you don't plan on using image functionality from `torchvision.io`, you can ignore this warning. Otherwise, there might be something wrong with your environment. Did you have `libjpeg` or `libpng` installed before building `torchvision` from source?

2023-09-01 21:23:20.868058451  Couldn't find any of the following OpenCL library: libOpenCL.so libGLES_mali.so libmali.so 
2023-09-01 21:23:20.868446362  INFO: TfLiteArmnnDelegate: Requested unknown backend GpuAcc
2023-09-01 21:23:20.868459778  INFO: TfLiteArmnnDelegate: Created TfLite ArmNN delegate.

frigate    | 2023-09-01 21:48:06.396417814  [2023-09-01 21:48:06] ffmpeg.camera_2.detect         ERROR   : [AVHWDeviceContext @ 0xaaaaf3ce3f80] drm device '/dev/dri/renderD128' does not support dumb buffers

Hi, fwiw the GpuAcc backend dynamically loads one of these libOpenCL.so libGLES_mali.so libmali.so, otherwise it will fail to register in ArmNN. You may need a symlink with one of those names linking to the actual libmali.so depending on its name on your device. The symlink should be in your LD_LIBRARY_PATH also.

Francis.

@faugconti
Copy link

yes i forgot to mention i had to manually add the openCL dependencies.. you can find them in these repos:

https://github.com/JeffyCN/mirrors/tree/libmali/lib/aarch64-linux-gnu
https://github.com/JeffyCN/mirrors/tree/libmali/firmware/g610

@sylv3rblade
Copy link
Contributor

image
wondering if anyone else is getting a GPG error for debian on kcembrey's build

@kcembrey
Copy link

image wondering if anyone else is getting a GPG error for debian on kcembrey's build
@sylv3rblade this is because something seems to have changed with the Debian ppa that requires pulling the new key. This update is included in the "Makefile" file in recent dev branches of the main repo. You can manually merge those changes into your local copy of my repo for now.

I've merged all of the recent changes into my branch locally, and hope to push that soon, but I'm also trying to add features mentioned in the previous comments to get everything more optimized. I'll reply in here when I've pushed the new commits to the branch.

@great9
Copy link

great9 commented Nov 15, 2023

Marc has pushed a commit that enables hevc and h264 encoders/decoders which are based on latest ffmpeg builds with rockchip support. His pull request has been merged to frigate main branch (dev).
using the built image it's possible to use rk3588 VPU and possibly for scaling (frigate detect function).

I'll be testing shortly.

@NickM-27 NickM-27 closed this Nov 15, 2023
@drunlade
Copy link

So with the closing of this issue, does that mean the dev branch (and I assume the next main release) will have full RK3588 support for video enc/dec and NN acceleration? I ask because the latter seems like the point of this issue and not covered by the PR that was mentioned, and the comments here thus far suggest its a bit of a "you can manually fudge things to make it work".

@MarcA711
Copy link
Contributor

@drunlade At least I work on it as much as I can. I hope to get everything working until the next big release. But I can't promise, since I don't have much time left.

Yes, I plan to add full support for rknn NPU detector and FFmpeg hardware video de- and encode acceleration.

However, I currently don't work on the ArmNN detector that was also implemented here. I used the ArmNN implementation for some weeks and it worked great. I think we should merge the ArmNN detector as well, since almost any SBC without an NPU could use this, including the popular Raspberry Pi 4 and the new Raspberry Pi 5. If no one implements it, will try to do it, after I finished all my work on the rockchip image (probably not before next year).

@MarcA711
Copy link
Contributor

By the way, basic NN detection support using rockchip NPU was already implemented in another PR before and is already merged in the dev branch. I currently work on adding some features to it. But the current implementation in dev is usable for detection and works great on my Orange Pi 5 Plus.

Just clone dev branch and use "sudo make local-rk" to build the image.

@NickM-27
Copy link
Collaborator

I closed this because the majority of work has been covered, there's been no code activity in many months, and in any case it would need to be refactored to fit in as a community supported build

@kcembrey
Copy link

@MarcA711 Thank you so much for your work. The detector is working amazing for me on my Orange Pi 5+.

@drunlade There's also a prebuilt container that works by setting the image property in your docker-compose file to image: ghcr.io/blakeblackshear/frigate:0.13.0-beta5-rk

I kept intending on working on this some more, but it was way over my head and work has been keeping me busy.

I may revisit the armnn detector in the future (in a separate thread), but it's still not all that efficient, so not much of an improvement over CPU. The rk detector is way more efficient for rockchip devices, so I think the armnn detector would only benefit those without a separate NPU on their chip.

Thanks so much for the work of everyone on this!

@zjd1988
Copy link

zjd1988 commented Nov 30, 2023

MarcA711

@MarcA711 wonderfull job

I had run "make local-rk" and build docker image successfully, But got errrors when run the docker image,

2023-11-30 16:51:21.570305780  [INFO] Preparing Frigate...
2023-11-30 16:51:21.591934689  [INFO] Starting Frigate...
2023-11-30 16:51:23.013781556  /usr/local/lib/python3.9/dist-packages/numpy/core/getlimits.py:500: UserWarning: The value of the smallest subnormal for <class 'numpy.float64'> type is zero.
2023-11-30 16:51:23.013786806    setattr(self, word, getattr(machar, word).flat[0])
2023-11-30 16:51:23.013917761  /usr/local/lib/python3.9/dist-packages/numpy/core/getlimits.py:89: UserWarning: The value of the smallest subnormal for <class 'numpy.float64'> type is zero.
2023-11-30 16:51:23.013919802    return self._float_to_str(self.smallest_subnormal)
2023-11-30 16:51:23.014070299  /usr/local/lib/python3.9/dist-packages/numpy/core/getlimits.py:500: UserWarning: The value of the smallest subnormal for <class 'numpy.float32'> type is zero.
2023-11-30 16:51:23.014072340    setattr(self, word, getattr(machar, word).flat[0])
2023-11-30 16:51:23.014171213  /usr/local/lib/python3.9/dist-packages/numpy/core/getlimits.py:89: UserWarning: The value of the smallest subnormal for <class 'numpy.float32'> type is zero.
2023-11-30 16:51:23.014172963    return self._float_to_str(self.smallest_subnormal)
2023-11-30 16:51:23.451689232  [2023-11-30 16:51:23] frigate.app                    INFO    : Starting Frigate (0.13.0-f00ced5a)
2023-11-30 16:51:23.451864812  [2023-11-30 16:51:23] frigate.app                    INFO    : Creating directory: /config/model_cache
2023-11-30 16:51:23.486109174  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Starting migrations
2023-11-30 16:51:23.523420048  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Migrate "001_create_events_table"
2023-11-30 16:51:23.523802998  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : sql ('CREATE TABLE IF NOT EXISTS "event" ("id" VARCHAR(30) NOT NULL PRIMARY KEY, "label" VARCHAR(20) NOT NULL, "camera" VARCHAR(20) NOT NULL, "start_time" DATETIME NOT NULL, "end_time" DATETIME NOT NULL, "top_score" REAL NOT NULL, "false_positive" INTEGER NOT NULL, "zones" JSON NOT NULL, "thumbnail" TEXT NOT NULL)',)
2023-11-30 16:51:23.524704810  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : sql ('CREATE INDEX IF NOT EXISTS "event_label" ON "event" ("label")',)
2023-11-30 16:51:23.525563456  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : sql ('CREATE INDEX IF NOT EXISTS "event_camera" ON "event" ("camera")',)
2023-11-30 16:51:23.527737489  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Done 001_create_events_table
2023-11-30 16:51:23.545177579  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Migrate "002_add_clip_snapshot"
2023-11-30 16:51:23.545659984  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : add_column ('event', 'has_clip', <BooleanField: Event.has_clip>)
2023-11-30 16:51:23.556208153  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : add_column ('event', 'has_snapshot', <BooleanField: Event.has_snapshot>)
2023-11-30 16:51:23.559513826  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Done 002_add_clip_snapshot
2023-11-30 16:51:23.623235663  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Migrate "003_create_recordings_table"
2023-11-30 16:51:23.623607529  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : sql ('CREATE TABLE IF NOT EXISTS "recordings" ("id" VARCHAR(30) NOT NULL PRIMARY KEY, "camera" VARCHAR(20) NOT NULL, "path" VARCHAR(255) NOT NULL, "start_time" DATETIME NOT NULL, "end_time" DATETIME NOT NULL, "duration" REAL NOT NULL)',)
2023-11-30 16:51:23.624637380  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : sql ('CREATE INDEX IF NOT EXISTS "recordings_camera" ON "recordings" ("camera")',)
2023-11-30 16:51:23.625423695  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : sql ('CREATE UNIQUE INDEX IF NOT EXISTS "recordings_path" ON "recordings" ("path")',)
2023-11-30 16:51:23.626098596  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : sql ('CREATE INDEX IF NOT EXISTS "recordings_start_time_end_time" ON "recordings" (start_time, end_time)',)
2023-11-30 16:51:23.627907762  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Done 003_create_recordings_table
2023-11-30 16:51:23.650115615  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Migrate "004_add_bbox_region_area"
2023-11-30 16:51:23.650421275  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : add_column ('event', 'region', <JSONField: Event.region>)
2023-11-30 16:51:23.657499275  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : add_column ('event', 'box', <JSONField: Event.box>)
2023-11-30 16:51:23.663944082  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : add_column ('event', 'area', <IntegerField: Event.area>)
2023-11-30 16:51:23.670734214  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Done 004_add_bbox_region_area
2023-11-30 16:51:23.688506214  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Migrate "005_make_end_time_nullable"
2023-11-30 16:51:23.688818581  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : drop_not_null ('event', 'end_time')
2023-11-30 16:51:23.695572256  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Done 005_make_end_time_nullable
2023-11-30 16:51:23.712182575  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Migrate "006_add_motion_active_objects"
2023-11-30 16:51:23.712491151  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : add_column ('recordings', 'objects', <IntegerField: Recordings.objects>)
2023-11-30 16:51:23.713477836  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : add_column ('recordings', 'motion', <IntegerField: Recordings.motion>)
2023-11-30 16:51:23.715281752  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Done 006_add_motion_active_objects
2023-11-30 16:51:23.728345487  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Migrate "007_add_retain_indefinitely"
2023-11-30 16:51:23.728642980  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : add_column ('event', 'retain_indefinitely', <BooleanField: Event.retain_indefinitely>)
2023-11-30 16:51:23.736001849  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Done 007_add_retain_indefinitely
2023-11-30 16:51:23.751176617  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Migrate "008_add_sub_label"
2023-11-30 16:51:23.751486652  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : add_column ('event', 'sub_label', <CharField: Event.sub_label>)
2023-11-30 16:51:23.753233402  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Done 008_add_sub_label
2023-11-30 16:51:23.764532887  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Migrate "009_add_object_filter_ratio"
2023-11-30 16:51:23.764823089  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : add_column ('event', 'ratio', <FloatField: Event.ratio>)
2023-11-30 16:51:23.772459618  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Done 009_add_object_filter_ratio
2023-11-30 16:51:23.786374416  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Migrate "010_add_plus_image_id"
2023-11-30 16:51:23.786680659  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : add_column ('event', 'plus_id', <CharField: Event.plus_id>)
2023-11-30 16:51:23.788269038  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Done 010_add_plus_image_id
2023-11-30 16:51:23.798874373  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Migrate "011_update_indexes"
2023-11-30 16:51:23.799161366  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : sql ('CREATE INDEX "event_start_time_end_time" ON "event" ("start_time" DESC, "end_time" DESC)',)
2023-11-30 16:51:23.799798934  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : sql ('DROP INDEX recordings_start_time_end_time',)
2023-11-30 16:51:23.800412295  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : sql ('CREATE INDEX "recordings_end_time_start_time" ON "recordings" ("end_time" DESC, "start_time" DESC)',)
2023-11-30 16:51:23.802043840  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Done 011_update_indexes
2023-11-30 16:51:23.815506274  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Migrate "012_add_segment_size"
2023-11-30 16:51:23.815804058  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : add_column ('recordings', 'segment_size', <FloatField: Recordings.segment_size>)
2023-11-30 16:51:23.824157779  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Done 012_add_segment_size
2023-11-30 16:51:23.842319144  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Migrate "013_create_timeline_table"
2023-11-30 16:51:23.842655428  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : sql ('CREATE TABLE IF NOT EXISTS "timeline" ("timestamp" DATETIME NOT NULL, "camera" VARCHAR(20) NOT NULL, "source" VARCHAR(20) NOT NULL, "source_id" VARCHAR(30), "class_type" VARCHAR(50) NOT NULL, "data" JSON)',)
2023-11-30 16:51:23.843175749  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : sql ('CREATE INDEX IF NOT EXISTS "timeline_camera" ON "timeline" ("camera")',)
2023-11-30 16:51:23.844017771  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : sql ('CREATE INDEX IF NOT EXISTS "timeline_source" ON "timeline" ("source")',)
2023-11-30 16:51:23.844422595  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : sql ('CREATE INDEX IF NOT EXISTS "timeline_source_id" ON "timeline" ("source_id")',)
2023-11-30 16:51:23.845892852  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Done 013_create_timeline_table
2023-11-30 16:51:23.868744524  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Migrate "014_event_updates_for_fp"
2023-11-30 16:51:23.869405717  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : add_column ('event', 'score', <FloatField: Event.score>)
2023-11-30 16:51:23.872378605  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : add_column ('event', 'model_hash', <CharField: Event.model_hash>)
2023-11-30 16:51:23.875097750  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : add_column ('event', 'detector_type', <CharField: Event.detector_type>)
2023-11-30 16:51:23.877794728  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : add_column ('event', 'model_type', <CharField: Event.model_type>)
2023-11-30 16:51:23.879891262  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : drop_not_null ('event', 'area')
2023-11-30 16:51:23.886906556  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : drop_not_null ('event', 'false_positive')
2023-11-30 16:51:23.893336488  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : apply_default ('event', 'false_positive', <BooleanField: Event.false_positive>)
2023-11-30 16:51:23.894627958  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Done 014_event_updates_for_fp
2023-11-30 16:51:23.916171702  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Migrate "015_event_refactor"
2023-11-30 16:51:23.916510902  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : drop_not_null ('event', 'top_score')
2023-11-30 16:51:23.923414198  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : drop_not_null ('event', 'score')
2023-11-30 16:51:23.929693634  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : drop_not_null ('event', 'region')
2023-11-30 16:51:23.935671202  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : drop_not_null ('event', 'box')
2023-11-30 16:51:23.941626604  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : drop_not_null ('event', 'area')
2023-11-30 16:51:23.947583464  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : drop_not_null ('event', 'ratio')
2023-11-30 16:51:23.958088759  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : add_column ('event', 'data', <JSONField: Event.data>)
2023-11-30 16:51:23.967421290  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Done 015_event_refactor
2023-11-30 16:51:23.983077006  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Migrate "016_sublabel_increase"
2023-11-30 16:51:23.983429914  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : change_column ('event', 'sub_label', <CharField: Event.sub_label>)
2023-11-30 16:51:23.992266332  [2023-11-30 16:51:23] peewee_migrate.logs            INFO    : Done 016_sublabel_increase
2023-11-30 16:51:24.008344079  [2023-11-30 16:51:24] peewee_migrate.logs            INFO    : Migrate "017_update_indexes"
2023-11-30 16:51:24.008665780  [2023-11-30 16:51:24] peewee_migrate.logs            INFO    : sql ('CREATE INDEX "recordings_camera_segment_size" ON "recordings" ("camera", "segment_size")',)
2023-11-30 16:51:24.009946167  [2023-11-30 16:51:24] peewee_migrate.logs            INFO    : Done 017_update_indexes
2023-11-30 16:51:24.024094001  [2023-11-30 16:51:24] peewee_migrate.logs            INFO    : Migrate "018_add_dbfs"
2023-11-30 16:51:24.024409577  [2023-11-30 16:51:24] peewee_migrate.logs            INFO    : add_column ('recordings', 'dBFS', <IntegerField: Recordings.dBFS>)
2023-11-30 16:51:24.026032956  [2023-11-30 16:51:24] peewee_migrate.logs            INFO    : Done 018_add_dbfs
2023-11-30 16:51:24.037412647  [2023-11-30 16:51:24] peewee_migrate.logs            INFO    : Migrate "019_create_regions_table"
2023-11-30 16:51:24.037713056  [2023-11-30 16:51:24] peewee_migrate.logs            INFO    : sql ('CREATE TABLE IF NOT EXISTS "regions" ("camera" VARCHAR(20) NOT NULL PRIMARY KEY, "last_update" DATETIME NOT NULL, "grid" JSON)',)
2023-11-30 16:51:24.038912070  [2023-11-30 16:51:24] peewee_migrate.logs            INFO    : Done 019_create_regions_table
2023-11-30 16:51:24.052691246  [2023-11-30 16:51:24] peewee_migrate.logs            INFO    : Migrate "020_update_index_recordings"
2023-11-30 16:51:24.053050571  [2023-11-30 16:51:24] peewee_migrate.logs            INFO    : sql ('DROP INDEX recordings_end_time_start_time',)
2023-11-30 16:51:24.053720806  [2023-11-30 16:51:24] peewee_migrate.logs            INFO    : sql ('CREATE INDEX "recordings_camera_start_time_end_time" ON "recordings" ("camera", "start_time" DESC, "end_time" DESC)',)
2023-11-30 16:51:24.054528412  [2023-11-30 16:51:24] peewee_migrate.logs            INFO    : sql ('CREATE INDEX "recordings_api_recordings_summary" ON "recordings" ("camera", "start_time" DESC, "duration", "motion", "objects")',)
2023-11-30 16:51:24.055242978  [2023-11-30 16:51:24] peewee_migrate.logs            INFO    : sql ('CREATE INDEX "recordings_start_time" ON "recordings" ("start_time")',)
2023-11-30 16:51:24.056523073  [2023-11-30 16:51:24] peewee_migrate.logs            INFO    : Done 020_update_index_recordings
2023-11-30 16:51:24.115219028  [2023-11-30 16:51:24] frigate.app                    INFO    : Recording process started: 454
2023-11-30 16:51:24.125009174  [2023-11-30 16:51:24] frigate.app                    INFO    : go2rtc process pid: 89
2023-11-30 16:51:24.163276983  [2023-11-30 16:51:24] detector.cpu                   INFO    : Starting detection process: 463
2023-11-30 16:51:24.165320644  [2023-11-30 16:51:24] frigate.app                    INFO    : Output process started: 465
2023-11-30 16:51:24.170894555  [2023-11-30 16:51:24] frigate.detectors              WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.
2023-11-30 16:51:24.172512392  INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
2023-11-30 16:51:24.177528357  [2023-11-30 16:51:24] frigate.app                    INFO    : Camera processor started for test: 471
2023-11-30 16:51:24.188129025  [2023-11-30 16:51:24] frigate.app                    INFO    : Capture process started for test: 473
2023-11-30 16:51:44.234691894  [2023-11-30 16:51:44] watchdog.test                  INFO    : No frames received from test in 20 seconds. Exiting ffmpeg...
2023-11-30 16:51:44.235141634  [2023-11-30 16:51:44] watchdog.test                  INFO    : Waiting for ffmpeg to exit gracefully...
2023-11-30 16:51:44.269259999  [2023-11-30 16:51:44] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 16:51:44.269272249  [2023-11-30 16:51:44] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 16:51:54.317851902  [2023-11-30 16:51:54] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 16:51:54.322185676  [2023-11-30 16:51:54] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 16:51:54.324488913  [2023-11-30 16:51:54] ffmpeg.test.detect             ERROR   : [vost#1:0/rawvideo @ 0x55914ea6e0] Finishing stream without any data written to it.
2023-11-30 16:52:14.380720222  [2023-11-30 16:52:14] watchdog.test                  INFO    : No frames received from test in 20 seconds. Exiting ffmpeg...
2023-11-30 16:52:14.380732764  [2023-11-30 16:52:14] watchdog.test                  INFO    : Waiting for ffmpeg to exit gracefully...
2023-11-30 16:52:36.607282824  [2023-11-30 16:52:36] frigate.comms.dispatcher       INFO    : Turning off recordings for test
2023-11-30 16:52:37.376509930  [2023-11-30 16:52:37] frigate.comms.dispatcher       INFO    : Turning off detection for test
2023-11-30 16:52:44.398228294  [2023-11-30 16:52:44] watchdog.test                  INFO    : FFmpeg did not exit. Force killing...
2023-11-30 16:52:44.405299587  [2023-11-30 16:52:44] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 16:52:44.406152400  [2023-11-30 16:52:44] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 16:52:54.420657762  [2023-11-30 16:52:54] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 16:52:54.421117126  [2023-11-30 16:52:54] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 16:53:14.439829341  [2023-11-30 16:53:14] watchdog.test                  INFO    : No frames received from test in 20 seconds. Exiting ffmpeg...
2023-11-30 16:53:14.439841007  [2023-11-30 16:53:14] watchdog.test                  INFO    : Waiting for ffmpeg to exit gracefully...
2023-11-30 16:53:14.460989844  [2023-11-30 16:53:14] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 16:53:14.462257690  [2023-11-30 16:53:14] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 16:53:24.475642994  [2023-11-30 16:53:24] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 16:53:24.476158065  [2023-11-30 16:53:24] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 16:53:24.476921631  [2023-11-30 16:53:24] ffmpeg.test.detect             ERROR   : [rtsp @ 0x557a523eb0] DTS discontinuity in stream 1: packet 3 with DTS 75028845916203, packet 4 with DTS 75028845924485
2023-11-30 16:53:24.477520408  [2023-11-30 16:53:24] ffmpeg.test.detect             ERROR   : [vost#1:0/rawvideo @ 0x557a63e280] Finishing stream without any data written to it.
2023-11-30 16:53:44.494573828  [2023-11-30 16:53:44] watchdog.test                  INFO    : No frames received from test in 20 seconds. Exiting ffmpeg...
2023-11-30 16:53:44.494585787  [2023-11-30 16:53:44] watchdog.test                  INFO    : Waiting for ffmpeg to exit gracefully...
2023-11-30 16:53:44.543806299  [2023-11-30 16:53:44] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 16:53:44.543818548  [2023-11-30 16:53:44] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 16:53:54.546049781  [2023-11-30 16:53:54] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 16:53:54.558713068  [2023-11-30 16:53:54] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 16:53:54.559394677  [2023-11-30 16:53:54] ffmpeg.test.detect             ERROR   : [rtsp @ 0x55bf5f7eb0] DTS discontinuity in stream 1: packet 3 with DTS 75028847241405, packet 4 with DTS 75028847243550
2023-11-30 16:53:54.560148034  [2023-11-30 16:53:54] ffmpeg.test.detect             ERROR   : [vost#1:0/rawvideo @ 0x55bf744200] Finishing stream without any data written to it.
2023-11-30 16:54:14.580857077  [2023-11-30 16:54:14] watchdog.test                  INFO    : No frames received from test in 20 seconds. Exiting ffmpeg...
2023-11-30 16:54:14.580880701  [2023-11-30 16:54:14] watchdog.test                  INFO    : Waiting for ffmpeg to exit gracefully...
2023-11-30 16:54:44.599643991  [2023-11-30 16:54:44] watchdog.test                  INFO    : FFmpeg did not exit. Force killing...
2023-11-30 16:54:44.607244646  [2023-11-30 16:54:44] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 16:54:44.607256896  [2023-11-30 16:54:44] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 16:54:54.621036566  [2023-11-30 16:54:54] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 16:54:54.621898130  [2023-11-30 16:54:54] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 16:54:54.622540073  [2023-11-30 16:54:54] ffmpeg.test.detect             ERROR   : [h264 @ 0x5581e27420] Missing reference picture, default is 0
2023-11-30 16:54:54.623113768  [2023-11-30 16:54:54] ffmpeg.test.detect             ERROR   : [h264 @ 0x5581e27420] decode_slice_header error
2023-11-30 16:54:54.623593256  [2023-11-30 16:54:54] ffmpeg.test.detect             ERROR   : [h264 @ 0x5581e27420] Missing reference picture, default is 0
2023-11-30 16:54:54.674657059  [2023-11-30 16:54:54] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 16:54:54.675422666  [2023-11-30 16:54:54] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 16:55:04.687929158  [2023-11-30 16:55:04] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 16:55:04.690730550  [2023-11-30 16:55:04] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 16:55:04.693051871  [2023-11-30 16:55:04] ffmpeg.test.detect             ERROR   : [rtsp @ 0x556e830eb0] method DESCRIBE failed: 404 Not Found
2023-11-30 16:55:04.695227653  [2023-11-30 16:55:04] ffmpeg.test.detect             ERROR   : rtsp://127.0.0.1:8554/rtsp_cam: Server returned 404 Not Found
2023-11-30 16:55:04.814094073  [2023-11-30 16:55:04] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 16:55:04.814604478  [2023-11-30 16:55:04] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 16:55:14.754521547  [2023-11-30 16:55:14] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 16:55:14.754534089  [2023-11-30 16:55:14] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 16:55:14.754538172  [2023-11-30 16:55:14] ffmpeg.test.detect             ERROR   : [rtsp @ 0x55bfe89eb0] method DESCRIBE failed: 404 Not Found
2023-11-30 16:55:14.754541964  [2023-11-30 16:55:14] ffmpeg.test.detect             ERROR   : rtsp://127.0.0.1:8554/rtsp_cam: Server returned 404 Not Found
2023-11-30 16:55:34.788480280  [2023-11-30 16:55:34] watchdog.test                  INFO    : No frames received from test in 20 seconds. Exiting ffmpeg...
2023-11-30 16:55:34.788504196  [2023-11-30 16:55:34] watchdog.test                  INFO    : Waiting for ffmpeg to exit gracefully...
2023-11-30 16:55:34.852853395  [2023-11-30 16:55:34] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 16:55:34.854728184  [2023-11-30 16:55:34] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 16:55:44.867933659  [2023-11-30 16:55:44] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 16:55:44.867945909  [2023-11-30 16:55:44] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 16:55:44.867950867  [2023-11-30 16:55:44] ffmpeg.test.detect             ERROR   : [rtsp @ 0x55af297eb0] DTS discontinuity in stream 1: packet 3 with DTS 75028852105555, packet 4 with DTS 75028852108878
2023-11-30 16:55:44.867955242  [2023-11-30 16:55:44] ffmpeg.test.detect             ERROR   : [vost#1:0/rawvideo @ 0x55af3b4d90] Finishing stream without any data written to it.
2023-11-30 16:56:04.885986348  [2023-11-30 16:56:04] watchdog.test                  INFO    : No frames received from test in 20 seconds. Exiting ffmpeg...
2023-11-30 16:56:04.885998306  [2023-11-30 16:56:04] watchdog.test                  INFO    : Waiting for ffmpeg to exit gracefully...
2023-11-30 16:56:34.914505326  [2023-11-30 16:56:34] watchdog.test                  INFO    : FFmpeg did not exit. Force killing...
2023-11-30 16:56:34.919881200  [2023-11-30 16:56:34] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 16:56:34.924809376  [2023-11-30 16:56:34] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 16:56:34.925808311  [2023-11-30 16:56:34] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 16:56:44.939548315  [2023-11-30 16:56:44] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 16:56:44.939561148  [2023-11-30 16:56:44] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 16:56:44.939566107  [2023-11-30 16:56:44] ffmpeg.test.detect             ERROR   : [rtsp @ 0x556f743eb0] DTS discontinuity in stream 1: packet 3 with DTS 75028853434557, packet 4 with DTS 75028853441040
2023-11-30 16:57:04.963498990  [2023-11-30 16:57:04] watchdog.test                  INFO    : No frames received from test in 20 seconds. Exiting ffmpeg...
2023-11-30 16:57:04.963510949  [2023-11-30 16:57:04] watchdog.test                  INFO    : Waiting for ffmpeg to exit gracefully...
2023-11-30 16:57:04.999457147  [2023-11-30 16:57:04] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 16:57:05.000461915  [2023-11-30 16:57:04] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 16:57:05.001505182  [2023-11-30 16:57:05] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 16:57:05.001511599  [2023-11-30 16:57:05] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 16:57:15.003263176  [2023-11-30 16:57:14] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 16:57:15.003275718  [2023-11-30 16:57:15] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 16:57:15.003279801  [2023-11-30 16:57:15] ffmpeg.test.detect             ERROR   : [h264 @ 0x55924ef420] Missing reference picture, default is 0
2023-11-30 16:57:15.003283592  [2023-11-30 16:57:15] ffmpeg.test.detect             ERROR   : [h264 @ 0x55924ef420] decode_slice_header error
2023-11-30 16:57:15.003287384  [2023-11-30 16:57:15] ffmpeg.test.detect             ERROR   : [h264 @ 0x55924ef420] Missing reference picture, default is 0
2023-11-30 16:57:15.003293801  [2023-11-30 16:57:15] ffmpeg.test.detect             ERROR   : [vost#1:0/rawvideo @ 0x559258d180] Finishing stream without any data written to it.
2023-11-30 16:57:35.044496988  [2023-11-30 16:57:35] watchdog.test                  INFO    : No frames received from test in 20 seconds. Exiting ffmpeg...
2023-11-30 16:57:35.044509529  [2023-11-30 16:57:35] watchdog.test                  INFO    : Waiting for ffmpeg to exit gracefully...
2023-11-30 16:57:35.072114257  [2023-11-30 16:57:35] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 16:57:35.072127090  [2023-11-30 16:57:35] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 16:57:45.085510644  [2023-11-30 16:57:45] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 16:57:45.085995966  [2023-11-30 16:57:45] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 16:57:45.086730657  [2023-11-30 16:57:45] ffmpeg.test.detect             ERROR   : [rtsp @ 0x55a3b93eb0] DTS discontinuity in stream 1: packet 21 with DTS 75028857429682, packet 22 with DTS 75028857431754
2023-11-30 16:57:45.087370267  [2023-11-30 16:57:45] ffmpeg.test.detect             ERROR   : [vost#1:0/rawvideo @ 0x55a3cb6a70] Finishing stream without any data written to it.
2023-11-30 16:58:05.104640057  [2023-11-30 16:58:05] watchdog.test                  INFO    : No frames received from test in 20 seconds. Exiting ffmpeg...
2023-11-30 16:58:05.104652307  [2023-11-30 16:58:05] watchdog.test                  INFO    : Waiting for ffmpeg to exit gracefully...
2023-11-30 16:58:13.550382839  [2023-11-30 16:58:13] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 16:58:13.552394709  [2023-11-30 16:58:13] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 16:58:23.601299722  [2023-11-30 16:58:23] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 16:58:23.607918066  [2023-11-30 16:58:23] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 16:58:23.607950732  [2023-11-30 16:58:23] ffmpeg.test.detect             ERROR   : [vost#1:0/rawvideo @ 0x5577378620] Finishing stream without any data written to it.
2023-11-30 16:58:23.607969107  [2023-11-30 16:58:23] ffmpeg.test.detect             ERROR   : Error demuxing input file 0: Connection timed out
2023-11-30 16:58:23.720595882  [2023-11-30 16:58:23] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 16:58:23.721578775  [2023-11-30 16:58:23] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 16:58:33.709044521  [2023-11-30 16:58:33] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 16:58:33.709079229  [2023-11-30 16:58:33] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 16:58:33.714224691  [2023-11-30 16:58:33] ffmpeg.test.detect             ERROR   : [rtsp @ 0x5598ad2eb0] method DESCRIBE failed: 404 Not Found
2023-11-30 16:58:33.714254149  [2023-11-30 16:58:33] ffmpeg.test.detect             ERROR   : rtsp://127.0.0.1:8554/rtsp_cam: Server returned 404 Not Found
2023-11-30 16:58:33.831667353  [2023-11-30 16:58:33] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 16:58:33.832484876  [2023-11-30 16:58:33] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 16:58:43.818005209  [2023-11-30 16:58:43] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 16:58:43.821408588  [2023-11-30 16:58:43] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 16:58:43.826567467  [2023-11-30 16:58:43] ffmpeg.test.detect             ERROR   : [rtsp @ 0x55a4a91eb0] method DESCRIBE failed: 404 Not Found
2023-11-30 16:58:43.828077973  [2023-11-30 16:58:43] ffmpeg.test.detect             ERROR   : rtsp://127.0.0.1:8554/rtsp_cam: Server returned 404 Not Found
2023-11-30 16:58:43.878796450  [2023-11-30 16:58:43] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 16:58:43.880420703  [2023-11-30 16:58:43] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 16:58:53.894439493  [2023-11-30 16:58:53] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 16:58:53.898479273  [2023-11-30 16:58:53] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 16:58:53.902811880  [2023-11-30 16:58:53] ffmpeg.test.detect             ERROR   : [rtsp @ 0x55a0ca4eb0] method DESCRIBE failed: 404 Not Found
2023-11-30 16:58:53.905610648  [2023-11-30 16:58:53] ffmpeg.test.detect             ERROR   : rtsp://127.0.0.1:8554/rtsp_cam: Server returned 404 Not Found
2023-11-30 16:58:53.999686400  [2023-11-30 16:58:53] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 16:58:54.000786249  [2023-11-30 16:58:53] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 16:59:04.009284001  [2023-11-30 16:59:03] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 16:59:04.009319584  [2023-11-30 16:59:03] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 16:59:04.009338250  [2023-11-30 16:59:03] ffmpeg.test.detect             ERROR   : [rtsp @ 0x55bcefbeb0] method DESCRIBE failed: 404 Not Found
2023-11-30 16:59:04.009356333  [2023-11-30 16:59:03] ffmpeg.test.detect             ERROR   : rtsp://127.0.0.1:8554/rtsp_cam: Server returned 404 Not Found
2023-11-30 16:59:04.100037331  [2023-11-30 16:59:04] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 16:59:04.100956934  [2023-11-30 16:59:04] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 16:59:14.117389542  [2023-11-30 16:59:14] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 16:59:14.117425708  [2023-11-30 16:59:14] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 16:59:14.117443791  [2023-11-30 16:59:14] ffmpeg.test.detect             ERROR   : [rtsp @ 0x55a5898eb0] method DESCRIBE failed: 404 Not Found
2023-11-30 16:59:14.117461874  [2023-11-30 16:59:14] ffmpeg.test.detect             ERROR   : rtsp://127.0.0.1:8554/rtsp_cam: Server returned 404 Not Found
2023-11-30 16:59:14.233666440  [2023-11-30 16:59:14] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 16:59:14.234616085  [2023-11-30 16:59:14] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 16:59:24.238145787  [2023-11-30 16:59:24] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 16:59:24.238171453  [2023-11-30 16:59:24] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 16:59:24.238183703  [2023-11-30 16:59:24] ffmpeg.test.detect             ERROR   : [rtsp @ 0x557f680eb0] method DESCRIBE failed: 404 Not Found
2023-11-30 16:59:24.238195661  [2023-11-30 16:59:24] ffmpeg.test.detect             ERROR   : rtsp://127.0.0.1:8554/rtsp_cam: Server returned 404 Not Found
2023-11-30 16:59:24.334480944  [2023-11-30 16:59:24] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 16:59:24.335461504  [2023-11-30 16:59:24] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 16:59:34.326513833  [2023-11-30 16:59:34] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 16:59:34.329523762  [2023-11-30 16:59:34] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 16:59:34.332101160  [2023-11-30 16:59:34] ffmpeg.test.detect             ERROR   : [rtsp @ 0x558cb4feb0] method DESCRIBE failed: 404 Not Found
2023-11-30 16:59:34.334938135  [2023-11-30 16:59:34] ffmpeg.test.detect             ERROR   : rtsp://127.0.0.1:8554/rtsp_cam: Server returned 404 Not Found
2023-11-30 16:59:54.355870173  [2023-11-30 16:59:54] watchdog.test                  INFO    : No frames received from test in 20 seconds. Exiting ffmpeg...
2023-11-30 16:59:54.355882131  [2023-11-30 16:59:54] watchdog.test                  INFO    : Waiting for ffmpeg to exit gracefully...
2023-11-30 16:59:54.369682015  [2023-11-30 16:59:54] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 16:59:54.369694557  [2023-11-30 16:59:54] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 17:00:04.382905240  [2023-11-30 17:00:04] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 17:00:04.383405729  [2023-11-30 17:00:04] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 17:00:04.383935383  [2023-11-30 17:00:04] ffmpeg.test.detect             ERROR   : [vost#1:0/rawvideo @ 0x55d7f207b0] Finishing stream without any data written to it.
2023-11-30 17:00:24.402430394  [2023-11-30 17:00:24] watchdog.test                  INFO    : No frames received from test in 20 seconds. Exiting ffmpeg...
2023-11-30 17:00:24.402442936  [2023-11-30 17:00:24] watchdog.test                  INFO    : Waiting for ffmpeg to exit gracefully...
2023-11-30 17:00:54.433448772  [2023-11-30 17:00:54] watchdog.test                  INFO    : FFmpeg did not exit. Force killing...
2023-11-30 17:00:54.446018727  [2023-11-30 17:00:54] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 17:00:54.453247516  [2023-11-30 17:00:54] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 17:00:54.454975600  [2023-11-30 17:00:54] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 17:00:54.457739952  [2023-11-30 17:00:54] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 17:00:54.457753660  [2023-11-30 17:00:54] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 17:01:04.466341119  [2023-11-30 17:01:04] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 17:01:04.467732336  [2023-11-30 17:01:04] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 17:01:04.467742544  [2023-11-30 17:01:04] ffmpeg.test.detect             ERROR   : [rtsp @ 0x55c963feb0] DTS discontinuity in stream 1: packet 3 with DTS 75028864877674, packet 4 with DTS 75028864883078
2023-11-30 17:01:24.484889754  [2023-11-30 17:01:24] watchdog.test                  INFO    : No frames received from test in 20 seconds. Exiting ffmpeg...
2023-11-30 17:01:24.484902587  [2023-11-30 17:01:24] watchdog.test                  INFO    : Waiting for ffmpeg to exit gracefully...
2023-11-30 17:01:54.517122853  [2023-11-30 17:01:54] watchdog.test                  INFO    : FFmpeg did not exit. Force killing...
2023-11-30 17:01:54.528020723  [2023-11-30 17:01:54] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 17:01:54.529865471  [2023-11-30 17:01:54] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 17:01:54.531038527  [2023-11-30 17:01:54] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 17:02:04.534450732  [2023-11-30 17:02:04] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 17:02:04.534474940  [2023-11-30 17:02:04] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 17:02:24.605231517  [2023-11-30 17:02:24] watchdog.test                  INFO    : No frames received from test in 20 seconds. Exiting ffmpeg...
2023-11-30 17:02:24.605243475  [2023-11-30 17:02:24] watchdog.test                  INFO    : Waiting for ffmpeg to exit gracefully...
2023-11-30 17:02:54.617146718  [2023-11-30 17:02:54] watchdog.test                  INFO    : FFmpeg did not exit. Force killing...
2023-11-30 17:02:54.631006685  [2023-11-30 17:02:54] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 17:02:54.631019809  [2023-11-30 17:02:54] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 17:03:04.669248490  [2023-11-30 17:03:04] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 17:03:04.669274739  [2023-11-30 17:03:04] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 17:03:04.669287280  [2023-11-30 17:03:04] ffmpeg.test.detect             ERROR   : [h264 @ 0x55679d6420] Missing reference picture, default is 0
2023-11-30 17:03:04.669298655  [2023-11-30 17:03:04] ffmpeg.test.detect             ERROR   : [h264 @ 0x55679d6420] decode_slice_header error
2023-11-30 17:03:04.674544449  [2023-11-30 17:03:04] ffmpeg.test.detect             ERROR   : [rtsp @ 0x55679d1eb0] DTS discontinuity in stream 1: packet 3 with DTS 75028870179959, packet 4 with DTS 75028870182344
2023-11-30 17:03:04.674567781  [2023-11-30 17:03:04] ffmpeg.test.detect             ERROR   : [h264 @ 0x55679d6420] Missing reference picture, default is 0
2023-11-30 17:03:04.760432726  [2023-11-30 17:03:04] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 17:03:04.761434869  [2023-11-30 17:03:04] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 17:03:14.755701289  [2023-11-30 17:03:14] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 17:03:14.755736871  [2023-11-30 17:03:14] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 17:03:14.759088042  [2023-11-30 17:03:14] ffmpeg.test.detect             ERROR   : [rtsp @ 0x55c421deb0] method DESCRIBE failed: 404 Not Found
2023-11-30 17:03:14.761517860  [2023-11-30 17:03:14] ffmpeg.test.detect             ERROR   : rtsp://127.0.0.1:8554/rtsp_cam: Server returned 404 Not Found
2023-11-30 17:03:14.877374185  [2023-11-30 17:03:14] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 17:03:14.878079127  [2023-11-30 17:03:14] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 17:03:24.830613400  [2023-11-30 17:03:24] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 17:03:24.830625650  [2023-11-30 17:03:24] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 17:03:24.830629733  [2023-11-30 17:03:24] ffmpeg.test.detect             ERROR   : [rtsp @ 0x55be8b7eb0] method DESCRIBE failed: 404 Not Found
2023-11-30 17:03:24.831575877  [2023-11-30 17:03:24] ffmpeg.test.detect             ERROR   : rtsp://127.0.0.1:8554/rtsp_cam: Server returned 404 Not Found
2023-11-30 17:03:24.878856560  [2023-11-30 17:03:24] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 17:03:24.880389232  [2023-11-30 17:03:24] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 17:03:34.861143594  [2023-11-30 17:03:34] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 17:03:34.861866910  [2023-11-30 17:03:34] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 17:03:34.862500395  [2023-11-30 17:03:34] ffmpeg.test.detect             ERROR   : [rtsp @ 0x55a3c15eb0] method DESCRIBE failed: 404 Not Found
2023-11-30 17:03:34.863099465  [2023-11-30 17:03:34] ffmpeg.test.detect             ERROR   : rtsp://127.0.0.1:8554/rtsp_cam: Server returned 404 Not Found
2023-11-30 17:03:34.922017666  [2023-11-30 17:03:34] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 17:03:34.922771898  [2023-11-30 17:03:34] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 17:03:44.892751596  [2023-11-30 17:03:44] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 17:03:44.893420664  [2023-11-30 17:03:44] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 17:03:44.894132605  [2023-11-30 17:03:44] ffmpeg.test.detect             ERROR   : [rtsp @ 0x558dca9eb0] method DESCRIBE failed: 404 Not Found
2023-11-30 17:03:44.894800506  [2023-11-30 17:03:44] ffmpeg.test.detect             ERROR   : rtsp://127.0.0.1:8554/rtsp_cam: Server returned 404 Not Found
2023-11-30 17:03:44.941800029  [2023-11-30 17:03:44] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 17:03:44.942878295  [2023-11-30 17:03:44] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 17:03:54.924994458  [2023-11-30 17:03:54] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 17:03:54.925813439  [2023-11-30 17:03:54] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 17:03:54.926325010  [2023-11-30 17:03:54] ffmpeg.test.detect             ERROR   : [rtsp @ 0x55a29f2eb0] method DESCRIBE failed: 404 Not Found
2023-11-30 17:03:54.926666544  [2023-11-30 17:03:54] ffmpeg.test.detect             ERROR   : rtsp://127.0.0.1:8554/rtsp_cam: Server returned 404 Not Found
2023-11-30 17:03:54.977692430  [2023-11-30 17:03:54] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 17:03:54.979265935  [2023-11-30 17:03:54] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 17:04:04.956741457  [2023-11-30 17:04:04] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 17:04:04.957679143  [2023-11-30 17:04:04] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 17:04:04.958210256  [2023-11-30 17:04:04] ffmpeg.test.detect             ERROR   : [rtsp @ 0x55b9414eb0] method DESCRIBE failed: 404 Not Found
2023-11-30 17:04:04.958690328  [2023-11-30 17:04:04] ffmpeg.test.detect             ERROR   : rtsp://127.0.0.1:8554/rtsp_cam: Server returned 404 Not Found
2023-11-30 17:04:05.002743836  [2023-11-30 17:04:05] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 17:04:05.004487379  [2023-11-30 17:04:05] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 17:04:15.017348571  [2023-11-30 17:04:14] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 17:04:15.018582292  [2023-11-30 17:04:14] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 17:04:15.019833221  [2023-11-30 17:04:14] ffmpeg.test.detect             ERROR   : [rtsp @ 0x55aa372eb0] method DESCRIBE failed: 404 Not Found
2023-11-30 17:04:15.020273627  [2023-11-30 17:04:14] ffmpeg.test.detect             ERROR   : rtsp://127.0.0.1:8554/rtsp_cam: Server returned 404 Not Found
2023-11-30 17:04:15.111274118  [2023-11-30 17:04:15] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 17:04:15.111916644  [2023-11-30 17:04:15] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 17:04:25.101980829  [2023-11-30 17:04:25] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 17:04:25.102008245  [2023-11-30 17:04:25] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 17:04:25.102020786  [2023-11-30 17:04:25] ffmpeg.test.detect             ERROR   : [rtsp @ 0x55d8313eb0] method DESCRIBE failed: 404 Not Found
2023-11-30 17:04:25.102032744  [2023-11-30 17:04:25] ffmpeg.test.detect             ERROR   : rtsp://127.0.0.1:8554/rtsp_cam: Server returned 404 Not Found
2023-11-30 17:04:25.191159029  [2023-11-30 17:04:25] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 17:04:25.191971593  [2023-11-30 17:04:25] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 17:04:35.154106433  [2023-11-30 17:04:35] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 17:04:35.154118975  [2023-11-30 17:04:35] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 17:04:35.154123058  [2023-11-30 17:04:35] ffmpeg.test.detect             ERROR   : [rtsp @ 0x559e29eeb0] method DESCRIBE failed: 404 Not Found
2023-11-30 17:04:35.154127141  [2023-11-30 17:04:35] ffmpeg.test.detect             ERROR   : rtsp://127.0.0.1:8554/rtsp_cam: Server returned 404 Not Found
2023-11-30 17:04:35.215138335  [2023-11-30 17:04:35] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 17:04:35.216098479  [2023-11-30 17:04:35] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 17:04:45.180253647  [2023-11-30 17:04:45] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 17:04:45.180288938  [2023-11-30 17:04:45] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 17:04:45.180307895  [2023-11-30 17:04:45] ffmpeg.test.detect             ERROR   : [rtsp @ 0x5562bb7eb0] method DESCRIBE failed: 404 Not Found
2023-11-30 17:04:45.180325978  [2023-11-30 17:04:45] ffmpeg.test.detect             ERROR   : rtsp://127.0.0.1:8554/rtsp_cam: Server returned 404 Not Found
2023-11-30 17:04:45.344426629  [2023-11-30 17:04:45] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 17:04:45.345188736  [2023-11-30 17:04:45] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 17:04:55.288606432  [2023-11-30 17:04:55] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 17:04:55.288642015  [2023-11-30 17:04:55] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 17:04:55.288661264  [2023-11-30 17:04:55] ffmpeg.test.detect             ERROR   : [rtsp @ 0x5574db3eb0] method DESCRIBE failed: 404 Not Found
2023-11-30 17:04:55.288679055  [2023-11-30 17:04:55] ffmpeg.test.detect             ERROR   : rtsp://127.0.0.1:8554/rtsp_cam: Server returned 404 Not Found
2023-11-30 17:04:55.456642324  [2023-11-30 17:04:55] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 17:04:55.457368265  [2023-11-30 17:04:55] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 17:05:05.402488129  [2023-11-30 17:05:05] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 17:05:05.403007284  [2023-11-30 17:05:05] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 17:05:05.403611895  [2023-11-30 17:05:05] ffmpeg.test.detect             ERROR   : [rtsp @ 0x557aab9eb0] method DESCRIBE failed: 404 Not Found
2023-11-30 17:05:05.403741683  [2023-11-30 17:05:05] ffmpeg.test.detect             ERROR   : rtsp://127.0.0.1:8554/rtsp_cam: Server returned 404 Not Found
2023-11-30 17:05:05.461776614  [2023-11-30 17:05:05] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 17:05:05.462514805  [2023-11-30 17:05:05] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 17:05:15.434075965  [2023-11-30 17:05:15] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 17:05:15.434522205  [2023-11-30 17:05:15] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 17:05:15.434902529  [2023-11-30 17:05:15] ffmpeg.test.detect             ERROR   : [rtsp @ 0x55888f8eb0] method DESCRIBE failed: 404 Not Found
2023-11-30 17:05:15.435239688  [2023-11-30 17:05:15] ffmpeg.test.detect             ERROR   : rtsp://127.0.0.1:8554/rtsp_cam: Server returned 404 Not Found
2023-11-30 17:05:15.487941744  [2023-11-30 17:05:15] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 17:05:15.488378942  [2023-11-30 17:05:15] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 17:05:25.453353965  [2023-11-30 17:05:25] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 17:05:25.466303953  [2023-11-30 17:05:25] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 17:05:25.466798316  [2023-11-30 17:05:25] ffmpeg.test.detect             ERROR   : [rtsp @ 0x557a9e7eb0] method DESCRIBE failed: 404 Not Found
2023-11-30 17:05:25.467157933  [2023-11-30 17:05:25] ffmpeg.test.detect             ERROR   : rtsp://127.0.0.1:8554/rtsp_cam: Server returned 404 Not Found
2023-11-30 17:05:25.511695847  [2023-11-30 17:05:25] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 17:05:25.512219376  [2023-11-30 17:05:25] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...
2023-11-30 17:05:35.532394021  [2023-11-30 17:05:35] watchdog.test                  ERROR   : Ffmpeg process crashed unexpectedly for test.
2023-11-30 17:05:35.536654588  [2023-11-30 17:05:35] watchdog.test                  ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-11-30 17:05:35.538464337  [2023-11-30 17:05:35] ffmpeg.test.detect             ERROR   : [rtsp @ 0x5596c77eb0] method DESCRIBE failed: 404 Not Found
2023-11-30 17:05:35.539743557  [2023-11-30 17:05:35] ffmpeg.test.detect             ERROR   : rtsp://127.0.0.1:8554/rtsp_cam: Server returned 404 Not Found
2023-11-30 17:05:35.655059144  [2023-11-30 17:05:35] frigate.video                  ERROR   : test: Unable to read frames from ffmpeg process.
2023-11-30 17:05:35.655549133  [2023-11-30 17:05:35] frigate.video                  ERROR   : test: ffmpeg process is not running. exiting capture thread...

can you share your docker image and docker-compose yaml file?

@MarcA711
Copy link
Contributor

Hey @zjd1988,

you can use this official beta image:
docker pull ghcr.io/blakeblackshear/frigate:0.13.0-beta6-rk

The beta docs mention all steps necessary to setup rknpu detector and hardware video acceleration.

You should specifically read the rockchip specific sections:
Hardware video acceleration:
https://deploy-preview-6262--frigate-docs.netlify.app/configuration/hardware_acceleration#rockchip-platform

Rknpu detector:
https://deploy-preview-6262--frigate-docs.netlify.app/configuration/object_detectors#rockchip-rknn-toolkit-lite2

If there are still problems please open a a new issue and make sure to include the following information:
docker_compose.yml
config.yml
Frigate logs
Output of: uname -a
Output of: cat /proc/device-tree/compatible

@zjd1988
Copy link

zjd1988 commented Nov 30, 2023

@MarcA711 THX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.