[Camera Support]: Hikvision DS-2CD2387G2P-LSU/SL - Working, but not without FFMPEG issues... #21022
Replies: 2 comments 7 replies
-
|
The "GPU Hang (-21)" errors you're experiencing with Intel QSV H.265 decoding are indicative of GPU driver issues with your Intel Core i5-1250P (12th gen Alder Lake) processor.(1) Based on your hardware generation, you should be using the Here's what I recommend: 1. Switch to VAAPI for hardware acceleration: ffmpeg:
hwaccel_args: preset-vaapi2. Ensure you're using the correct driver: The default driver for your generation should be 3. Remove the custom FFmpeg path: Since you're experiencing reliability issues with custom FFmpeg 8.0.1, I'd recommend removing the custom FFmpeg configuration and letting Frigate use its built-in FFmpeg, which is tested and validated:(3) Remove these lines: ffmpeg:
path: /config/custom-ffmpeg4. Simplify your camera configuration: For your Hikvision camera, use the standard RTSP preset:(4)(2) cameras:
GarageDriveway-Hikvision:
ffmpeg:
hwaccel_args: preset-vaapi
inputs:
- path: rtsp://127.0.0.1:8554/GarageDriveway-Hikvision
input_args: preset-rtsp-restream
roles:
- audio
- detect
- record5. Address the go2rtc audio warnings: The go2rtc logs show audio codec compatibility issues with your Hikvision camera.(5) The camera is offering multiple audio formats (PCMU/8000, G726/8000, MPEG4-GENERIC/16000) that go2rtc is having trouble with.(5) You may want to adjust the camera's audio settings to use a more standard codec like AAC if possible.(4) The VAAPI preset will automatically handle both H.264 and H.265 streams through profile selection, eliminating the need for separate presets.(1)(2) 📚 Sources: Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
-
|
The AI isn't really trained on anything related to custom ffmpeg or ffmpeg 8, we have not done any testing with ffmpeg 8 at this point. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
My Frigate Journey and current issues...
Good day! I started experimenting with Frigate Docker about a month or so ago on my Synology (DS220+ Celeron J4025 with embedded Intel Graphics) for my one camera (Amcrest, 1080p AD110 ). This worked great - knowing that with object detection and VAAPI and it consuming 67% CPU constantly (mostly ffmpeg), to expand my system beyond experiment mode would require some better hardware.
I migrated my configuration to dedicated hardware (Mini PC - Intel Core i5 1250P with Intel Iris Xe Graphics) - Host OS Debian Trixie, Docker CE / Compose to deploy configuration. Containers in experimental env and here are managed by Portainer Agent, I do not have other containers running on the minipc.
Migrated config worked well and I had an early 2000's dome style BNC camera installed by the prior owner of our house that needed removal and updating. Had the Hikvision PoE camera installed, about 20 feet of Cat6 installed professionally to wall plate, and Cat6 from wall plate to PoE switch; PoE switch Cat 5e backhaul to my Router (Firewalla Gold). This camera is the ONLY PoE appliance on the switch, and the other devices on the switch are a Smart TV, HD Homerun tuner, Xbox One, Onkyo Receiver.
Configuration wise, I am mounting NFS shares into the MiniPC host (which persist post reboot) - the NFS shares are both for the docker configs mount point for Frigate and Frigate recordings, both of which are on my NAS (storage redundancy and nightly backups). This has been 100% reliable so far.
The Hikvision camera is awesome, but the reliability of ffmpeg is not great. Things work fine for my wireless Amcrest doorbell camera, not a single issue (ffmpeg or otherwise) with 7.0 default or from my experimental to new production environment.
The logs included here are with CUSTOM FFMPEG (8.0.1) mounted from /configs/custom-ffmpeg as shown in the Frigate configuration file. This was my last resort here with the reliability problems (I have other logs prior to testing out custom ffmpeg, which show ffmpeg restarts at least hourly for various reasons). I have also toyed with the Hikvision settings, updating i-frame intervals, different frame rates, H265 vs H265+, none of which seem to have helped.
I am attaching logs using VAAPI and QSV prior to the ffmpeg custom version. QSV seems to be more reliable here...
THANKS COMMUNITY FOR YOUR HELP!
frigate-logs-vaapi-camera-h265.txt
frigate-logs-qsv-h265.txt
Version
0.16.2-4d58206
What browser(s) are you using?
Google Chrome 139.0.7258.157 (Official Build) (arm64)
Frigate config file
Relevant Frigate log output
Relevant go2rtc log output
FFprobe output from your camera
[{"return_code":0,"stderr":"","stdout":{"programs":[],"stream_groups":[],"streams":[{"codec_long_name":"H.265 / HEVC (High Efficiency Video Coding)","width":5120,"height":1440,"display_aspect_ratio":"32:9","avg_frame_rate":"20/1"},{"codec_long_name":"PCM mu-law / G.711 mu-law","avg_frame_rate":"0/0","bit_rate":"64000"}]}}]Frigate stats
{ "cameras": { "GarageDriveway-Hikvision": { "camera_fps": 5.1, "process_fps": 5, "skipped_fps": 0, "detection_fps": 6.7, "detection_enabled": true, "pid": 831, "capture_pid": 853, "ffmpeg_pid": 36997, "audio_rms": 69.1628, "audio_dBFS": -53.5116 }, "Amcrest-FrontDoorBell": { "camera_fps": 5, "process_fps": 4.9, "skipped_fps": 0.1, "detection_fps": 11, "detection_enabled": true, "pid": 833, "capture_pid": 859, "ffmpeg_pid": 868, "audio_rms": 20.0214, "audio_dBFS": -64.2791 } }, "detectors": { "vino-0": { "inference_speed": 9.59, "detection_start": 0, "pid": 668 }, "vino-1": { "inference_speed": 9.91, "detection_start": 1763916672.77263, "pid": 678 } }, "detection_fps": 17.7, "embeddings": { "image_embedding_speed": 78.26, "image_embedding": 0.1, "text_embedding_speed": 0, "text_embedding": 0 }, "gpu_usages": { "intel-qsv": { "gpu": "0.0%", "mem": "-%", "clients": { "668": "0.0%", "678": "0.0%", "868": "0.0%", "36997": "0.0%" } } }, "cpu_usages": { "frigate.full_system": { "cpu": "5.4", "mem": "34.6" }, "1": { "cpu": "0.0", "cpu_average": "0", "mem": "0.0", "cmdline": "/package/admin/s6/command/s6-svscan -d4 -- /run/service" }, "17": { "cpu": "0.0", "cpu_average": "0", "mem": "0.0", "cmdline": "s6-supervise s6-linux-init-shutdownd" }, "18": { "cpu": "0.0", "cpu_average": "0", "mem": "0.0", "cmdline": "/package/admin/s6-linux-init/command/s6-linux-init-shutdownd -d3 -c /run/s6/basedir -g 3000 -C -B" }, "27": { "cpu": "0.0", "cpu_average": "0", "mem": "0.0", "cmdline": "s6-supervise go2rtc" }, "28": { "cpu": "0.0", "cpu_average": "0", "mem": "0.0", "cmdline": "s6-supervise certsync" }, "29": { "cpu": "0.0", "cpu_average": "0", "mem": "0.0", "cmdline": "s6-supervise frigate-log" }, "30": { "cpu": "0.0", "cpu_average": "0", "mem": "0.0", "cmdline": "s6-supervise go2rtc-log" }, "31": { "cpu": "0.0", "cpu_average": "0", "mem": "0.0", "cmdline": "s6-supervise go2rtc-healthcheck" }, "32": { "cpu": "0.0", "cpu_average": "0", "mem": "0.0", "cmdline": "s6-supervise s6rc-oneshot-runner" }, "33": { "cpu": "0.0", "cpu_average": "0", "mem": "0.0", "cmdline": "s6-supervise nginx" }, "34": { "cpu": "0.0", "cpu_average": "0", "mem": "0.0", "cmdline": "s6-supervise s6rc-fdholder" }, "35": { "cpu": "0.0", "cpu_average": "0", "mem": "0.0", "cmdline": "s6-supervise frigate" }, "36": { "cpu": "0.0", "cpu_average": "0", "mem": "0.0", "cmdline": "s6-supervise nginx-log" }, "37": { "cpu": "0.0", "cpu_average": "0", "mem": "0.0", "cmdline": "s6-supervise certsync-log" }, "48": { "cpu": "0.0", "cpu_average": "0", "mem": "0.0", "cmdline": "/package/admin/s6-2.13.2.0/command/s6-fdholderd -1 -n 256 -i data/rules" }, "49": { "cpu": "0.0", "cpu_average": "0", "mem": "0.0", "cmdline": "/package/admin/s6/command/s6-ipcserverd -1 -- /package/admin/s6/command/s6-ipcserver-access -v0 -E -l0 -i data/rules -- /package/admin/s6/command/s6-sudod -t 30000 -- /package/admin/s6-rc/command/s6-rc-oneshot-run -l ../.. --" }, "97": { "cpu": "0.0", "cpu_average": "0", "mem": "0.0", "cmdline": "s6-log -b -- T 1 n0 s10000000 T /dev/shm/logs/nginx" }, "98": { "cpu": "0.0", "cpu_average": "0", "mem": "0.0", "cmdline": "s6-log -b -- T 1 n0 s10000000 T /dev/shm/logs/go2rtc" }, "99": { "cpu": "0.0", "cpu_average": "0", "mem": "0.0", "cmdline": "s6-log -b -- T 1 n0 s10000000 T /dev/shm/logs/certsync" }, "101": { "cpu": "0.0", "cpu_average": "0", "mem": "0.0", "cmdline": "s6-log -b -- T 1 n0 s10000000 T /dev/shm/logs/frigate" }, "128": { "cpu": "3.7", "cpu_average": "3", "mem": "0.2", "cmdline": "/usr/local/go2rtc/bin/go2rtc -config=/dev/shm/go2rtc.yaml" }, "136": { "cpu": "0.0", "cpu_average": "0", "mem": "0.0", "cmdline": "bash ./run.user go2rtc-healthcheck" }, "137": { "cpu": "2.6", "cpu_average": "3", "mem": "5.5", "cmdline": "python3 -u -m frigate" }, "143": { "cpu": "0.0", "cpu_average": "0", "mem": "0.1", "cmdline": "nginx: master process nginx" }, "216": { "cpu": "0.0", "cpu_average": "0", "mem": "0.1", "cmdline": "nginx: worker process" }, "217": { "cpu": "0.0", "cpu_average": "0", "mem": "0.1", "cmdline": "nginx: worker process" }, "218": { "cpu": "0.0", "cpu_average": "0", "mem": "0.1", "cmdline": "nginx: worker process" }, "219": { "cpu": "0.1", "cpu_average": "0", "mem": "0.1", "cmdline": "nginx: worker process" }, "220": { "cpu": "0.0", "cpu_average": "0", "mem": "0.0", "cmdline": "nginx: cache manager process" }, "357": { "cpu": "0.0", "cpu_average": "0", "mem": "0.0", "cmdline": "bash ./run.user certsync" }, "450": { "cpu": "0.0", "cpu_average": "0", "mem": "1.2", "cmdline": "python3 -u -m frigate" }, "643": { "cpu": "0.6", "cpu_average": "0", "mem": "1.6", "cmdline": "frigate.recording_manager" }, "645": { "cpu": "0.3", "cpu_average": "0", "mem": "1.6", "cmdline": "frigate.review_segment_manager" }, "668": { "cpu": "9.2", "cpu_average": "5", "mem": "2.5", "cmdline": "frigate.detector.vino-0" }, "678": { "cpu": "9.2", "cpu_average": "5", "mem": "2.5", "cmdline": "frigate.detector.vino-1" }, "690": { "cpu": "0.3", "cpu_average": "1", "mem": "4.7", "cmdline": "frigate.embeddings_manager" }, "710": { "cpu": "2.9", "cpu_average": "2", "mem": "1.5", "cmdline": "frigate.output " }, "721": { "cpu": "0.0", "cpu_average": "0", "mem": "0.2", "cmdline": "/config/custom-ffmpeg/bin/ffmpeg -threads 1 -f rawvideo -pix_fmt yuv420p -video_size 5120x1440 -i pipe: -threads 1 -f mpegts -s 2560x720 -codec:v mpeg1video -q 8 -bf 0 pipe:" }, "728": { "cpu": "0.0", "cpu_average": "0", "mem": "0.2", "cmdline": "/config/custom-ffmpeg/bin/ffmpeg -threads 1 -f rawvideo -pix_fmt yuv420p -video_size 1920x1080 -i pipe: -threads 1 -f mpegts -s 1280x720 -codec:v mpeg1video -q 8 -bf 0 pipe:" }, "751": { "cpu": "0.0", "cpu_average": "0", "mem": "0.4", "cmdline": "/config/custom-ffmpeg/bin/ffmpeg -threads 1 -f rawvideo -pix_fmt yuv420p -video_size 1280x720 -i pipe: -threads 1 -f mpegts -s 1280x720 -codec:v mpeg1video -q 8 -bf 0 pipe:" }, "831": { "cpu": "9.1", "cpu_average": "4", "mem": "1.8", "cmdline": "frigate.process:GarageDriveway-Hikvision" }, "833": { "cpu": "14.3", "cpu_average": "9", "mem": "1.7", "cmdline": "frigate.process:Amcrest-FrontDoorBell" }, "853": { "cpu": "4.2", "cpu_average": "4", "mem": "1.6", "cmdline": "frigate.capture:GarageDriveway-Hikvision" }, "859": { "cpu": "2.1", "cpu_average": "2", "mem": "1.5", "cmdline": "frigate.capture:Amcrest-FrontDoorBell" }, "864": { "cpu": "0.3", "cpu_average": "0", "mem": "1.6", "cmdline": "python3 -u -m frigate" }, "868": { "cpu": "8.4", "cpu_average": "8", "mem": "1.1", "cmdline": "/config/custom-ffmpeg/bin/ffmpeg -hide_banner -loglevel warning -threads 2 -hwaccel qsv -qsv_device /dev/dri/renderD128 -hwaccel_output_format qsv -c:v h264_qsv -bsf:v dump_extra -user_agent FFmpeg Frigate/0.16.2-4d58206 -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 10000000 -use_wallclock_as_timestamps 1 -i rtsp://127.0.0.1:8554/Amcrest-FrontDoorBell -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a aac /tmp/cache/Amcrest-FrontDoorBell@%Y%m%d%H%M%S%z.mp4 -r 5 -vf vpp_qsv=framerate=5:w=1920:h=1080:format=nv12,hwdownload,format=nv12,format=yuv420p -threads 2 -f rawvideo -pix_fmt yuv420p pipe:" }, "891": { "cpu": "0.8", "cpu_average": "0", "mem": "0.2", "cmdline": "/config/custom-ffmpeg/bin/ffmpeg -vn -threads 1 -hide_banner -loglevel warning -threads 2 -user_agent FFmpeg Frigate/0.16.2-4d58206 -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 10000000 -use_wallclock_as_timestamps 1 -i rtsp://127.0.0.1:8554/GarageDriveway-Hikvision -threads 1 -f s16le -ar 16000 -ac 1 -y pipe:" }, "904": { "cpu": "0.7", "cpu_average": "0", "mem": "0.3", "cmdline": "/config/custom-ffmpeg/bin/ffmpeg -vn -threads 1 -hide_banner -loglevel warning -threads 2 -user_agent FFmpeg Frigate/0.16.2-4d58206 -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 10000000 -use_wallclock_as_timestamps 1 -i rtsp://127.0.0.1:8554/Amcrest-FrontDoorBell -threads 1 -f s16le -ar 16000 -ac 1 -y pipe:" }, "36997": { "cpu": "12.8", "cpu_average": "12", "mem": "1.6", "cmdline": "/config/custom-ffmpeg/bin/ffmpeg -hide_banner -loglevel warning -threads 2 -load_plugin hevc_hw -hwaccel qsv -qsv_device /dev/dri/renderD128 -hwaccel_output_format qsv -bsf:v dump_extra -user_agent FFmpeg Frigate/0.16.2-4d58206 -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 10000000 -use_wallclock_as_timestamps 1 -i rtsp://127.0.0.1:8554/GarageDriveway-Hikvision -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a aac /tmp/cache/GarageDriveway-Hikvision@%Y%m%d%H%M%S%z.mp4 -r 5 -vf vpp_qsv=framerate=5:w=5120:h=1440:format=nv12,hwdownload,format=nv12,format=yuv420p -threads 2 -f rawvideo -pix_fmt yuv420p pipe:" }, "48163": { "cpu": "0.0", "cpu_average": "0", "mem": "0.0", "cmdline": "/bin/bash" }, "48515": { "cpu": "0.0", "cpu_average": "0", "mem": "0.0", "cmdline": "su" }, "48516": { "cpu": "0.0", "cpu_average": "0", "mem": "0.0", "cmdline": "bash" }, "49556": { "cpu": "0.0", "cpu_average": "0", "mem": "0.0", "cmdline": "sleep 60" }, "49702": { "cpu": "0.0", "cpu_average": "0", "mem": "0.0", "cmdline": "sleep 30s" } }, "service": { "uptime": 9397, "version": "0.16.2-4d58206", "latest_version": "0.16.2", "storage": { "/media/frigate/recordings": { "total": 5489698.6, "used": 909559.8, "free": 4580138.9, "mount_type": "nfs4" }, "/media/frigate/clips": { "total": 5489698.6, "used": 909559.8, "free": 4580138.9, "mount_type": "nfs4" }, "/tmp/cache": { "total": 943505.6, "used": 21241.6, "free": 874264.5, "mount_type": "overlay" }, "/dev/shm": { "total": 1024, "used": 677.3, "free": 346.7, "mount_type": "tmpfs" } }, "temperatures": { }, "last_updated": 1763916673 }, "processes": { "recording": { "pid": 643 }, "review_segment": { "pid": 645 }, "go2rtc": { "pid": 128 }, "embeddings": { "pid": 690 }, "audio_detector": { "pid": 864 } } }Operating system
Debian
Install method
Docker Compose
Object Detector
OpenVino
Network connection
Wired
Camera make and model
Hikvision DS-2CD2387G2P-LSU/SL
Screenshots of the Frigate UI's System metrics pages
Any other information that may be helpful
Baremetal Debian running on MINISFORUM Mini PC i5 UN1250 Intel Core i5-1250P 12C/16T 16GB DDR4 1TB PCIe4.0 SSD
Intel Iris XE Graphics (Embedded).
Docker mappings and relevant configurations:
Beta Was this translation helpful? Give feedback.
All reactions