nau Posted April 30, 2021 Share Posted April 30, 2021 Hello I'm about to add Coral to Frigate and wonder which m2 module I need? My motherboard have spare m2 key E. M.2 Accelerator A+E key M.2 Accelerator with Dual Edge TPU First is A+E key second is E key is it supported by drivers? Quote Link to comment
yayitazale Posted April 30, 2021 Author Share Posted April 30, 2021 (edited) 41 minutes ago, nau said: Hello I'm about to add Coral to Frigate and wonder which m2 module I need? My motherboard have spare m2 key E. M.2 Accelerator A+E key M.2 Accelerator with Dual Edge TPU First is A+E key second is E key is it supported by drivers? As far as I know, the TPU chip inside the all Coral boards is the same, so the driver should be valid for all of the coral PCI-M2 devices. Correct me please... @ich777 Edited April 30, 2021 by yayitazale Quote Link to comment
ich777 Posted April 30, 2021 Share Posted April 30, 2021 16 minutes ago, yayitazale said: As far as I know, the TPU chip inside the all Coral boards is the same, so the driver should be valid for all of the coral PCI-M2 devices. Correct me please... @ich777 I actually don't own such a device, if someone want's to donate one to me... 🤑 From what I've know the chips on every Coral Accelerator device is the same some devices have one and some two from what I know. Quote Link to comment
yayitazale Posted April 30, 2021 Author Share Posted April 30, 2021 23 minutes ago, ich777 said: I actually don't own such a device, if someone want's to donate one to me... 🤑 From what I've know the chips on every Coral Accelerator device is the same some devices have one and some two from what I know. I only own a USB coral so I don't need drivers to make it work and I can use it on mobile proyects with a raspi. 🤑🤑🤑 1 Quote Link to comment
Allanon Posted April 30, 2021 Share Posted April 30, 2021 Thanks yayitazale I got the addon running in Home Assistant and its recognizing my USB Coral, having problems with the hardware acceleration but thats another story! I'v hit a hurdle though, reason I wanted Frigate in a docker was due to easily mounting my Unraid unassigned drive to it to store all the media from the camera, I have been googling how to pass the same drive to a Home Assistant VM and to be honest struggling! As i am just constantly filling up my cache drive. Any idea if there is going to be a Unraid docker created for Frigate for the OLD CPU version? Do you plan on keeping this version, addon and possibly Docker version updated in the future? Really want to say thanks for all the work you have done, i'm just trying to work out if I have to save up and invest in some new hardware, you wouldn't believe the hours I have put into this to get as far as I am now 😕 What you have created is just perfect for my use case 🙂 and i hope to keep using it Thanks 🙂 Quote Link to comment
Allanon Posted May 1, 2021 Share Posted May 1, 2021 I have found this https://community.home-assistant.io/t/solved-hassos-mount-nas-network-share/303292 Honestly I understand about 1 word in 5, does anyone with more knowledge agree this is the best way on Unraid to get more storage to the Frigate addon for longer term camera storage rather than saving it on a cache ssd? Thanks Quote Link to comment
yayitazale Posted May 1, 2021 Author Share Posted May 1, 2021 21 hours ago, Allanon said: Thanks yayitazale I got the addon running in Home Assistant and its recognizing my USB Coral, having problems with the hardware acceleration but thats another story! I'v hit a hurdle though, reason I wanted Frigate in a docker was due to easily mounting my Unraid unassigned drive to it to store all the media from the camera, I have been googling how to pass the same drive to a Home Assistant VM and to be honest struggling! As i am just constantly filling up my cache drive. Any idea if there is going to be a Unraid docker created for Frigate for the OLD CPU version? Do you plan on keeping this version, addon and possibly Docker version updated in the future? Really want to say thanks for all the work you have done, i'm just trying to work out if I have to save up and invest in some new hardware, you wouldn't believe the hours I have put into this to get as far as I am now 😕 What you have created is just perfect for my use case 🙂 and i hope to keep using it Thanks 🙂 I'm not the developer of the app, I'm just mantaining the Template of the container for Unraid. The modified addon is mainteined by another guy so ask him if he is going to maintain it. https://github.com/pdecat 1 Quote Link to comment
yayitazale Posted May 1, 2021 Author Share Posted May 1, 2021 2 hours ago, Allanon said: I have found this https://community.home-assistant.io/t/solved-hassos-mount-nas-network-share/303292 Honestly I understand about 1 word in 5, does anyone with more knowledge agree this is the best way on Unraid to get more storage to the Frigate addon for longer term camera storage rather than saving it on a cache ssd? Thanks Do yo know on whitch folder of hass is storing all the media? 1 Quote Link to comment
Allanon Posted May 1, 2021 Share Posted May 1, 2021 4 hours ago, yayitazale said: I'm not the developer of the app, I'm just mantaining the Template of the container for Unraid. The modified addon is mainteined by another guy so ask him if he is going to maintain it. https://github.com/pdecat Thank you! 🙂 Will do 1 Quote Link to comment
Allanon Posted May 1, 2021 Share Posted May 1, 2021 4 hours ago, yayitazale said: Do yo know on whitch folder of hass is storing all the media? As part of the normal SMB shares that are created, there is Home Assisted Share called media which then has media\frigate media\cache frigate and cache are created by the frigate addon Quote Link to comment
yayitazale Posted May 1, 2021 Author Share Posted May 1, 2021 (edited) 21 minutes ago, Allanon said: As part of the normal SMB shares that are created, there is Home Assisted Share called media which then has media\frigate media\cache frigate and cache are created by the frigate addon Ok, so if you want to avoid using SSD cache you just can add a path to mount the media folder onto a non cache share of unraid. Create a new share on unraid and set the use of cache to "no", like this, including the disks you want to use to store NVR: Be aware that this is going to increase a lot the write/reads on your disk, so I recomend you to use a proper disk to do this job (a WD purple series or so https://amzn.to/3e6UIjC (refered link)). You should config all your shares except the NVR one to not to use this disk and only use it to store NVR) Then go to your hass container and edit it. You need to add a folder path and point the /media/frigate folder of the container to the non cache share, something like this: Apply the change and now all the new media created on the /media/frigate folder on hass will be stored on that folder of unraid, skipping the cache disks. Edited May 1, 2021 by yayitazale 1 Quote Link to comment
Allanon Posted May 1, 2021 Share Posted May 1, 2021 5 minutes ago, yayitazale said: Ok, so if you want to avoid using SSD cache you just can add a path to mount the media folder onto a non cache share of unraid. Create a new share on unraid and set the use of cache to "no", like this, including the disks you want to use to store NVR: Be aware that this is going to increase a lot the write/reads on your disk, so I recomend you to use a proper disk to do this job (a WD purple series or so https://amzn.to/3e6UIjC (refered link)). You should config all your shares except the NVR one to not to use this disk and only use it to store NVR) Then go to your hass container and edit it. You need to add a folder path and point the /media folder of the container to the non cache share, something like this: Apply the change and now all the new media created on the /media folder on hass will be stored on that folder of unraid, skipping the cache disks. Thanks yayitazale Sorry I should have said I have tried before to add unassigned drives to home assistant VM, basically the same way as you explained above and how i have successfully done it before in Docker. Unfortunately the Home Assistant VM always hangs then and I dont know how to troubleshoot that. Not sure if you use Home Assistant but any googling on this subject seems to point to it being very locked down intentially, hence the complicated instructions in the link I provided earlier. On my way out now but will try again as per your instructions and see if I can find some logs or something. Appreciate the help thank you! Quote Link to comment
remati Posted May 5, 2021 Share Posted May 5, 2021 Just wanted to give you guys an update... I installed the m.2 A+E coral card into the wifi slot on my itx motherboard. It has cut down on my CPU usage while detecting 8 rtsp camera feeds. Two of which have a lot of car movement on a busy street. This used to put the pain on my i5 9400 cpu (about 70% usage) if I did not mask out the street. Now my CPU is sitting at ~25% usage and that is without the masks! The coral ai chip is doing great. Now I need to figure out how to get the frigate.process using less CPU. Although 25% is not too bad for now I suppose. Thanks again yayitazale! Quote Link to comment
mathgoy Posted May 6, 2021 Share Posted May 6, 2021 Hi Same feedback as @remati here. Just loaded my M.2 Dual edge TPU (using a PCIE adator) and it worked right off the bat. However, I am struggling with the Nvidia Hardware acceleration. I pulled the nvidia version of the docker and added the 2 environment variables as explained in the documentation. There is one sentence I don't understand in the documentation though. Quote In order to pass NVDEC, the docker engine must be set to nvidia What does it mean? For your information, the error I get for the stream I am trying to process with my nvidia card is the following: [h264_cuvid @ 0x563acb21c380] Failed loading nvcuvid. [h264_cuvid @ 0x563acb21c380] Cannot load libnvcuvid.so.1 Thanks for your help! Quote Link to comment
yayitazale Posted May 6, 2021 Author Share Posted May 6, 2021 53 minutes ago, mathgoy said: Hi Same feedback as @remati here. Just loaded my M.2 Dual edge TPU (using a PCIE adator) and it worked right off the bat. However, I am struggling with the Nvidia Hardware acceleration. I pulled the nvidia version of the docker and added the 2 environment variables as explained in the documentation. There is one sentence I don't understand in the documentation though. What does it mean? For your information, the error I get for the stream I am trying to process with my nvidia card is the following: [h264_cuvid @ 0x563acb21c380] Failed loading nvcuvid. [h264_cuvid @ 0x563acb21c380] Cannot load libnvcuvid.so.1 Thanks for your help! ¿Did you install the Unraid Nvidia plugin? I dind't have time to create a nvidia frigate version but I can try to create it this weekend. Not sure about how complex the hard acc env variable setup will be... Quote Link to comment
mathgoy Posted May 6, 2021 Share Posted May 6, 2021 1 hour ago, yayitazale said: ¿Did you install the Unraid Nvidia plugin? I dind't have time to create a nvidia frigate version but I can try to create it this weekend. Not sure about how complex the hard acc env variable setup will be... hi, Thanks for your feedback Yes I did install the Unraid Nvidia Plugin and it is functionnal with Plex for instance. Please let me know about any information I could help you with 1 Quote Link to comment
sylus Posted May 8, 2021 Share Posted May 8, 2021 Hi, maybe a stupid question but can I use Frigate without setting up MQTT? Right now I am not interested in the HomeAssistant integration. I just like to try it as a normal NVR. Quote Link to comment
IpDo Posted May 9, 2021 Share Posted May 9, 2021 Hi @mathgoy, I've been using Frigate with an NVIDIA GPU. to set it up, go the the docker template and add: --rm --runtime=nvidia to the "Extra Parameters". You will also need to add two new Variables: "NVIDIA_VISIBLE_DEVICES" and "NVIDIA_DRIVER_CAPABILITIES": After that you should be able to run "nvidia-smi" in the docker console: Note that you won't get anything under processes here even after you'll get the GPU decoding to work. After that you should adjust you're config to use the HW decoding. see here: https://blakeblackshear.github.io/frigate/configuration/nvdec Those are my changes: (all my cameras are 1080P h264) When you're done you should be able to see the GPU being used by running "nvidia-smi" from the Unraid console: I have 8 cameras, so 8 processes (and another one is Deepstack). Hope it helps. 2 1 Quote Link to comment
yayitazale Posted May 9, 2021 Author Share Posted May 9, 2021 19 hours ago, sylus said: Hi, maybe a stupid question but can I use Frigate without setting up MQTT? Right now I am not interested in the HomeAssistant integration. I just like to try it as a normal NVR. Yes, you can use it as standalone service but keep in mind that there is no notification channel implemented aside from mqtt. Quote Link to comment
mathgoy Posted May 10, 2021 Share Posted May 10, 2021 Hi @IpDo Thanks for the Tips. I did exactly what you were advising and It worked. I was missing the GPUID (i was using 'all" as it is mentioned in the documentation) as well as the extra arguments After it worked with the regular template, I moved to the new frigate-nvidia template (big thanks to @yayitazale) and it was even easier since all the variables were created. Just one thing. In the YAML config file, the documentation is telling us to add the following to enable the hardware decoding: It didn't work for me and it crashed the docker (even deleting it for some reason, several times!) Instead of that, I followed your recommendations and added the following which worked like a charm: Thanks again mate 1 Quote Link to comment
martikainen Posted May 14, 2021 Share Posted May 14, 2021 Thanks a lot for the nvidia version! Gave it a go yesterday and I really love it One thing I noticed is that if you mess the config up, or if a process crashes in frigate, the whole docker container is marked as orphan in unraid and you need to redeploy it (using previous apps for example). I'm guessing this is a unraid template error and not related to blakeblackshear's image. Quote Link to comment
yayitazale Posted May 14, 2021 Author Share Posted May 14, 2021 1 hour ago, martikainen said: Thanks a lot for the nvidia version! Gave it a go yesterday and I really love it One thing I noticed is that if you mess the config up, or if a process crashes in frigate, the whole docker container is marked as orphan in unraid and you need to redeploy it (using previous apps for example). I'm guessing this is a unraid template error and not related to blakeblackshear's image. I will check it this weekend 1 Quote Link to comment
mathgoy Posted May 14, 2021 Share Posted May 14, 2021 (edited) 7 hours ago, yayitazale said: I will check it this weekend Just some further inputs: If you use the "regular" docker and manually add the nvidia GPU support, the whole container will be marked as oprhan when it crashes too. Also, when you reboot your server, the container will also disappear. Edited May 14, 2021 by mathgoy Quote Link to comment
martikainen Posted May 14, 2021 Share Posted May 14, 2021 2 hours ago, yayitazale said: I will check it this weekend Thanks! Forgot to add an example, try removing - detect from a camera and restart the container. Error parsing config: The detect role is required for dictionary value @ data['cameras']['test']['ffmpeg']['inputs'] e":"No such container: ddf6dc9c7a50"} Att startup when checking the logs it will throw the above error, then the container will become orphan. And as @mathgoy seems to have found this issue is in the original frigate template as well so maybe you wont find it that easy =/ Quote Link to comment
hamadfayyad Posted May 14, 2021 Share Posted May 14, 2021 On 5/9/2021 at 11:10 AM, IpDo said: Hi @mathgoy, I've been using Frigate with an NVIDIA GPU. to set it up, go the the docker template and add: --rm --runtime=nvidia to the "Extra Parameters". You will also need to add two new Variables: "NVIDIA_VISIBLE_DEVICES" and "NVIDIA_DRIVER_CAPABILITIES": After that you should be able to run "nvidia-smi" in the docker console: Note that you won't get anything under processes here even after you'll get the GPU decoding to work. After that you should adjust you're config to use the HW decoding. see here: https://blakeblackshear.github.io/frigate/configuration/nvdec Those are my changes: (all my cameras are 1080P h264) When you're done you should be able to see the GPU being used by running "nvidia-smi" from the Unraid console: I have 8 cameras, so 8 processes (and another one is Deepstack). Hope it helps. Thank you @Newbie for sharing it was successful I got a problem at first then I found a solution that could help the members Problem is video distortion : I am not an expert but I found a simple solution VLC player To get the correct dimensions for the video The solution : 1- Using the media player: VLC 2- run RTSP link ( Media >> Open Network Strem ) OR ( Ctrl + N ) 3- go to : Tools >> Codec information OR ( Ctrl + J ) Now, correct the config.yml width: 704 height: 576 ___________________________________ cameras: # Name of your camera camera1: ffmpeg: inputs: - path: rtsp://USER:[email protected]:554/cam/realmonitor?channel=1&subtype=1 roles: - detect - rtmp #- clips - path: rtsp://USER:[email protected]:554/cam/realmonitor?channel=1&subtype=0 roles: - clips width: 704 height: 576 fps: 15 ___________________________________ Now all cameras are working fine 👍 If you see that my config are incorrect please inform me my config: ffmpeg: hwaccel_args: - -hwaccel - cuda - -c:v - h264_cuvid input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -c:v h264_cuvid #input_args: [] output_args: # Optional: output args for detect streams (default: shown below) detect: -f rawvideo -pix_fmt yuv420p -filter:v fps=fps=5 # Optional: output args for record streams (default: shown below) record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an # Optional: output args for clips streams (default: shown below) clips: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an # Optional: output args for rtmp streams (default: shown below) #rtmp: -c copy -f flv rtmp: -c copy -map 0 -f flv mqtt: host: 192.168.1.XX port: 1883 topic_prefix: frigate client_id: frigate user: XXXX password: XXXXXX stats_interval: 60 cameras: # Name of your camera camera1: ffmpeg: inputs: - path: rtsp://USER:[email protected]:554/cam/realmonitor?channel=1&subtype=1 roles: - detect - rtmp #- clips - path: rtsp://USER:[email protected]:554/cam/realmonitor?channel=1&subtype=0 roles: - clips width: 704 height: 576 fps: 15 objects: track: - person - cat - dog - car filters: person: #min_area: 5000 #max_area: 100000 #min_score: 0.6 threshold: 0.7 detectors: cpu1: type: cpu cpu2: type: cpu Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.