Closed jayveesea closed 2 years ago
So with your current config running intel_gpu_top shows activity? Does it shown none without frigate running?
So with your current config running intel_gpu_top shows activity? Does it shown none without frigate running?
current config shows no activity with intel_gpu_top
. If I 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 -
command within the frigate container (or outside) I see activity with intel_gpu_top
.
Gotcha, then you should add -c:v h264_qsv
to your hwaccel_args
No luck with this mod to config.yml
either...
hwaccel_args:
- -hwaccel
- qsv
- -qsv_device
- /dev/dri/renderD128
- -c:v
- h264_qsv
...interestingly it raises an error in the log...
[2022-08-09 01:07:31] frigate.app INFO : Starting Frigate (0.10.1-83481af) Starting migrations [2022-08-09 01:07:31] peewee_migrate INFO : Starting migrations There is nothing to migrate [2022-08-09 01:07:31] peewee_migrate INFO : There is nothing to migrate [2022-08-09 01:07:31] frigate.app INFO : Output process started: 219 [2022-08-09 01:07:31] detector.cpu INFO : Starting detection process: 217 [2022-08-09 01:07:31] frigate.edgetpu WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes. [2022-08-09 01:07:31] ws4py INFO : Using epoll [2022-08-09 01:07:31] frigate.app INFO : Camera processor started for garage: 223 [2022-08-09 01:07:31] frigate.app INFO : Capture process started for garage: 225 [2022-08-09 01:07:31] ws4py INFO : Using epoll [2022-08-09 01:07:37] frigate.video ERROR : garage: Unable to read frames from ffmpeg process. [2022-08-09 01:07:37] frigate.video ERROR : garage: ffmpeg process is not running. exiting capture thread... [2022-08-09 01:07:51] watchdog.garage ERROR : Ffmpeg process crashed unexpectedly for garage. [2022-08-09 01:07:51] watchdog.garage ERROR : The following ffmpeg logs include the last 100 lines prior to exit. [2022-08-09 01:07:51] ffmpeg.garage.detect ERROR : [rtsp @ 0x55d1d0ccff00] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size [2022-08-09 01:07:51] ffmpeg.garage.detect ERROR : Consider increasing the value for the 'analyzeduration' and 'probesize' options [2022-08-09 01:07:51] ffmpeg.garage.detect ERROR : Output file #0 does not contain any stream [2022-08-09 01:07:58] frigate.video ERROR : garage: Unable to read frames from ffmpeg process. [2022-08-09 01:07:58] frigate.video ERROR : garage: Unable to read frames from ffmpeg process. [2022-08-09 01:07:58] frigate.video ERROR : garage: Unable to read frames from ffmpeg process. [2022-08-09 01:07:58] frigate.video ERROR : garage: ffmpeg process is not running. exiting capture thread... [2022-08-09 01:08:01] watchdog.garage ERROR : Ffmpeg process crashed unexpectedly for garage. [2022-08-09 01:08:01] watchdog.garage ERROR : The following ffmpeg logs include the last 100 lines prior to exit. [2022-08-09 01:08:01] ffmpeg.garage.detect ERROR : [segment @ 0x56153175ee80] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly [2022-08-09 01:08:01] ffmpeg.garage.detect ERROR : [flv @ 0x56153177abc0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly [2022-08-09 01:08:01] ffmpeg.garage.detect ERROR : Impossible to convert between the formats supported by the filter 'Parsed_null_0' and the filter 'auto_scaler_0' [2022-08-09 01:08:01] ffmpeg.garage.detect ERROR : Error reinitializing filters! [2022-08-09 01:08:01] ffmpeg.garage.detect ERROR : Failed to inject frame into filter network: Function not implemented [2022-08-09 01:08:01] ffmpeg.garage.detect ERROR : Error while processing the decoded data for stream #0:0 [2022-08-09 01:08:01] frigate.record WARNING : Discarding a corrupt recording segment: garage-20220809010758.mp4 [2022-08-09 01:08:07] frigate.video ERROR : garage: Unable to read frames from ffmpeg process. [2022-08-09 01:08:07] frigate.video ERROR : garage: ffmpeg process is not running. exiting capture thread... [2022-08-09 01:08:11] watchdog.garage ERROR : Ffmpeg process crashed unexpectedly for garage. [2022-08-09 01:08:11] watchdog.garage ERROR : The following ffmpeg logs include the last 100 lines prior to exit. [2022-08-09 01:08:11] ffmpeg.garage.detect ERROR : [rtsp @ 0x56361ec8bf00] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size [2022-08-09 01:08:11] ffmpeg.garage.detect ERROR : Consider increasing the value for the 'analyzeduration' and 'probesize' options [2022-08-09 01:08:11] ffmpeg.garage.detect ERROR : Output file #0 does not contain any stream [2022-08-09 01:08:17] frigate.video ERROR : garage: Unable to read frames from ffmpeg process. [2022-08-09 01:08:17] frigate.video ERROR : garage: ffmpeg process is not running. exiting capture thread... [2022-08-09 01:08:21] watchdog.garage ERROR : Ffmpeg process crashed unexpectedly for garage. [2022-08-09 01:08:21] watchdog.garage ERROR : The following ffmpeg logs include the last 100 lines prior to exit. [2022-08-09 01:08:21] ffmpeg.garage.detect ERROR : [rtsp @ 0x565262ceaf00] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size [2022-08-09 01:08:21] ffmpeg.garage.detect ERROR : Consider increasing the value for the 'analyzeduration' and 'probesize' options [2022-08-09 01:08:21] ffmpeg.garage.detect ERROR : Output file #0 does not contain any stream
also, if I remove the -c:v h264_qsv
from my test command like this ffmpeg -loglevel verbose -hwaccel qsv -hwaccel_device /dev/dri/renderD128 -i rtsp://admin:reo1e7VC@192.168.0.4:554/h264Preview_01_sub -f null -
it will execute but with no GPU activity.
also tried this...
hwaccel_args:
- -hwaccel
- qsv
- -qsv_device
- /dev/dri/renderD128
- -c:v
- h264_qsv
- -hwaccel_output_format
- yuv420p
...which gave similar errors.
Interesting, at this point I'd recommend trying just -c:v h264_qsv
without 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 just Interesting, at this point I'd recommend trying just
-c:v h264_qsv
command
btw, thanks for the help!
hmmm, maybe some luck with just this...
hwaccel_args:
- -c:v
- h264_qsv
this now yields some GPU activity, although log has some errors...
[2022-08-09 01:24:13] frigate.app INFO : Starting Frigate (0.10.1-83481af) Starting migrations [2022-08-09 01:24:13] peewee_migrate INFO : Starting migrations There is nothing to migrate [2022-08-09 01:24:13] peewee_migrate INFO : There is nothing to migrate [2022-08-09 01:24:13] detector.cpu INFO : Starting detection process: 217 [2022-08-09 01:24:13] frigate.app INFO : Output process started: 219 [2022-08-09 01:24:13] frigate.edgetpu WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes. [2022-08-09 01:24:13] ws4py INFO : Using epoll [2022-08-09 01:24:13] frigate.app INFO : Camera processor started for garage: 223 [2022-08-09 01:24:13] frigate.app INFO : Capture process started for garage: 225 [2022-08-09 01:24:13] ws4py INFO : Using epoll [2022-08-09 01:24:18] frigate.video ERROR : garage: Unable to read frames from ffmpeg process. [2022-08-09 01:24:18] frigate.video ERROR : garage: ffmpeg process is not running. exiting capture thread... [2022-08-09 01:24:33] watchdog.garage ERROR : Ffmpeg process crashed unexpectedly for garage. [2022-08-09 01:24:33] watchdog.garage ERROR : The following ffmpeg logs include the last 100 lines prior to exit. [2022-08-09 01:24:33] ffmpeg.garage.detect ERROR : [rtsp @ 0x56011b04fe00] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size [2022-08-09 01:24:33] ffmpeg.garage.detect ERROR : Consider increasing the value for the 'analyzeduration' and 'probesize' options [2022-08-09 01:24:33] ffmpeg.garage.detect ERROR : Output file #0 does not contain any stream
...I'll continue to mess with this avenue and report back.
To be fair, seems like you're using a reolink cam, would recommend using the docs suggested reolink config https://docs.frigate.video/configuration/camera_specific#reolink-410520-possibly-others
To be fair, seems like you're using a reolink cam, would recommend using the docs suggested reolink config https://docs.frigate.video/configuration/camera_specific#reolink-410520-possibly-others
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:
hwaccel_args:
- -c:v
- h264_qsv
thanks @NickM-27 !
Describe 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
Relevant log output
FFprobe output from your camera
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:
Docker Compose:
vainfo --display drm --device /dev/dri/renderD128
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 -