Closed Kosygor closed 2 years ago
The environment variables are only set in the python process and the ffmpeg processes it spawns. It won't be set when you exec into the container, but it is working. It doesn't matter where you set them in the config.
Is the resolution and frame rate commented out correct for the stream you are connecting to? Do you have a lower resolution substream you could use for detection? I think you are underestimating the CPU required to decode high resolutions even with acceleration.
The environment variables are only set in the python process and the ffmpeg processes it spawns. It won't be set when you exec into the container, but it is working. It doesn't matter where you set them in the config.
Right, noticed varabile behaviour after posting issue, but did not have time to describe it here.
Do you have a lower resolution substream you could use for detection?
Since my TPU is on the way I am only testing now for record with detect disabled.
Is the resolution and frame rate commented out correct for the stream you are connecting to? Resolution is diffrent now. But for some reason ffmpeg command in htop has 720p resolution mentioned. I think you are underestimating the CPU required to decode high resolutions even with acceleration. Propably yes but considering what my colegue noticed I will do some more test when TPU will arrive.
root 61319 11.7 1.2 361600 49552 ? Ssl 23:03 1:02 ffmpeg -f rawvideo -pix_fmt yuv420p -video_size 1280x720 -i pipe: -f mpegts -s 1280x720 -codec:v mpeg1video -q 8 -bf 0 pipe:
root 61320 0.6 1.7 1722284 70624 ? Sl 23:03 0:03 frigate.process:Taras
root 61321 2.3 1.7 1735896 69992 ? Sl 23:03 0:12 python3 -u -m frigate
root 61322 0.0 0.3 74624 12100 ? Ss 23:03 0:00 ffmpeg -f rawvideo -pix_fmt yuv420p -video_size 1280x720 -i pipe: -f mpegts -s 1280x720 -codec:v mpeg1video -q 8 -bf 0 pipe:
So all in all (for futere readers) I had few more things:
Since my TPU is on the way I am only testing now for record with detect disabled
Even with detect disabled, it still has to decode the stream to show the camera in the UI and for the APIs to work. You would still be better off with a lower resolution set for detect.
Ok do at this point it seams that it does not matter if hwaccel is enabled or not. If You allow I will report how situation has changed after installing TPU.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the problem you are having
I just cannot get hwaccel working. I am running Frigate NVR as addon for Home Asisstant supervised which is running inside Debian 11.1 VM on TrueNAS Scale. My card is Radeon R5 340. I am still waiting to receive my Coral TPU. With provided config I can see video of camera but CPU is high.
Version
0.9.4-26AE608
Frigate config file
Relevant log output
FFprobe output from your camera
Frigate stats
Operating system
HassOS
Install method
HassOS Addon
Coral version
CPU (no coral)
Network connection
Wired
Camera make and model
BCS-DMIP1200IR-E
Any other information that may be helpful
And here is the thing when I run above I get
But when I run manually run inside container :
LIBVA_DRIVER_NAME="radeonsi"
I get
But CPU usage is still high. When I comment out
From above config restart frigate and then once again set env var manually: I got no image... ffmpeg result does not change but Log gives this:
From my uderstaning for some reason frigate does not load this env_var at the beggining. I have tried to put this env var at the beggining and the end of config file.
Edit: ok I missed disabling protection mode. Can not test right now becasue disable option is gone from my HA WebUI.
Installed Firgate Full Access (reason that i did not protection mode button) turnet it off but nothing changed.