Would like some help adding external overlay to camera

hi all coming back to this thread with the different question/issue. I wonder if I can backup/save the alerts with memos? So here is the story, I have the system working flawlessly and creating the alerts with memos as i wanted. Then the system's DB grew to a point where it started to show warning and then to hefty 500,000 +. Mind that that got nothing to do with my alerts and memos and i readjusted the settings to not to let the DB grow that much, but I had to delete the DB. So I saved the 'view.memos.dat' file and then injected it in the DB folder after the regeneration was done. Of course I did not see the expected month-worth of memos. Is there a way to save memos if you are about to delete the DB? My setup is currently for a specific cameras to only create alert in DB and not even saving the image.
I'm doubtful that the view.memo.dat file contains actual database memos. You can confirm this if you open the file in a hex viewer, like HxD,

I've not studied this myself, or asked Ken, but I suspect that the view.memo.dat file probably contains the current list of db_records that have a memo. and is used to quickly display the memo filter view in the application's clips list. Likewise the for all the other view.x.dat files... To validate this theory, I just did an experiment where I executed a DB Compact/Reindex action, then watched the timestamp of every view.*.dat file update to the current time.

My understanding is that the only way to recover protected alerts with their memos is to set the Protect flag AND for the alert to also have a JPG file.

When an alert's memo is changed/updated, Blue Iris injects the memo text into the JPG's Exif metadata. You can verify this by inspecting the JPG's properties in File Explorer (right-click > Properties > Details tab > 'Title' field).

When an alert is protected, Blue Iris sets the read-only attribute of the JPG file.

Then, when the DB is regenerated:
  1. Every found read-only JPG file is used to recreate a DB protected Alert entry.
  2. The new entry's image is created from the read-only JPG.
  3. The new entry's memo is obtained by interrogating the Exif data in the read-only JPG ('Title' field).
  4. The new entry's flags, zones, etc. are obtained by interrogating the Exif data in the read-only JPG ('Comments' field).
To help recover Alerts with their memos, etc. I've created a Powershell script create the required read-only JPGs for all Protected Alerts that lack one.
You can check it out here bi_alert_protect.
 
Last edited:
  • Like
Reactions: looney2ns
Thanks @jaydeel , so will this work:

Option to save alerts with memos in case you need to delete the DB, reinstall BI, etc.
  • change settings to 'add to DB, create hi-res JPEG'
  • auto flag alerts(may not be necessary)
  • set alerts folder to 1GB and to move them to another folder on a separate storage(ideally where the main footage is) with the limit of x-amount of GB)
  • when needed execute DB delete, OS reinstall, BI reinstall, etc.
  • restore backup
  • regenerate DB
  • Alerts then should be all intact and still have their memos
I will give it a quick test. Also, is there a native settings to 'auto-flag' alerts and without creating scripts for that?
 
feedback: steps I listed above did not work. Alerts are there after DB regen, but memos are gone. @jaydeel I will experiment with your script tomorrow.
 
Thanks @jaydeel , so will this work:

Option to save alerts with memos in case you need to delete the DB, reinstall BI, etc.
  • change settings to 'add to DB, create hi-res JPEG'
  • auto flag alerts(may not be necessary)
  • set alerts folder to 1GB and to move them to another folder on a separate storage(ideally where the main footage is) with the limit of x-amount of GB)
  • when needed execute DB delete, OS reinstall, BI reinstall, etc.
  • restore backup
  • regenerate DB
  • Alerts then should be all intact and still have their memos
I will give it a quick test. Also, is there a native settings to 'auto-flag' alerts and without creating scripts for that?
Sorry, I was away most of the day. I did not see this question before you tested.

My comments (in italics)...
  • change settings to 'add to DB, create hi-res JPEG' ... just in case there's a misunderstanding, making this change will affect only new alerts; it will not cause BI to create JPG files for existing alerts. My script will create JPGs for existing alerts if you set their Protect flag
  • auto flag alerts(may not be necessary) ... not necessary
is there a native settings to 'auto-flag' alerts and without creating scripts for that? ... you can batch-flag Alerts from the clips list; simply control click multiple items (or to select the entre list, hit Shift-Ctrl-End on the topmost item). Then right-click on one of the selections to set the desired flag for the entire selection.
 
no worries at all @jaydeel, and thank you for your feedback. I did more poking around and found the solution. I have a special case here you see, i need to keep memos for up to 3 months so at any point I can go to 'search' and type in the memo text and that will populate alerts with tat memo. It works well and only problem is if I have to delete DB then I loose all memos for 3 months! So that is why i was looking for the way to save them somehow before doing anything to BI DB. So, in my case I did not want to try and manual-select 'ctrl+a' 3 month worth of alerts. My setup currently is - alerts folder 1GB>then after space limit is reached>move to different drive folder with 100GB quota. What did work for me. Steps are below:
  1. before destroying DB, reinstall OS, BI, etc. > go to BD folder and copy clips.dat
  2. delete DB folder, or reinstall BI, reinstall OS, what not..
  3. open BI and restore backup(if needed)
  4. stop BI service
  5. copy clips.dat into the newly created DB folder
  6. start BI and regenerate DB
After that I was able to see all my alerts with memos in the separate folder where I moved them before destroying the DB.
 
no worries at all @jaydeel, and thank you for your feedback. I did more poking around and found the solution. I have a special case here you see, i need to keep memos for up to 3 months so at any point I can go to 'search' and type in the memo text and that will populate alerts with tat memo. It works well and only problem is if I have to delete DB then I loose all memos for 3 months! So that is why i was looking for the way to save them somehow before doing anything to BI DB. So, in my case I did not want to try and manual-select 'ctrl+a' 3 month worth of alerts. My setup currently is - alerts folder 1GB>then after space limit is reached>move to different drive folder with 100GB quota. What did work for me. Steps are below:
  1. before destroying DB, reinstall OS, BI, etc. > go to BD folder and copy clips.dat
  2. delete DB folder, or reinstall BI, reinstall OS, what not..
  3. open BI and restore backup(if needed)
  4. stop BI service
  5. copy clips.dat into the newly created DB folder
  6. start BI and regenerate DB
After that I was able to see all my alerts with memos in the separate folder where I moved them before destroying the DB.
I'm glad you found a solution.

Can you provide a bit more detail about moving your Alerts to a different drive folder with 100GB quota? (I thought I understood that you were not saving hi-res JPGs, so this is a little confusing to me)... Are you selecting the Alerts in the clips list and using the right-click context menu 'Move' option to send them to another Blue Iris managed storage folder (Aux N)?

Also curious about the final bullet. I assume this means you're manually performing a DB Reapir/Regenerate - is this correct? If so, have you experimented with simply doing a DB Compact/Reindex instead of a Regenerate?
 
Here is the brake down of what I have:
  • Can you provide a bit more detail about moving your Alerts to a different drive folder with 100GB quota? - I have selected 5 cameras that are set to receive external API hits that generate specific ALERTS with the specific MEMOS. It is set under ALERTS tab as 'add to DB, create hi-res JPEG'
  • I have SSD drive that hosts the OS and BI. I multiple DATA drives to store footage. Alerts come into SSD ALERT folder only from those 5 cameras and is default sized to 1GB
  • Are you selecting the Alerts in the clips list and using the right-click context menu 'Move' option to send them to another Blue Iris managed storage folder (Aux N)? - after 1GB limit is reached ALERTS are moved to the other folder residing on DATA drives and is sixed to 100GB to make sure I get months of alerts in it for review. Typically I require minimum 3 months so 100GB is plenty
  • Also curious about the final bullet. I assume this means you're manually performing a DB Reapir/Regenerate - is this correct? If so, have you experimented with simply doing a DB Compact/Reindex instead of a Regenerate? - Yes, had to do DB Reapir/Regenerate manually after install or DB destruction. DB Compact/Reindex did not work
 
Can you provide a bit more detail about moving your Alerts to a different drive folder with 100GB quota? - I have selected 5 cameras that are set to receive external API hits that generate specific ALERTS with the specific MEMOS. It is set under ALERTS tab as 'add to DB, create hi-res JPEG'

Do you mean this on each camera?
'Add to the alerts list' > 'Hi-res JPEG files'

1740163439897.png


Are you selecting the Alerts in the clips list and using the right-click context menu 'Move' option to send them to another Blue Iris managed storage folder (Aux N)? - after 1GB limit is reached ALERTS are moved to the other folder residing on DATA drives and is sixed to 100GB to make sure I get months of alerts in it for review. Typically I require minimum 3 months so 100GB is plenty
Do you mean something like this?
All BI managed folders?

1740163510928.png


1740163570726.png
 
Also, since you are using the API to create Alerts with memos, can you check a few of the JPG files in the Alerts folder and confirm that the Exif metadata contains the expected memo text?

If you need a refresher, see post #10.
 
Yes to all of your snapshots, with exception to AI confirmation. I don't do AI confirm. Metadata exists
1740175527416.png
 
Yes it does. Also in my case all I care about is the memo baked into the alert below 216-R-2806058_K. I attached 2 pics one from the BI directly and one from the UI3
 

Attachments

  • 1740240913558.png
    1740240913558.png
    35.2 KB · Views: 0
  • 1740241106141.png
    1740241106141.png
    14.8 KB · Views: 0
Last edited:
Yes it does. Also in my case all I care about is the memo baked into the alert below 216-R-2806058_K. I attached 2 pics one from the BI directly and one from the UI3
Thx.

I think this might be a bug (HTTP command not updating the JPG Exif metadata). I'll experiment. If I can confirm, I'll email Ken and ask.
 
I've confirmed that the memo text is missing from the hi-res JPG's Exif metadata. I've just emailed Ken to inquire if this is a bug.
 
Last edited:
  • Like
Reactions: looney2ns
I've confirmed that 5.9.9.28 now updates the JPG's Exif metadata when you use an HTTP interface command like the following:
/admin?camera=FD&trigger&memo=my%20text

under the following conditions:
Camera settings:​
Alert tab > Add to the alerts list > Hi-res JPEG files​
Alert tab > Confirm the alert with AI unchecked​

Results:
  • External alert created in the clips list
  • Alert JPG created in the Alerts folder.
  • JPG’s Exif metadata now contains the memo text.