[Support]: No hw accel from my intel GPU???
See original GitHub issueDescribe the problem you are having
It appears I’m not getting any hw accel from my intel GPU and current config.
I’ve been trying to follow this issue to the best of my ability but not getting anywhere.
As of now I’m monitoring intel-gpu-top and there is no activity. BUT, within frigate container I can issue…
ffmpeg -loglevel verbose -hwaccel qsv -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p -c:v h264_qsv -i rtsp://admin:xxxx@192.168.0.4:554/h264Preview_01_sub -f null -
…and outside of the container I can see GPU activity (see below for output)
My machine is this Blink MiniS (linked from one of the recommended hw options) with N5095 11th gen (Jasper Lake) processor.
btw, thanks for a great project and for the support!
Version
0.10.1
Frigate config file
mqtt:
host: 192.168.0.97
database:
path: /db/frigate.db
cameras:
garage:
ffmpeg:
inputs:
- path: rtsp://admin:{FRIGATE_RTSP_PASSWORD}@192.168.0.4:554/h264Preview_01_sub
roles:
- record
detect:
width: 640
height: 360
record:
enabled: True
events:
retain:
default: 10
mode: motion
ffmpeg:
hwaccel_args:
- -hwaccel
- qsv
- -qsv_device
- /dev/dri/renderD128
Relevant log output
[2022-08-08 07:13:42] frigate.app INFO : Starting Frigate (0.10.1-83481af)
Starting migrations
[2022-08-08 07:13:42] peewee_migrate INFO : Starting migrations
There is nothing to migrate
[2022-08-08 07:13:42] peewee_migrate INFO : There is nothing to migrate
[2022-08-08 07:13:42] detector.cpu INFO : Starting detection process: 217
[2022-08-08 07:13:42] frigate.app INFO : Output process started: 219
[2022-08-08 07:13:42] frigate.edgetpu WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.
[2022-08-08 07:13:42] ws4py INFO : Using epoll
[2022-08-08 07:13:42] frigate.app INFO : Camera processor started for garage: 223
[2022-08-08 07:13:42] frigate.app INFO : Capture process started for garage: 224
[2022-08-08 07:13:42] ws4py INFO : Using epoll
FFprobe output from your camera
root@69489a3dbcd2:/opt/frigate# ffprobe rtsp://admin:xxxx@192.168.0.4:554/h264Preview_01_sub
ffprobe version 4.3.1 Copyright (c) 2007-2020 the FFmpeg developers
built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libfreetype --enable-libvidstab --enable-libmfx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-vaapi --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
Input #0, rtsp, from 'rtsp://admin:xxxx@192.168.0.4:554/h264Preview_01_sub':
Metadata:
title : Session streamed by "preview"
comment : h264Preview_01_sub
Duration: N/A, start: 0.000250, bitrate: N/A
Stream #0:0: Video: h264, yuv420p(progressive), 640x360, 24.92 tbr, 90k tbn, 180k tbc
Stream #0:1: Audio: aac, 16000 Hz, mono, fltp
Frigate stats
No response
Operating system
Other Linux
Install method
Docker Compose
Coral version
CPU (no coral)
Network connection
Wired
Camera make and model
Reolink, RLC-820A
Any other information that may be helpful
Other Linux is:
Distributor ID: Ubuntu Description: Ubuntu 22.04 LTS Release: 22.04 Codename: jammy
Docker Compose:
version: “3” services: frigate: container_name: frigate privileged: true restart: unless-stopped image: blakeblackshear/frigate:stable-amd64 shm_size: “64mb” devices: # - /dev/bus/usb:/dev/bus/usb # passes the USB Coral, needs to be modified for other versions # - /dev/apex_0:/dev/apex_0 # passes a PCIe Coral, follow driver instructions here https://coral.ai/docs/m2/get-started/#2a-on-linux - /dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware volumes: - /etc/localtime:/etc/localtime:ro - $HOME/docker/frigate/config.yml:/config/config.yml:ro - $HOME/docker/frigate/database:/db - /usb-hdd-storage/frigate:/media/frigate - type: tmpfs target: /tmp/cache tmpfs: size: 1000000000 ports: - “5000:5000” - “1935:1935” environment: FRIGATE_RTSP_PASSWORD: xxxx
vainfo --display drm --device /dev/dri/renderD128
libva info: VA-API version 1.14.0 libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_14 libva info: va_openDriver() returns 0 vainfo: VA-API version: 1.14 (libva 2.12.0) vainfo: Driver version: Intel iHD driver for Intel® Gen Graphics - 22.3.1 () vainfo: Supported profile and entrypoints VAProfileNone : VAEntrypointVideoProc VAProfileNone : VAEntrypointStats VAProfileMPEG2Simple : VAEntrypointVLD VAProfileMPEG2Main : VAEntrypointVLD VAProfileH264Main : VAEntrypointVLD VAProfileH264Main : VAEntrypointEncSliceLP VAProfileH264High : VAEntrypointVLD VAProfileH264High : VAEntrypointEncSliceLP VAProfileJPEGBaseline : VAEntrypointVLD VAProfileJPEGBaseline : VAEntrypointEncPicture VAProfileH264ConstrainedBaseline: VAEntrypointVLD VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP VAProfileVP8Version0_3 : VAEntrypointVLD VAProfileHEVCMain : VAEntrypointVLD VAProfileHEVCMain : VAEntrypointEncSliceLP VAProfileHEVCMain10 : VAEntrypointVLD VAProfileHEVCMain10 : VAEntrypointEncSliceLP VAProfileVP9Profile0 : VAEntrypointVLD VAProfileVP9Profile1 : VAEntrypointVLD VAProfileVP9Profile2 : VAEntrypointVLD VAProfileVP9Profile3 : VAEntrypointVLD VAProfileHEVCMain422_10 : VAEntrypointVLD VAProfileHEVCMain444 : VAEntrypointVLD VAProfileHEVCMain444 : VAEntrypointEncSliceLP VAProfileHEVCMain444_10 : VAEntrypointVLD VAProfileHEVCMain444_10 : VAEntrypointEncSliceLP
ffmpeg -loglevel verbose -hwaccel qsv -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p -c:v h264_qsv -i rtsp://admin:xxxx@192.168.0.4:554/h264Preview_01_sub -f null -
root@69489a3dbcd2:/opt/frigate# ffmpeg -loglevel verbose -hwaccel qsv -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p -c:v h264_qsv -i rtsp://admin:xxxx@192.168.0.4:554/h264Preview_01_sub -f null - ffmpeg version 4.3.1 Copyright © 2000-2020 the FFmpeg developers built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04) configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libfreetype --enable-libvidstab --enable-libmfx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-vaapi --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib libavutil 56. 51.100 / 56. 51.100 libavcodec 58. 91.100 / 58. 91.100 libavformat 58. 45.100 / 58. 45.100 libavdevice 58. 10.100 / 58. 10.100 libavfilter 7. 85.100 / 7. 85.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 7.100 / 5. 7.100 libswresample 3. 7.100 / 3. 7.100 libpostproc 55. 7.100 / 55. 7.100 [tcp @ 0x564f6840cac0] Starting connection attempt to 192.168.0.4 port 554 [tcp @ 0x564f6840cac0] Successfully connected to 192.168.0.4 port 554 [rtsp @ 0x564f6840a6c0] SDP: v=0 o=- 1659852013046305 1 IN IP4 192.168.0.4 s=Session streamed by “preview” i=h264Preview_01_sub t=0 0 a=tool:LIVE555 Streaming Media v2020.08.12 a=type:broadcast a=control:* a=range:npt=0- a=x-qt-text-nam:Session streamed by “preview” a=x-qt-text-inf:h264Preview_01_sub m=video 0 RTP/AVP 96 c=IN IP4 0.0.0.0 b=AS:500 a=rtpmap:96 H264/90000 a=fmtp:96 packetization-mode=1;profile-level-id=640033;sprop-parameter-sets=Z2QAM6wVFKCgL/lQ,aO48sA== a=control:track1 m=audio 0 RTP/AVP 97 c=IN IP4 0.0.0.0 b=AS:256 a=rtpmap:97 MPEG4-GENERIC/16000 a=fmtp:97 streamtype=5;profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1408 a=control:track2
[rtsp @ 0x564f6840a6c0] setting jitter buffer size to 500 Last message repeated 1 times [h264 @ 0x564f6840e640] Reinit context to 640x368, pix_fmt: yuv420p [rtsp @ 0x564f6840a6c0] max_analyze_duration 5000000 reached at 5056000 microseconds st:1 Input #0, rtsp, from ‘rtsp://admin:xxxx@192.168.0.4:554/h264Preview_01_sub’: Metadata: title : Session streamed by “preview” comment : h264Preview_01_sub Duration: N/A, start: 0.000438, bitrate: N/A Stream #0:0: Video: h264, 1 reference frame, yuv420p(progressive), 640x360 (640x368), 12.50 tbr, 90k tbn, 180k tbc Stream #0:1: Audio: aac, 16000 Hz, mono, fltp [h264_mp4toannexb @ 0x564f68470980] The input looks like it is Annex B already Stream mapping: Stream #0:0 -> #0:0 (h264 (h264_qsv) -> wrapped_avframe (native)) Stream #0:1 -> #0:1 (aac (native) -> pcm_s16le (native)) Press [q] to stop, [?] for help [graph_1_in_0_1 @ 0x564f6847f100] tb:1/16000 samplefmt:fltp samplerate:16000 chlayout:0x4 [format_out_0_1 @ 0x564f685ac480] auto-inserting filter ‘auto_resampler_0’ between the filter ‘Parsed_anull_0’ and the filter ‘format_out_0_1’ [auto_resampler_0 @ 0x564f684f0440] ch:1 chl:mono fmt:fltp r:16000Hz -> ch:1 chl:mono fmt:s16 r:16000Hz [AVHWDeviceContext @ 0x564f684a7580] Trying to use DRM render node for device 0. [AVHWDeviceContext @ 0x564f684a7580] libva: VA-API version 1.14.0 [AVHWDeviceContext @ 0x564f684a7580] libva: User requested driver ‘iHD’ [AVHWDeviceContext @ 0x564f684a7580] libva: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so [AVHWDeviceContext @ 0x564f684a7580] libva: Found init function __vaDriverInit_1_13 [AVHWDeviceContext @ 0x564f684a7580] libva: va_openDriver() returns 0 [AVHWDeviceContext @ 0x564f684a7580] Initialised VAAPI connection: version 1.14 [AVHWDeviceContext @ 0x564f684a7580] VAAPI driver: Intel iHD driver for Intel® Gen Graphics - 21.4.1 (be92568). [AVHWDeviceContext @ 0x564f684a7580] Driver not found in known nonstandard list, using standard behaviour. [AVHWDeviceContext @ 0x564f684f0080] Initialize MFX session: API version is 1.32, implementation version is 1.35 [AVHWDeviceContext @ 0x564f684f6dc0] VAAPI driver: Intel iHD driver for Intel® Gen Graphics - 21.4.1 (be92568). [AVHWDeviceContext @ 0x564f684f6dc0] Driver not found in known nonstandard list, using standard behaviour. [h264_qsv @ 0x564f6846f140] Decoder: output is video memory surface [AVHWDeviceContext @ 0x564f684ed680] VAAPI driver: Intel iHD driver for Intel® Gen Graphics - 21.4.1 (be92568). [AVHWDeviceContext @ 0x564f684ed680] Driver not found in known nonstandard list, using standard behaviour. [h264_qsv @ 0x564f6846f140] Decoder: output is video memory surface [graph 0 input from stream 0:0 @ 0x564f686977c0] w:640 h:360 pixfmt:qsv tb:1/90000 fr:25/2 sar:0/1 Output #0, null, to ‘pipe:’: Metadata: title : Session streamed by “preview” comment : h264Preview_01_sub encoder : Lavf58.45.100 Stream #0:0: Video: wrapped_avframe, 1 reference frame, qsv, 640x360, q=2-31, 200 kb/s, 12.50 fps, 12.50 tbn, 12.50 tbc Metadata: encoder : Lavc58.91.100 wrapped_avframe Stream #0:1: Audio: pcm_s16le, 16000 Hz, mono, s16, 256 kb/s Metadata: encoder : Lavc58.91.100 pcm_s16le [null @ 0x564f68474300] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 186 >= 141
Issue Analytics
- State:
- Created a year ago
- Comments:9
Top Related StackOverflow Question
I’d initially considered those settings but everything apperared working without those. I’ve tried adding them in but that ends up causing further errors. Side note: I further investigated using rtmp instead of rtsp, as there’s some evidence that this ends up being more robust, but I haven’t figured out how to properly configure that yet.
As of now, everything is mostly working (including hw accel) with just this:
thanks @NickM-27 !
Interesting, at this point I’d recommend trying just
-c:v h264_qsvwithout the other parts. If that doesn’t work, then I’d recommend waiting for or upgrading to the 0.11 release candidate as it has a new build of ffmpeg that should work much simply with justInteresting, at this point I'd recommend trying just-c:v h264_qsvcommand