frigate: [HW Accel Support]: Crash with using present hwaccel_args: preset-intel-qsv-h264
Describe the problem you are having
Moved from 0.11 and was using
hwaccel_args: -c:v h264_qsv
now using
hwaccel_args: preset-intel-qsv-h264
Unclear how to debug this as the debug page no longer shows the ffmpeg command that is being run so I can manually run it to see the error.
I have one cameras using hwaccel_args: preset-intel-vaapi which seems to work and one camera using no hwaccel and that also works ( the first two below).
If I disable hardware hwaccel in the global settings everything works fine
Version
0.12.0-53D39A1
Frigate config file
database:
path: /db/frigate.db
mqtt:
host: XXX
user: mqtt
password: XXX
ffmpeg:
# hwaccel_args: -c:v h264_qsv
hwaccel_args: preset-intel-qsv-h264
detectors:
coral:
type: edgetpu
device: usb
timestamp_style:
# Optional: Position of the timestamp (default: shown below)
# "tl" (top left), "tr" (top right), "bl" (bottom left), "br" (bottom right)
position: "tl"
# Optional: Format specifier conform to the Python package "datetime" (default: shown below)
# Additional Examples:
# german: "%d.%m.%Y %H:%M:%S"
format: "%m/%d/%Y %H:%M:%S"
# Optional: Color of font
color:
# All Required when color is specified (default: shown below)
red: 255
green: 255
blue: 255
# Optional: Line thickness of font (default: shown below)
thickness: 1
# Optional: Effect of lettering (default: shown below)
# None (No effect),
# "solid" (solid background in inverse color of font)
# "shadow" (shadow for font)
effect: solid
birdseye:
# Optional: Enable birdseye view (default: shown below)
enabled: True
# Optional: Width of the output resolution (default: shown below)
width: 1280
# Optional: Height of the output resolution (default: shown below)
height: 720
# Optional: Encoding quality of the mpeg1 feed (default: shown below)
# 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.
quality: 8
# Optional: Mode of the view. Available options are: objects, motion, and continuous
# objects - cameras are included if they have had a tracked object within the last 30 seconds
# motion - cameras are included if motion was detected in the last 30 seconds
# continuous - all cameras are included always
mode: objects
objects:
track:
- person
- dog
- cat
- car
- bear
record:
enabled: True
events:
retain:
default: 10
pre_capture: 5
post_capture: 5
cameras:
attic1: # <------ Name the camera
ffmpeg:
hwaccel_args: preset-intel-vaapi
# hwaccel_args: -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p
inputs:
- path: rtsp://XXX:554/cam/realmonitor?channel=1&subtype=0 # <----- Update for your camera
roles:
- detect
- record
record:
enabled: True
retain:
days: 30
mode: motion
objects:
track:
- person
- cat
- bird
motion:
threshold: 5
attic2: # <------ Name the camera
ffmpeg:
hwaccel_args: []
# hwaccel_args: -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p
inputs:
- path: rtsp://XXX:554/cam1/mpeg4 # <----- Update for your camera
roles:
- detect
- record
record:
enabled: True
retain:
days: 30
mode: motion
objects:
track:
- person
- cat
- bird
motion:
threshold: 5
catgenie1: # <------ Name the camera
ffmpeg:
# hwaccel_args: []
# hwaccel_args: -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p
inputs:
- path: rtsp://XXX:554/live/0/h264.sdp # <----- Update for your camera
roles:
- detect
- record
objects:
track:
- person
- cat
motion:
threshold: 5
catgenie2: # <------ Name the camera
ffmpeg:
# hwaccel_args: []
# hwaccel_args: -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p
inputs:
- path: rtsp://XXX:554/live/0/h264.sdp # <----- Update for your camera
roles:
- detect
- record
objects:
track:
- person
- cat
motion:
threshold: 5
driveway1: # <------ Name the camera
ffmpeg:
inputs:
- path: rtsp://XXX:554/cam/realmonitor?channel=1&subtype=0 # <----- Update for your camera
roles:
- detect
detect:
enabled: True
record:
enabled: True
driveway2: # <------ Name the camera
ffmpeg:
inputs:
- path: rtsp://XXX:554/cam/realmonitor?channel=1&subtype=0 # <----- Update for your camera
roles:
- detect
detect:
enabled: True
record:
enabled: True
--TRUNCATED AS MORE CAMERAS ALL CONFIGURED THE SAME---
docker-compose file or Docker CLI command
version: "3"
services:
frigate:
# image: blakeblackshear/frigate:stable
# image: crzynik/frigate:testing-driver
image: blakeblackshear/frigate:0.12.0-beta1
shm_size: "1024mb"
container_name: frigate
privileged: true
devices:
- /dev/dri:/dev/dri
volumes:
- /disk1/docker/frigate/config:/config
- /disk1/docker/frigate/db:/db
# - /disk1/docker/frigate/media:/media/frigate
- frigate-media:/media/frigate
- /etc/localtime:/etc/localtime:ro
- /dev/bus/usb:/dev/bus/usb
Relevant log output
023-01-05 10:38:36.733070865 [2023-01-05 10:38:36] ffmpeg.frontyard2.detect ERROR : [AVHWDeviceContext @ 0x557928b93280] Error setting child device handle: -17
2023-01-05 10:38:36.733074625 [2023-01-05 10:38:36] frigate.video ERROR : driveway1: Unable to read frames from ffmpeg process.
2023-01-05 10:38:36.733076363 [2023-01-05 10:38:36] frigate.video ERROR : driveway1: ffmpeg process is not running. exiting capture thread...
2023-01-05 10:38:36.736829250 [2023-01-05 10:38:36] watchdog.garage ERROR : Ffmpeg process crashed unexpectedly for garage.
2023-01-05 10:38:36.737094975 [2023-01-05 10:38:36] watchdog.garage ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-05 10:38:36.737099123 [2023-01-05 10:38:36] ffmpeg.garage.detect ERROR : [AVHWDeviceContext @ 0x561ebb8a3280] Error setting child device handle: -17
2023-01-05 10:38:36.737963398 [2023-01-05 10:38:36] watchdog.ch-garage ERROR : Ffmpeg process crashed unexpectedly for ch-garage.
2023-01-05 10:38:36.738239223 [2023-01-05 10:38:36] watchdog.ch-garage ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-05 10:38:36.738242430 [2023-01-05 10:38:36] ffmpeg.ch-garage.detect ERROR : [AVHWDeviceContext @ 0x560cc43b4280] Error setting child device handle: -17
2023-01-05 10:38:36.756873209 [2023-01-05 10:38:36] frigate.video ERROR : backyardandpool1: Unable to read frames from ffmpeg process.
2023-01-05 10:38:36.756954064 [2023-01-05 10:38:36] frigate.video ERROR : backyardandpool1: ffmpeg process is not running. exiting capture thread...
2023-01-05 10:38:36.766415164 [2023-01-05 10:38:36] frigate.video ERROR : garage: Unable to read frames from ffmpeg process.
2023-01-05 10:38:36.766493212 [2023-01-05 10:38:36] frigate.video ERROR : garage: ffmpeg process is not running. exiting capture thread...
2023-01-05 10:38:36.771099462 [2023-01-05 10:38:36] frigate.video ERROR : catgenie1: Unable to read frames from ffmpeg process.
2023-01-05 10:38:36.771210512 [2023-01-05 10:38:36] frigate.video ERROR : catgenie1: ffmpeg process is not running. exiting capture thread...
2023-01-05 10:38:36.784321477 [2023-01-05 10:38:36] frigate.video ERROR : carriagehouseback: Unable to read frames from ffmpeg process.
2023-01-05 10:38:36.784402270 [2023-01-05 10:38:36] frigate.video ERROR : carriagehouseback: ffmpeg process is not running. exiting capture thread...
2023-01-05 10:38:36.796788396 [2023-01-05 10:38:36] frigate.video ERROR : sideyard: Unable to read frames from ffmpeg process.
2023-01-05 10:38:36.796862139 [2023-01-05 10:38:36] frigate.video ERROR : sideyard: ffmpeg process is not running. exiting capture thread...
2023-01-05 10:38:36.811204251 [2023-01-05 10:38:36] frigate.video ERROR : carriagehousefront: Unable to read frames from ffmpeg process.
2023-01-05 10:38:36.811293031 [2023-01-05 10:38:36] frigate.video ERROR : carriagehousefront: ffmpeg process is not running. exiting capture thread...
FFprobe output from your camera
From Driveway1
[ { "return_code": 0, "stderr": {}, "stdout": { "programs": [], "streams": [ { "avg_frame_rate": "10/1", "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10", "display_aspect_ratio": "16:9", "height": 2160, "width": 3840 }, { "avg_frame_rate": "0/0", "bit_rate": "64000", "codec_long_name": "PCM A-law / G.711 A-law" } ] } } ]
Operating system
Other Linux
Install method
Docker Compose
Network connection
Wired
Camera make and model
Amcrest IP8M mostly
Any other information that may be helpful
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 17 (1 by maintainers)
If VAAPI works, just use that. No need to try and get QSV to work.