I've created a basic PowerShell script for extracting JPG images from ANY Blue Iris DAT file.
This includes the Database DAT files, as well as the more familiar AI DAT files.
Actually, this script will extract JPG images from any binary file.
My purpose for this script is mainly educational. I've created other utilities that process images from the AI DAT file.
Output and Features:
Here's a screenshot of the Help menu...
Here are some typical commands...
To inspect AI DAT files, replace the
By default, the JPG images are extracted to folder
The destination folder is user-configurable using the
The JPG filenames are like
The screenshots below illustrate typical output...
Caveats:
1. You cannot specify the alert/clip to extract a specific JPG from the BI Database clips.dat file. For that you should use HTTP commands below.
2. The script will not directly use active BI database files; they are ALWAYS copied to the script's working folder before use.
3. The script can take awhile to interrogate the BI Database clips.dat file; you should see a progress indicator that it's working.
HTTP interface commands for getting specific JPGs from the BI Database clips.dat file
Specific Blue Iris database thumbnail images can be user-accessed via the following HTTP interface commands
I prefer the 2nd command. The easy way to get and use a database
When you do this, the @record is loaded to the Windows clipboard, ready to paste into the HTTP command.
Download:
To use this script, simply extract the 'BI_dat_img_extract.ps1' file from the attached zip file to your desktop, or scripts folder.
Run the script from a PowerShell window.
The script can also be executed from cmd.exe using a command like
This includes the Database DAT files, as well as the more familiar AI DAT files.
Actually, this script will extract JPG images from any binary file.
My purpose for this script is mainly educational. I've created other utilities that process images from the AI DAT file.
Output and Features:
Here's a screenshot of the Help menu...
Here are some typical commands...
BI_dat_img_extract.ps1 -SourceFile 'C:\BlueIris\db\clips.dat'
... counts the embedded JPG imagesBI_dat_img_extract.ps1 -SourceFile 'C:\BlueIris\db\clips.dat' -Extract
... first image onlyBI_dat_img_extract.ps1 -SourceFile 'C:\BlueIris\db\clips.dat' -Extract -Range 1,10
... first 10 imagesBI_dat_img_extract.ps1 -SourceFile 'C:\BlueIris\db\clips.dat' -Extract -Range 10
... dittoBI_dat_img_extract.ps1 -SourceFile 'C:\BlueIris\db\clips.dat' -Extract -Range -10
... last 10 imagesBI_dat_img_extract.ps1 -SourceFile 'C:\BlueIris\db\clips.dat' -Extract -Range 0
... all imagesTo inspect AI DAT files, replace the
-SourceFile
value to something like 'D:\BlueIris\Alerts\DW2.20250124_150000.2814048.5-0.dat'
.By default, the JPG images are extracted to folder
C:\temp\BI_dat_img_extract\extracted_jpgs
.The destination folder is user-configurable using the
-DestPath
argument.The JPG filenames are like
01.0000005F.jpg
, where the first value is image number and the second value is the hexadecimal offset of the start of the JPG image in the binary file.The screenshots below illustrate typical output...
Caveats:
1. You cannot specify the alert/clip to extract a specific JPG from the BI Database clips.dat file. For that you should use HTTP commands below.
2. The script will not directly use active BI database files; they are ALWAYS copied to the script's working folder before use.
3. The script can take awhile to interrogate the BI Database clips.dat file; you should see a progress indicator that it's working.
HTTP interface commands for getting specific JPGs from the BI Database clips.dat file
Specific Blue Iris database thumbnail images can be user-accessed via the following HTTP interface commands
http:\\webserver_address_and_port\thumbs\{filename}
http:\\webserver_address_and_port \thumbs\{@record}
I prefer the 2nd command. The easy way to get and use a database
@record
is to ctrl-right-click an item in the BI Windows app clips list (more here).When you do this, the @record is loaded to the Windows clipboard, ready to paste into the HTTP command.
Download:
To use this script, simply extract the 'BI_dat_img_extract.ps1' file from the attached zip file to your desktop, or scripts folder.
Run the script from a PowerShell window.
The script can also be executed from cmd.exe using a command like
powershell.exe "C:\ps_scripts\BI_dat_img_extract.ps1"
Attachments
Last edited: