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

[Config Support]: pipe:: Invalid argument #5101

Closed
Larosen opened this issue Jan 15, 2023 · 20 comments
Closed

[Config Support]: pipe:: Invalid argument #5101

Larosen opened this issue Jan 15, 2023 · 20 comments

Comments

@Larosen
Copy link

Larosen commented Jan 15, 2023

Describe the problem you are having

Have a great weekend everyone.
I am in the process of moving Home Assistant from my DS920+ to a new Unraid server.
So new processor i5-13600K comes to use.
Also changed that now I don't want to run Frigate in Home Assistant itself, but as Docker in Unraid OS.

I took my old configuration 1:1, as it ran very stable for the last few months.
I then changed the hwaccel_args based on Nick's tips.

Interestingly, the error message "pipe:: Invalid argument", however pipe does not appear at all in my configuration.
Does anyone know what I need to change to make it work?

Version

0.11.1-2EADA21

Frigate config file

# yaml-language-server: $schema=http://homeassistant:5000/api/config/schema

mqtt:
  host: 10.20.60.113
  port: 1883
  user: *****
  password: *****

detectors:
  coral:
    type: edgetpu
    device: usb


cameras:
  Spielzimmer:
    ffmpeg:
      output_args:
        record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 copy -tag:v hvc1 -c:a aac
        rtmp: -c copy -f flv -tag:v hvc1
      inputs:
        - path: rtsp://*****@10.20.60.87:556/Streaming/Channels/102/
          roles:
            - detect
            - record
        #- path: rtsp://*****@10.20.60.87:556/Streaming/Channels/101/
        #  roles:
        #    - record
    best_image_timeout: 60
    detect:
      width: 640
      height: 480
      fps: 5
    motion:
      mask:
        - 640,316,640,0,531,0,360,0,350,62
        - 386,336,498,436,508,415,497,346,436,298,414,306
        - 291,0,254,275,116,350,97,37
    mqtt:
      enabled: True
      timestamp: True
      bounding_box: True
      crop: True
      height: 270
      quality: 100


  Sauna:
    ffmpeg:
      inputs:
        - path: rtsp://*****[email protected]:556/Streaming/Channels/103
          roles:
            - detect
            - rtmp
        - path: rtsp://*****[email protected]:556/Streaming/Channels/101
          roles:
            - record
    best_image_timeout: 60
    motion:
      mask:
        - 37,105,501,102,506,47,37,42
        - 1920,0,1920,281,1485,313,1046,397,983,0
        - 1072,464,1242,472,1255,341,1082,201
        - 1920,1080,1920,587,1344,514,1189,563,1099,652,837,827,1033,791,1119,945,960,1080
        - 1633,0,1920,0,1920,546,1795,532,1742,551,1698,543,1615,529,1558,446,1563,342
    mqtt:
      enabled: True
      timestamp: True
      bounding_box: True
      crop: True
      height: 270
      quality: 100


  Hintereingang:
    ffmpeg:
      inputs:
        - path: rtsp://*****@10.20.60.103:556/Streaming/Channels/103
          roles:
            - detect
            - rtmp  
        - path: rtsp://*****@10.20.60.103:556/Streaming/Channels/101
          roles:
            - record
    best_image_timeout: 60
    motion:
      mask:
        - 743,0,1800,0,1789,324,1159,345,877,373,846,490,696,535,563,461,469,529,292,881,0,639,0,469,0,0
    mqtt:
      enabled: True
      timestamp: True
      bounding_box: True
      crop: True
      height: 270
      quality: 100

  Hinten:
    ffmpeg:
      inputs:
        - path: rtsp://*****@10.20.60.105:556/Streaming/Channels/103
          roles:
            - detect
            - rtmp
        - path: rtsp://*****@10.20.60.105:556/Streaming/Channels/101
          roles:
            - record
    best_image_timeout: 60
    mqtt:
      enabled: True
      timestamp: True
      bounding_box: True
      crop: True
      height: 270
      quality: 100


birdseye:
  enabled: True
  width: 1920
  height: 1080
  quality: 27
  mode: continuous

timestamp_style:
  position: "tl"
  format: "%d/%m/%Y %H:%M:%S"
  color:
    red: 255
    green: 255
    blue: 255
  thickness: 2
  effect: shadow

motion:
  threshold: 50
  contour_area: 30
  delta_alpha: 0.2
  frame_alpha: 0.2
  frame_height: 50
  #mask: 0,900,1080,900,1080,1920,0,1920
  improve_contrast: True


record:
  enabled: True
  expire_interval: 60
  retain:
    days: 5
    mode: all
  events:
    pre_capture: 10
    post_capture: 15
    retain:
      default: 1
      mode: active_objects
      objects:
        person: 7
        cat: 7


objects:
  track:
    - person
    - mouse
    - cat
    - dog
    - laptop
    - handbag
    - umbrella
    - backpack
    - cell phone
    - bicycle
    - cow
    - sheep
    - bird
    - bear
    #- car
    - baseball bat
    - tennis racket
    - knife
    - bottle
    - scissors
  filters:
    person:
      min_area: 1000
      max_area: 400000
      min_score: 0.6
      threshold: 0.75
    cat:
      min_score: 0.7
      threshold: 0.80
    laptop:
      min_score: 0.8
      threshold: 0.9
    bird:
      min_score: 0.8
      threshold: 0.9
      max_area: 90000
    dog:
      min_score: 0.75
      threshold: 0.85
    umbrella:
      min_score: 0.7
      threshold: 0.84
      max_area: 202000
    mouse: 
      min_score: 0.7
      threshold: 0.84
      max_area: 6000
    bear:
      min_score: 0.7
      threshold: 0.9
      max_area: 24000
    sheep:
      min_score: 0.7
      threshold: 0.85
    backpack:
      min_score: 0.75
      threshold: 0.85
ffmpeg:
  global_args: -hide_banner -loglevel warning
  hwaccel_args: -c:v h264_qsv
    - -hwaccel
    - vaapi
    - -hwaccel_device
    - /dev/dri/renderD128
    - -hwaccel_output_format
    - yuv420p
   # - -hwaccel_output_format
   # - yuv420p
  input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1
  output_args:
    detect: -f rawvideo -pix_fmt yuv420p
    record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a aac
    rtmp: -c:v copy -c:a aac -f flv

detect:
  width: 1920
  height: 1080
  fps: 5
  enabled: True
  max_disappeared: 25
  stationary:
    interval: 10
    max_frames:
      objects:
        person: 1000
        cat: 5000

rtmp:
  enabled: False

snapshots:
  enabled: True
  timestamp: True
  bounding_box: True
  crop: True
  #height: 175
  required_zones: []
  retain:
    default: 10
    objects:
      person: 15
      cat: 10
      bear: 5
      dog: 5

Relevant log output

[2023-01-15 10:23:37] watchdog.Spielzimmer           ERROR   : Ffmpeg process crashed unexpectedly for Spielzimmer.
[2023-01-15 10:23:37] watchdog.Spielzimmer           ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2023-01-15 10:23:37] ffmpeg.Spielzimmer.detect      ERROR   : [NULL @ 0x55a0e63792c0] Unable to find a suitable output format for 'pipe:'
[2023-01-15 10:23:37] ffmpeg.Spielzimmer.detect      ERROR   : pipe:: Invalid argument
[2023-01-15 10:23:37] watchdog.Sauna                 ERROR   : Ffmpeg process crashed unexpectedly for Sauna.
[2023-01-15 10:23:37] watchdog.Sauna                 ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2023-01-15 10:23:37] ffmpeg.Sauna.detect            ERROR   : [NULL @ 0x55f182b3b400] Unable to find a suitable output format for 'pipe:'
[2023-01-15 10:23:37] ffmpeg.Sauna.detect            ERROR   : pipe:: Invalid argument
[2023-01-15 10:23:37] watchdog.Hintereingang         ERROR   : Ffmpeg process crashed unexpectedly for Hintereingang.
[2023-01-15 10:23:37] watchdog.Hintereingang         ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2023-01-15 10:23:37] ffmpeg.Hintereingang.detect    ERROR   : [NULL @ 0x55658d6a8fc0] Unable to find a suitable output format for 'pipe:'
[2023-01-15 10:23:37] ffmpeg.Hintereingang.detect    ERROR   : pipe:: Invalid argument
[2023-01-15 10:23:37] watchdog.Hinten                ERROR   : Ffmpeg process crashed unexpectedly for Hinten.
[2023-01-15 10:23:37] watchdog.Hinten                ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2023-01-15 10:23:37] ffmpeg.Hinten.detect           ERROR   : [NULL @ 0x5621225d9ac0] Unable to find a suitable output format for 'pipe:'
[2023-01-15 10:23:37] ffmpeg.Hinten.detect           ERROR   : pipe:: Invalid argument
[2023-01-15 10:23:37] ffmpeg.Sauna.record            ERROR   : [NULL @ 0x55b5a87c5240] Unable to find a suitable output format for 'pipe:'
[2023-01-15 10:23:37] ffmpeg.Hinten.record           ERROR   : [NULL @ 0x561f11409900] Unable to find a suitable output format for 'pipe:'
[2023-01-15 10:23:37] ffmpeg.Sauna.record            ERROR   : pipe:: Invalid argument
[2023-01-15 10:23:37] ffmpeg.Hintereingang.record    ERROR   : [NULL @ 0x558f41316fc0] Unable to find a suitable output format for 'pipe:'
[2023-01-15 10:23:37] watchdog.Sauna                 INFO    : Terminating the existing ffmpeg process...
[2023-01-15 10:23:37] ffmpeg.Hintereingang.record    ERROR   : pipe:: Invalid argument
[2023-01-15 10:23:37] watchdog.Sauna                 INFO    : Waiting for ffmpeg to exit gracefully...
[2023-01-15 10:23:37] watchdog.Hintereingang         INFO    : Terminating the existing ffmpeg process...
[2023-01-15 10:23:37] ffmpeg.Hinten.record           ERROR   : pipe:: Invalid argument
[2023-01-15 10:23:37] watchdog.Hintereingang         INFO    : Waiting for ffmpeg to exit gracefully...
[2023-01-15 10:23:37] watchdog.Hinten                INFO    : Terminating the existing ffmpeg process...
[2023-01-15 10:23:37] watchdog.Hinten                INFO    : Waiting for ffmpeg to exit gracefully...
[2023-01-15 10:23:41] frigate.video                  ERROR   : Spielzimmer: Unable to read frames from ffmpeg process.
[2023-01-15 10:23:41] frigate.video                  ERROR   : Spielzimmer: ffmpeg process is not running. exiting capture thread...
[2023-01-15 10:23:41] frigate.video                  ERROR   : Hinten: Unable to read frames from ffmpeg process.
[2023-01-15 10:23:41] frigate.video                  ERROR   : Hinten: ffmpeg process is not running. exiting capture thread...
[2023-01-15 10:23:41] frigate.video                  ERROR   : Sauna: Unable to read frames from ffmpeg process.
[2023-01-15 10:23:41] frigate.video                  ERROR   : Sauna: ffmpeg process is not running. exiting capture thread...
[2023-01-15 10:23:41] frigate.video                  ERROR   : Hintereingang: Unable to read frames from ffmpeg process.
[2023-01-15 10:23:41] frigate.video                  ERROR   : Hintereingang: ffmpeg process is not running. exiting capture thread...
[2023-01-15 10:23:47] watchdog.Spielzimmer           ERROR   : Ffmpeg process crashed unexpectedly for Spielzimmer.
[2023-01-15 10:23:47] watchdog.Spielzimmer           ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2023-01-15 10:23:47] ffmpeg.Spielzimmer.detect      ERROR   : [NULL @ 0x562efbae6280] Unable to find a suitable output format for 'pipe:'
[2023-01-15 10:23:47] ffmpeg.Spielzimmer.detect      ERROR   : pipe:: Invalid argument
[2023-01-15 10:23:47] watchdog.Sauna                 ERROR   : Ffmpeg process crashed unexpectedly for Sauna.
[2023-01-15 10:23:47] watchdog.Sauna                 ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2023-01-15 10:23:47] ffmpeg.Sauna.detect            ERROR   : [NULL @ 0x555a4d88d400] Unable to find a suitable output format for 'pipe:'
[2023-01-15 10:23:47] watchdog.Hinten                ERROR   : Ffmpeg process crashed unexpectedly for Hinten.
[2023-01-15 10:23:47] watchdog.Hinten                ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2023-01-15 10:23:47] ffmpeg.Hinten.detect           ERROR   : [NULL @ 0x55810bfd4d40] Unable to find a suitable output format for 'pipe:'
[2023-01-15 10:23:47] watchdog.Hintereingang         ERROR   : Ffmpeg process crashed unexpectedly for Hintereingang.
[2023-01-15 10:23:47] ffmpeg.Hinten.detect           ERROR   : pipe:: Invalid argument
[2023-01-15 10:23:47] ffmpeg.Sauna.detect            ERROR   : pipe:: Invalid argument
[2023-01-15 10:23:47] watchdog.Hintereingang         ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2023-01-15 10:23:47] ffmpeg.Hintereingang.detect    ERROR   : [NULL @ 0x555df5226400] Unable to find a suitable output format for 'pipe:'
[2023-01-15 10:23:47] ffmpeg.Hintereingang.detect    ERROR   : pipe:: Invalid argument
[2023-01-15 10:23:47] ffmpeg.Hintereingang.record    ERROR   : [NULL @ 0x55b3fb57bd40] Unable to find a suitable output format for 'pipe:'
[2023-01-15 10:23:47] ffmpeg.Hintereingang.record    ERROR   : pipe:: Invalid argument
[2023-01-15 10:23:47] watchdog.Hintereingang         INFO    : Terminating the existing ffmpeg process...
[2023-01-15 10:23:47] watchdog.Hintereingang         INFO    : Waiting for ffmpeg to exit gracefully...
[2023-01-15 10:23:47] ffmpeg.Sauna.record            ERROR   : [NULL @ 0x56246419c680] Unable to find a suitable output format for 'pipe:'
[2023-01-15 10:23:47] ffmpeg.Sauna.record            ERROR   : pipe:: Invalid argument
[2023-01-15 10:23:47] watchdog.Sauna                 INFO    : Terminating the existing ffmpeg process...
[2023-01-15 10:23:47] watchdog.Sauna                 INFO    : Waiting for ffmpeg to exit gracefully...
[2023-01-15 10:23:47] ffmpeg.Hinten.record           ERROR   : [NULL @ 0x55d15a06e900] Unable to find a suitable output format for 'pipe:'
[2023-01-15 10:23:47] ffmpeg.Hinten.record           ERROR   : pipe:: Invalid argument
[2023-01-15 10:23:47] watchdog.Hinten                INFO    : Terminating the existing ffmpeg process...
[2023-01-15 10:23:47] watchdog.Hinten                INFO    : Waiting for ffmpeg to exit gracefully...
[2023-01-15 10:23:51] frigate.video                  ERROR   : Spielzimmer: Unable to read frames from ffmpeg process.
[2023-01-15 10:23:51] frigate.video                  ERROR   : Spielzimmer: ffmpeg process is not running. exiting capture thread...
[2023-01-15 10:23:51] frigate.video                  ERROR   : Sauna: Unable to read frames from ffmpeg process.
[2023-01-15 10:23:51] frigate.video                  ERROR   : Sauna: ffmpeg process is not running. exiting capture thread...
[2023-01-15 10:23:51] frigate.video                  ERROR   : Hinten: Unable to read frames from ffmpeg process.
[2023-01-15 10:23:51] frigate.video                  ERROR   : Hinten: ffmpeg process is not running. exiting capture thread...
[2023-01-15 10:23:51] frigate.video                  ERROR   : Hintereingang: Unable to read frames from ffmpeg process.
[2023-01-15 10:23:51] frigate.video                  ERROR   : Hintereingang: ffmpeg process is not running. exiting capture thread...
[2023-01-15 10:23:57] watchdog.Spielzimmer           ERROR   : Ffmpeg process crashed unexpectedly for Spielzimmer.
[2023-01-15 10:23:57] watchdog.Spielzimmer           ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2023-01-15 10:23:57] ffmpeg.Spielzimmer.detect      ERROR   : [NULL @ 0x55eb24d4c340] Unable to find a suitable output format for 'pipe:'
[2023-01-15 10:23:57] ffmpeg.Spielzimmer.detect      ERROR   : pipe:: Invalid argument
[2023-01-15 10:23:57] watchdog.Hinten                ERROR   : Ffmpeg process crashed unexpectedly for Hinten.
[2023-01-15 10:23:57] watchdog.Hinten                ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2023-01-15 10:23:57] ffmpeg.Hinten.detect           ERROR   : [NULL @ 0x55e7ca24e400] Unable to find a suitable output format for 'pipe:'
[2023-01-15 10:23:57] ffmpeg.Hinten.detect           ERROR   : pipe:: Invalid argument
[2023-01-15 10:23:57] watchdog.Sauna                 ERROR   : Ffmpeg process crashed unexpectedly for Sauna.
[2023-01-15 10:23:57] watchdog.Sauna                 ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2023-01-15 10:23:57] ffmpeg.Sauna.detect            ERROR   : [NULL @ 0x55ac7e3e3d40] Unable to find a suitable output format for 'pipe:'
[2023-01-15 10:23:57] ffmpeg.Sauna.detect            ERROR   : pipe:: Invalid argument
[2023-01-15 10:23:57] watchdog.Hintereingang         ERROR   : Ffmpeg process crashed unexpectedly for Hintereingang.
[2023-01-15 10:23:57] watchdog.Hintereingang         ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2023-01-15 10:23:57] ffmpeg.Hintereingang.detect    ERROR   : [rtsp @ 0x559cf0c74140] DTS discontinuity in stream 1: packet 14 with DTS 80341182148553, packet 15 with DTS 80341182152543
[2023-01-15 10:23:57] ffmpeg.Hintereingang.detect    ERROR   : [NULL @ 0x559cf0c8fac0] Unable to find a suitable output format for 'pipe:'
[2023-01-15 10:23:57] ffmpeg.Hintereingang.detect    ERROR   : pipe:: Invalid argument
[2023-01-15 10:23:57] ffmpeg.Hinten.record           ERROR   : [NULL @ 0x55ffb7e7bfc0] Unable to find a suitable output format for 'pipe:'
[2023-01-15 10:23:57] ffmpeg.Hinten.record           ERROR   : pipe:: Invalid argument
[2023-01-15 10:23:57] watchdog.Hinten                INFO    : Terminating the existing ffmpeg process...
[2023-01-15 10:23:57] watchdog.Hinten                INFO    : Waiting for ffmpeg to exit gracefully...
[2023-01-15 10:23:57] ffmpeg.Sauna.record            ERROR   : [NULL @ 0x556e8a267fc0] Unable to find a suitable output format for 'pipe:'
[2023-01-15 10:23:57] ffmpeg.Sauna.record            ERROR   : pipe:: Invalid argument
[2023-01-15 10:23:57] watchdog.Sauna                 INFO    : Terminating the existing ffmpeg process...
[2023-01-15 10:23:57] watchdog.Sauna                 INFO    : Waiting for ffmpeg to exit gracefully...
[2023-01-15 10:23:57] ffmpeg.Hintereingang.record    ERROR   : [NULL @ 0x55aed226f900] Unable to find a suitable output format for 'pipe:'
[2023-01-15 10:23:57] ffmpeg.Hintereingang.record    ERROR   : pipe:: Invalid argument
[2023-01-15 10:23:57] watchdog.Hintereingang         INFO    : Terminating the existing ffmpeg process...
[2023-01-15 10:23:57] watchdog.Hintereingang         INFO    : Waiting for ffmpeg to exit gracefully...
[2023-01-15 10:24:01] frigate.video                  ERROR   : Spielzimmer: Unable to read frames from ffmpeg process.
[2023-01-15 10:24:01] frigate.video                  ERROR   : Spielzimmer: ffmpeg process is not running. exiting capture thread...
[2023-01-15 10:24:01] frigate.video                  ERROR   : Hinten: Unable to read frames from ffmpeg process.
[2023-01-15 10:24:01] frigate.video                  ERROR   : Hinten: ffmpeg process is not running. exiting capture thread...
[2023-01-15 10:24:01] frigate.video                  ERROR   : Sauna: Unable to read frames from ffmpeg process.
[2023-01-15 10:24:01] frigate.video                  ERROR   : Sauna: ffmpeg process is not running. exiting capture thread...
[2023-01-15 10:24:01] frigate.video                  ERROR   : Hintereingang: Unable to read frames from ffmpeg process.
[2023-01-15 10:24:01] frigate.video                  ERROR   : Hintereingang: ffmpeg process is not running. exiting capture thread...

Frigate stats

{"Hinten":{"camera_fps":0.0,"capture_pid":275,"detection_fps":0.0,"pid":263,"process_fps":0.0,"skipped_fps":0.0},"Hintereingang":{"camera_fps":0.0,"capture_pid":269,"detection_fps":0.0,"pid":259,"process_fps":0.0,"skipped_fps":0.0},"Sauna":{"camera_fps":0.0,"capture_pid":266,"detection_fps":0.0,"pid":257,"process_fps":0.0,"skipped_fps":0.0},"Spielzimmer":{"camera_fps":0.0,"capture_pid":264,"detection_fps":0.0,"pid":255,"process_fps":0.0,"skipped_fps":0.0},"detection_fps":0.0,"detectors":{"coral":{"detection_start":0.0,"inference_speed":10.0,"pid":248}},"service":{"latest_version":"0.11.1","storage":{"/dev/shm":{"free":267.8,"mount_type":"tmpfs","total":268.4,"used":0.7},"/media/frigate/clips":{"free":1941946.2,"mount_type":"fuse.shfs","total":1999430.9,"used":57484.7},"/media/frigate/recordings":{"free":1941946.2,"mount_type":"fuse.shfs","total":1999430.9,"used":57484.7},"/tmp/cache":{"free":1000.0,"mount_type":"tmpfs","total":1000.0,"used":0.0}},"temperatures":{},"uptime":1321,"version":"0.11.1-2eada21"}}

Operating system

UNRAID

Install method

Docker CLI

Coral version

USB

Any other information that may be helpful

No response

@NickM-27
Copy link
Collaborator

Your hwaccel args are incorrect. It should either use vaapi or qsv but you're trying to mix them.

See the docs https://docs.frigate.video/configuration/hardware_acceleration

@Larosen
Copy link
Author

Larosen commented Jan 15, 2023

Your hwaccel args are incorrect. It should either use vaapi or qsv but you're trying to mix them.

See the docs https://docs.frigate.video/configuration/hardware_acceleration

Oh, right. removed QSV and now this shows up:

[2023-01-15 14:57:26] frigate.edgetpu                INFO    : Attempting to load TPU as usb
[2023-01-15 14:57:26] ws4py                          INFO    : Using epoll
[2023-01-15 14:57:26] frigate.app                    INFO    : Camera processor started for Spielzimmer: 254
[2023-01-15 14:57:26] frigate.app                    INFO    : Camera processor started for Sauna: 257
[2023-01-15 14:57:26] frigate.app                    INFO    : Camera processor started for Hintereingang: 259
[2023-01-15 14:57:26] frigate.app                    INFO    : Camera processor started for Hinten: 261
[2023-01-15 14:57:26] frigate.app                    INFO    : Capture process started for Spielzimmer: 263
[2023-01-15 14:57:26] frigate.app                    INFO    : Capture process started for Sauna: 264
[2023-01-15 14:57:26] frigate.app                    INFO    : Capture process started for Hintereingang: 268
[2023-01-15 14:57:26] frigate.app                    INFO    : Capture process started for Hinten: 273
[2023-01-15 14:57:26] ws4py                          INFO    : Using epoll
[2023-01-15 14:57:28] frigate.edgetpu                INFO    : TPU found
[2023-01-15 14:57:29] frigate.video                  ERROR   : Spielzimmer: Unable to read frames from ffmpeg process.
[2023-01-15 14:57:29] frigate.video                  ERROR   : Spielzimmer: ffmpeg process is not running. exiting capture thread...
[2023-01-15 14:57:30] frigate.video                  ERROR   : Sauna: Unable to read frames from ffmpeg process.
[2023-01-15 14:57:30] frigate.video                  ERROR   : Sauna: ffmpeg process is not running. exiting capture thread...
[2023-01-15 14:57:30] frigate.video                  ERROR   : Hinten: Unable to read frames from ffmpeg process.
[2023-01-15 14:57:30] frigate.video                  ERROR   : Hinten: ffmpeg process is not running. exiting capture thread...
[2023-01-15 14:57:30] frigate.video                  ERROR   : Hintereingang: Unable to read frames from ffmpeg process.
[2023-01-15 14:57:30] frigate.video                  ERROR   : Hintereingang: ffmpeg process is not running. exiting capture thread...
[2023-01-15 14:57:46] watchdog.Spielzimmer           ERROR   : Ffmpeg process crashed unexpectedly for Spielzimmer.
[2023-01-15 14:57:46] watchdog.Spielzimmer           ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2023-01-15 14:57:46] ffmpeg.Spielzimmer.detect      ERROR   : Output file #0 does not contain any stream
[2023-01-15 14:57:46] watchdog.Sauna                 ERROR   : Ffmpeg process crashed unexpectedly for Sauna.
[2023-01-15 14:57:46] watchdog.Sauna                 ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2023-01-15 14:57:46] ffmpeg.Sauna.detect            ERROR   : [AVHWDeviceContext @ 0x564a42d3a040] libva: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed
[2023-01-15 14:57:46] ffmpeg.Sauna.detect            ERROR   : [AVHWDeviceContext @ 0x564a42d3a040] libva: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed
[2023-01-15 14:57:46] ffmpeg.Sauna.detect            ERROR   : [AVHWDeviceContext @ 0x564a42d3a040] Failed to initialise VAAPI connection: -1 (unknown libva error).
[2023-01-15 14:57:46] ffmpeg.Sauna.detect            ERROR   : Device creation failed: -5.
[2023-01-15 14:57:46] ffmpeg.Sauna.detect            ERROR   : [h264 @ 0x564a42d34040] No device available for decoder: device type vaapi needed for codec h264.
[2023-01-15 14:57:46] ffmpeg.Sauna.detect            ERROR   : Device setup failed for decoder on input stream #0:0 : Input/output error
[2023-01-15 14:57:46] watchdog.Hinten                ERROR   : Ffmpeg process crashed unexpectedly for Hinten.
[2023-01-15 14:57:46] watchdog.Hinten                ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2023-01-15 14:57:46] ffmpeg.Hinten.detect           ERROR   : [AVHWDeviceContext @ 0x5589e8e62f00] libva: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed
[2023-01-15 14:57:46] ffmpeg.Hinten.detect           ERROR   : [AVHWDeviceContext @ 0x5589e8e62f00] libva: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed
[2023-01-15 14:57:46] ffmpeg.Hinten.detect           ERROR   : [AVHWDeviceContext @ 0x5589e8e62f00] Failed to initialise VAAPI connection: -1 (unknown libva error).
[2023-01-15 14:57:46] ffmpeg.Hinten.detect           ERROR   : Device creation failed: -5.
[2023-01-15 14:57:46] ffmpeg.Hinten.detect           ERROR   : [h264 @ 0x5589e8e66d40] No device available for decoder: device type vaapi needed for codec h264.
[2023-01-15 14:57:46] ffmpeg.Hinten.detect           ERROR   : Device setup failed for decoder on input stream #0:0 : Input/output error
[2023-01-15 14:57:46] watchdog.Hintereingang         ERROR   : Ffmpeg process crashed unexpectedly for Hintereingang.
[2023-01-15 14:57:46] watchdog.Hintereingang         ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2023-01-15 14:57:46] ffmpeg.Hintereingang.detect    ERROR   : [AVHWDeviceContext @ 0x555e16fa8080] libva: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed
[2023-01-15 14:57:46] ffmpeg.Hintereingang.detect    ERROR   : [AVHWDeviceContext @ 0x555e16fa8080] libva: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed
[2023-01-15 14:57:46] ffmpeg.Hintereingang.detect    ERROR   : [AVHWDeviceContext @ 0x555e16fa8080] Failed to initialise VAAPI connection: -1 (unknown libva error).
[2023-01-15 14:57:46] ffmpeg.Hintereingang.detect    ERROR   : Device creation failed: -5.
[2023-01-15 14:57:46] ffmpeg.Hintereingang.detect    ERROR   : [h264 @ 0x555e16fa3c40] No device available for decoder: device type vaapi needed for codec h264.
[2023-01-15 14:57:46] ffmpeg.Hintereingang.detect    ERROR   : Device setup failed for decoder on input stream #0:0 : Input/output error
[2023-01-15 14:57:49] frigate.video                  ERROR   : Spielzimmer: Unable to read frames from ffmpeg process.
[2023-01-15 14:57:49] frigate.video                  ERROR   : Spielzimmer: ffmpeg process is not running. exiting capture thread...
[2023-01-15 14:57:50] frigate.video                  ERROR   : Hinten: Unable to read frames from ffmpeg process.
[2023-01-15 14:57:50] frigate.video                  ERROR   : Hinten: ffmpeg process is not running. exiting capture thread...
[2023-01-15 14:57:50] frigate.video                  ERROR   : Sauna: Unable to read frames from ffmpeg process.
[2023-01-15 14:57:50] frigate.video                  ERROR   : Sauna: ffmpeg process is not running. exiting capture thread...
[2023-01-15 14:57:50] frigate.video                  ERROR   : Hintereingang: Unable to read frames from ffmpeg process.
[2023-01-15 14:57:50] frigate.video                  ERROR   : Hintereingang: ffmpeg process is not running. exiting capture thread...
[2023-01-15 14:57:56] watchdog.Spielzimmer           ERROR   : Ffmpeg process crashed unexpectedly for Spielzimmer.
[2023-01-15 14:57:56] watchdog.Spielzimmer           ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2023-01-15 14:57:56] ffmpeg.Spielzimmer.detect      ERROR   : Output file #0 does not contain any stream
[2023-01-15 14:57:56] watchdog.Hinten                ERROR   : Ffmpeg process crashed unexpectedly for Hinten.
[2023-01-15 14:57:56] watchdog.Hinten                ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2023-01-15 14:57:56] ffmpeg.Hinten.detect           ERROR   : [AVHWDeviceContext @ 0x55cfc796a480] libva: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed
[2023-01-15 14:57:56] ffmpeg.Hinten.detect           ERROR   : [AVHWDeviceContext @ 0x55cfc796a480] libva: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed
[2023-01-15 14:57:56] ffmpeg.Hinten.detect           ERROR   : [AVHWDeviceContext @ 0x55cfc796a480] Failed to initialise VAAPI connection: -1 (unknown libva error).
[2023-01-15 14:57:56] ffmpeg.Hinten.detect           ERROR   : Device creation failed: -5.
[2023-01-15 14:57:56] ffmpeg.Hinten.detect           ERROR   : [h264 @ 0x55cfc7967c40] No device available for decoder: device type vaapi needed for codec h264.
[2023-01-15 14:57:56] ffmpeg.Hinten.detect           ERROR   : Device setup failed for decoder on input stream #0:0 : Input/output error
[2023-01-15 14:57:56] watchdog.Sauna                 ERROR   : Ffmpeg process crashed unexpectedly for Sauna.
[2023-01-15 14:57:56] watchdog.Sauna                 ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2023-01-15 14:57:56] ffmpeg.Sauna.detect            ERROR   : [AVHWDeviceContext @ 0x55b0651b2540] libva: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed
[2023-01-15 14:57:56] ffmpeg.Sauna.detect            ERROR   : [AVHWDeviceContext @ 0x55b0651b2540] libva: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed
[2023-01-15 14:57:56] ffmpeg.Sauna.detect            ERROR   : [AVHWDeviceContext @ 0x55b0651b2540] Failed to initialise VAAPI connection: -1 (unknown libva error).
[2023-01-15 14:57:56] ffmpeg.Sauna.detect            ERROR   : Device creation failed: -5.
[2023-01-15 14:57:56] ffmpeg.Sauna.detect            ERROR   : [h264 @ 0x55b065172040] No device available for decoder: device type vaapi needed for codec h264.
[2023-01-15 14:57:56] ffmpeg.Sauna.detect            ERROR   : Device setup failed for decoder on input stream #0:0 : Input/output error
[2023-01-15 14:57:56] watchdog.Hintereingang         ERROR   : Ffmpeg process crashed unexpectedly for Hintereingang.
[2023-01-15 14:57:56] watchdog.Hintereingang         ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2023-01-15 14:57:56] ffmpeg.Hintereingang.detect    ERROR   : [AVHWDeviceContext @ 0x5582004e4740] libva: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed
[2023-01-15 14:57:56] ffmpeg.Hintereingang.detect    ERROR   : [AVHWDeviceContext @ 0x5582004e4740] libva: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed
[2023-01-15 14:57:56] ffmpeg.Hintereingang.detect    ERROR   : [AVHWDeviceContext @ 0x5582004e4740] Failed to initialise VAAPI connection: -1 (unknown libva error).
[2023-01-15 14:57:56] ffmpeg.Hintereingang.detect    ERROR   : Device creation failed: -5.
[2023-01-15 14:57:56] ffmpeg.Hintereingang.detect    ERROR   : [h264 @ 0x5582004df040] No device available for decoder: device type vaapi needed for codec h264.
[2023-01-15 14:57:56] ffmpeg.Hintereingang.detect    ERROR   : Device setup failed for decoder on input stream #0:0 : Input/output error
[2023-01-15 14:57:59] frigate.video                  ERROR   : Spielzimmer: Unable to read frames from ffmpeg process.
[2023-01-15 14:57:59] frigate.video                  ERROR   : Spielzimmer: ffmpeg process is not running. exiting capture thread...
[2023-01-15 14:58:00] frigate.video                  ERROR   : Sauna: Unable to read frames from ffmpeg process.
[2023-01-15 14:58:00] frigate.video                  ERROR   : Sauna: ffmpeg process is not running. exiting capture thread...
[2023-01-15 14:58:00] frigate.video                  ERROR   : Hinten: Unable to read frames from ffmpeg process.
[2023-01-15 14:58:00] frigate.video                  ERROR   : Hinten: ffmpeg process is not running. exiting capture thread...
[2023-01-15 14:58:00] frigate.video                  ERROR   : Hintereingang: Unable to read frames from ffmpeg process.
[2023-01-15 14:58:00] frigate.video                  ERROR   : Hintereingang: ffmpeg process is not running. exiting capture thread...```

PS: `ffmpeg -decoders | grep cuvid` tells me 


ffmpeg version n5.1-2-g915ef932a3-20220731 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 12.1.0 (crosstool-NG 1.25.0.55_3defb7b)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-ffbuild-linux-gnu- --arch=x86_64 --target-os=linux --enable-gpl --enable-version3 --disable-debug --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libpulse --enable-libvmaf --enable-libxcb --enable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-mbedtls --enable-librist --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --disable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libdrm --enable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags=-pie --extra-libs='-ldl -lgomp' --extra-version=20220731
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
 V..... av1_cuvid            Nvidia CUVID AV1 decoder (codec av1)
 V..... h264_cuvid           Nvidia CUVID H264 decoder (codec h264)
 V..... hevc_cuvid           Nvidia CUVID HEVC decoder (codec hevc)
 V..... mjpeg_cuvid          Nvidia CUVID MJPEG decoder (codec mjpeg)
 V..... mpeg1_cuvid          Nvidia CUVID MPEG1VIDEO decoder (codec mpeg1video)
 V..... mpeg2_cuvid          Nvidia CUVID MPEG2VIDEO decoder (codec mpeg2video)
 V..... mpeg4_cuvid          Nvidia CUVID MPEG4 decoder (codec mpeg4)
 V..... vc1_cuvid            Nvidia CUVID VC1 decoder (codec vc1)
 V..... vp8_cuvid            Nvidia CUVID VP8 decoder (codec vp8)
 V..... vp9_cuvid            Nvidia CUVID VP9 decoder (codec vp9)

@NickM-27
Copy link
Collaborator

What's your docker CLI command from Unraid? Doesn't look like you're passing the iGPU in

@Larosen
Copy link
Author

Larosen commented Jan 15, 2023

What's your docker CLI command from Unraid? Doesn't look like you're passing the iGPU in

/dev/dri is used.

@NickM-27
Copy link
Collaborator

Are you sure you've enabled the intel driver in Unraid? It's not enabled by default.

Also, what cpu / GPU do you have?

@Larosen
Copy link
Author

Larosen commented Jan 15, 2023

Are you sure you've enabled the intel driver in Unraid? It's not enabled by default.

Also, what cpu / GPU do you have?

I installed the App Intel-GPU-TOP. I hoped that this would be enough.

I use an i5-13600k without an extra GPU

PS: With /dev/dri Plex Server gets HW. Does that mean the iGPU UHD 770 is running?

@NickM-27
Copy link
Collaborator

If Intel GPU top works then it should be. But it seems your passing to the frigate container is incorrect somewhere because frigate does not see the device.

Can you run ls /dev/dri/ on the host and inside the container and post both here?

@Larosen
Copy link
Author

Larosen commented Jan 15, 2023

If Intel GPU top works then it should be. But it seems your passing to the frigate container is incorrect somewhere because frigate does not see the device.

Can you run ls /dev/dri/ on the host and inside the container and post both here?

Host:
root@Tower:/dev/dri# ls
by-path/ card0 renderD128

Container: # ls /dev/dri/
card0 renderD128

@NickM-27
Copy link
Collaborator

Can you paste your current config?

@Larosen
Copy link
Author

Larosen commented Jan 15, 2023


mqtt:
  host: 10.20.60.113
  port: 1883
  user: mqtt...
  password: ****

detectors:
  coral:
    type: edgetpu
    device: usb


cameras:
  Spielzimmer:
    ffmpeg:
      output_args:
        record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 copy -tag:v hvc1 -c:a aac
        rtmp: -c copy -f flv -tag:v hvc1
      inputs:
        - path: rtsp://****@10.20.60.87:556/Streaming/Channels/102/
          roles:
            - detect
            - record
        #- path: rtsp://****@10.20.60.87:556/Streaming/Channels/101/
        #  roles:
        #    - record
    best_image_timeout: 60
    detect:
      width: 640
      height: 480
      fps: 5
    motion:
      mask:
        - 640,316,640,0,531,0,360,0,350,62
        - 386,336,498,436,508,415,497,346,436,298,414,306
        - 291,0,254,275,116,350,97,37
    mqtt:
      enabled: True
      timestamp: True
      bounding_box: True
      crop: True
      height: 270
      quality: 100



  Sauna:
    ffmpeg:
      inputs:
        - path: rtsp://****[email protected]:556/Streaming/Channels/103
          roles:
            - detect
            - rtmp
        - path: rtsp://****[email protected]:556/Streaming/Channels/101
          roles:
            - record
    best_image_timeout: 60
    motion:
      mask:
        - 37,105,501,102,506,47,37,42
        - 1920,0,1920,281,1485,313,1046,397,983,0
        - 1072,464,1242,472,1255,341,1082,201
        - 1920,1080,1920,587,1344,514,1189,563,1099,652,837,827,1033,791,1119,945,960,1080
        - 1633,0,1920,0,1920,546,1795,532,1742,551,1698,543,1615,529,1558,446,1563,342
    mqtt:
      enabled: True
      timestamp: True
      bounding_box: True
      crop: True
      height: 270
      quality: 100


  Hintereingang:
    ffmpeg:
      inputs:
        - path: rtsp://****@10.20.60.103:556/Streaming/Channels/103
          roles:
            - detect
            - rtmp  
        - path: rtsp://****@10.20.60.103:556/Streaming/Channels/101
          roles:
            - record
    best_image_timeout: 60
    motion:
      mask:
        - 743,0,1800,0,1789,324,1159,345,877,373,846,490,696,535,563,461,469,529,292,881,0,639,0,469,0,0
    mqtt:
      enabled: True
      timestamp: True
      bounding_box: True
      crop: True
      height: 270
      quality: 100

  Hinten:
    ffmpeg:
      inputs:
        - path: rtsp://****@10.20.60.105:556/Streaming/Channels/103
          roles:
            - detect
            - rtmp
        - path: rtsp://****@10.20.60.105:556/Streaming/Channels/101
          roles:
            - record
    best_image_timeout: 60
    mqtt:
      enabled: True
      timestamp: True
      bounding_box: True
      crop: True
      height: 270
      quality: 100

#  Tor:
#    ffmpeg:
#      inputs:
#        - path: rtsp://****@10.20.60.106:556/Streaming/Channels/103
#          roles:
#            - detect
#            - rtmp
#        - path: rtsp://****@10.20.60.106:556/Streaming/Channels/101
#          roles:
#            - record
#            #- rtmp
#    #best_image_timeout: 60
#    mqtt:
#      enabled: True
#      timestamp: True
#      bounding_box: True
#      crop: True
#      height: 270
#      quality: 100

birdseye:
  enabled: True
  width: 1920
  height: 1080
  quality: 27
  mode: continuous

timestamp_style:
  position: "tl"
  format: "%d/%m/%Y %H:%M:%S"
  color:
    red: 255
    green: 255
    blue: 255
  thickness: 2
  effect: shadow

motion:
  threshold: 50
  contour_area: 30
  delta_alpha: 0.2
  frame_alpha: 0.2
  frame_height: 50
  #mask: 0,900,1080,900,1080,1920,0,1920
  improve_contrast: True


record:
  enabled: True
  expire_interval: 60
  retain:
    days: 5
    mode: all
  events:
    pre_capture: 10
    post_capture: 15
    retain:
      default: 1
      mode: active_objects
      objects:
        person: 7
        cat: 7


objects:
  track:
    - person
    - mouse
    - cat
    - dog
    - laptop
    - handbag
    - umbrella
    - backpack
    - cell phone
    - bicycle
    - cow
    - sheep
    - bird
    - bear
    #- car
    - baseball bat
    - tennis racket
    - knife
    - bottle
    - scissors
  filters:
    person:
      min_area: 1000
      max_area: 400000
      min_score: 0.6
      threshold: 0.75
    cat:
      min_score: 0.7
      threshold: 0.80
    laptop:
      min_score: 0.8
      threshold: 0.9
    bird:
      min_score: 0.8
      threshold: 0.9
      max_area: 90000
    dog:
      min_score: 0.75
      threshold: 0.85
    umbrella:
      min_score: 0.7
      threshold: 0.84
      max_area: 202000
    mouse: 
      min_score: 0.7
      threshold: 0.84
      max_area: 6000
    bear:
      min_score: 0.7
      threshold: 0.9
      max_area: 24000
    sheep:
      min_score: 0.7
      threshold: 0.85
    backpack:
      min_score: 0.75
      threshold: 0.85
ffmpeg:
  global_args: -hide_banner -loglevel warning
  hwaccel_args: #-c:v h264_qsv
    - -hwaccel
    - vaapi
    - -hwaccel_device
    - /dev/dri/renderD128
    - -hwaccel_output_format
    - yuv420p
   # - -hwaccel_output_format
   # - yuv420p
  input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1
  output_args:
    detect: -f rawvideo -pix_fmt yuv420p
    record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a aac
    rtmp: -c:v copy -c:a aac -f flv

detect:
  width: 1920
  height: 1080
  fps: 5
  enabled: True
  max_disappeared: 25
  stationary:
    interval: 10
    max_frames:
      objects:
        person: 1000
        cat: 5000

rtmp:
  enabled: False

snapshots:
  enabled: True
  timestamp: True
  bounding_box: True
  crop: True
  #height: 175
  required_zones: []
  retain:
    default: 10
    objects:
      person: 15
      cat: 10
      bear: 5
      dog: 5

@NickM-27
Copy link
Collaborator

NickM-27 commented Jan 15, 2023

Okay, seems really weird. This might be a driver issue which could be fixed in 0.12 since we have newer drivers

@Larosen
Copy link
Author

Larosen commented Jan 15, 2023

Okay, seems really weird. This might be a driver issue which could be fixed in 0.12 since we have newer drivers

I changed to 0.12 Beta 3 and now I am a bit closer to the solution.
I managed to update my config as mentioned in other solved issues and the stream works. BUT not for the Spielzimmer Camera. This Camera only supports H265 and no H264, unfortunately. How do I have to update this camera in order to get it back up?

Spielzimmer:
    ffmpeg:
      output_args:
        record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 copy -tag:v hvc1 -c:a aac
        rtmp: -c copy -f flv -tag:v hvc1
      inputs:
        - path: rtsp://[email protected]:556/Streaming/Channels/102/
          roles:
            - detect
            - record
            - restream
        #- path: rtsp://[email protected]:556/Streaming/Channels/101/
        #  roles:
        #    - record
    best_image_timeout: 60
    detect:
      width: 640
      height: 480
      fps: 5
    motion:
      mask:
        - 640,316,640,0,531,0,360,0,350,62
        - 386,336,498,436,508,415,497,346,436,298,414,306
        - 291,0,254,275,116,350,97,37
2023-01-15 15:50:01.047034081  [2023-01-15 15:50:01] ffmpeg.Spielzimmer.detect      ERROR   : Output file #0 does not contain any stream
2023-01-15 15:50:02.156927581  10.20.60.113 - - [15/Jan/2023:15:50:02 +0100] "GET / HTTP/1.1" 200 10522 "-" "HomeAssistantSupervisor/2022.12.1 aiohttp/3.8.3 Python/3.10" "172.30.32.2"
2023-01-15 15:50:04.853341151  [2023-01-15 15:50:04] frigate.video                  ERROR   : Spielzimmer: Unable to read frames from ffmpeg process.
2023-01-15 15:50:04.853394000  [2023-01-15 15:50:04] frigate.video                  ERROR   : Spielzimmer: ffmpeg process is not running. exiting capture thread...
2023-01-15 15:50:11.053132798  [2023-01-15 15:50:11] watchdog.Spielzimmer           ERROR   : Ffmpeg process crashed unexpectedly for Spielzimmer.
2023-01-15 15:50:11.053136860  [2023-01-15 15:50:11] watchdog.Spielzimmer           ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-15 15:50:11.053150776  [2023-01-15 15:50:11] ffmpeg.Spielzimmer.detect      ERROR   : Output file #0 does not contain any stream
2023-01-15 15:50:14.774046882  [2023-01-15 15:50:14] frigate.video                  ERROR   : Spielzimmer: Unable to read frames from ffmpeg process.
2023-01-15 15:50:14.774102196  [2023-01-15 15:50:14] frigate.video                  ERROR   : Spielzimmer: ffmpeg process is not running. exiting capture thread...
2023-01-15 15:50:21.062618756  [2023-01-15 15:50:21] watchdog.Spielzimmer           ERROR   : Ffmpeg process crashed unexpectedly for Spielzimmer.
2023-01-15 15:50:21.062669523  [2023-01-15 15:50:21] watchdog.Spielzimmer           ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-15 15:50:21.062704966  [2023-01-15 15:50:21] ffmpeg.Spielzimmer.detect      ERROR   : Output file #0 does not contain any stream
2023-01-15 15:50:24.783262117  [2023-01-15 15:50:24] frigate.video                  ERROR   : Spielzimmer: Unable to read frames from ffmpeg process.
2023-01-15 15:50:24.783315918  [2023-01-15 15:50:24] frigate.video                  ERROR   : Spielzimmer: ffmpeg process is not running. exiting capture thread...

@NickM-27
Copy link
Collaborator

Are you using preset-vaapi globally?

@Larosen
Copy link
Author

Larosen commented Jan 15, 2023

preset-vaapi

My Global Arguments at the bottom of the config file are:

ffmpeg:
  global_args: -hide_banner -loglevel warning
  hwaccel_args: #-c:v h264_qsv
    - -hwaccel
    - vaapi
    - -hwaccel_device
    - /dev/dri/renderD128
    - -hwaccel_output_format
    - yuv420p
   # - -hwaccel_output_format
   # - yuv420p
  input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1
  output_args:
    detect: -f rawvideo -pix_fmt yuv420p
    record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a aac
    rtmp: -c:v copy -c:a aac -f flv

They work perfectly fine for all the other cameras. I just had to define new output arguments for Spielzimmer so far in Home Assistant.

@NickM-27
Copy link
Collaborator

I would suggest moving to the ffmpeg presets per the release notes for the beta.

@Larosen
Copy link
Author

Larosen commented Jan 15, 2023

I would suggest moving to the ffmpeg presets per the release notes for the beta.

I removed the Output Arguments for Spielzimmer and now he says

2023-01-15 16:02:31.816392437  [2023-01-15 16:02:31] frigate.record                 WARNING : Failed to probe corrupt segment Spielzimmer-20230115160230.mp4: 0 - b'[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55cbab1686c0] moov atom not found\n/tmp/cache/Hintereingang-20230115160228.mp4: Invalid data found when processing input\n'
2023-01-15 16:02:31.816396591  [2023-01-15 16:02:31] frigate.record                 WARNING : Discarding a corrupt recording segment: Spielzimmer-20230115160230.mp4

@NickM-27
Copy link
Collaborator

It looks like no arguments have been provided. Please read the release notes because I think you are misunderstanding what I mean by presets

@Larosen
Copy link
Author

Larosen commented Jan 15, 2023

It looks like no arguments have been provided. Please read the release notes because I think you are misunderstanding what I mean by presets

Oh, I missed that part.

I also found something intresting in the docs. That worked even better for this C800 than the presets preset-record-mjpeg

https://deploy-preview-4055--frigate-docs.netlify.app/configuration/camera_specific/#annke-c800

Streams are all working now!

Just one more thing:
Bildschirm­foto 2023-01-15 um 16 37 24

How do I add the camers Spielzimmer in my home assistant dashbaord? I installed Frigate Proxy and the x264 Cameras show up as "GoNAME", but the Spielzimmer Kamera is not showing up at all under Camera Entity.

And the Go Streams are also buffering almost always. Any way to change back to the old default strems without Go?
Bildschirm­foto 2023-01-15 um 16 43 22

@NickM-27
Copy link
Collaborator

Preset record mjpeg is going to be using software to reencode the video as h264 so that seems like it will greatly increase CPU usage.

Also the RTSP streams in HA should be used as webRTC either with the webRTC v3 integration or rtsp2webrtc integration that is built into HA (just add it and point it to frigate_ip:1984

The frigate card is also going to be updated to updated to use webRTC / MSE which is fully recommended over HA HLS

@Larosen
Copy link
Author

Larosen commented Jan 16, 2023

Everything works like a charm now! Great work and thank you very much!

@Larosen Larosen closed this as completed Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants