Shrike Media Server is a companion for the Lowkey Media Viewer. It allows for managing long-running offline tasks like media tagging, transcript generation, media conversion, file serving, and media ingestion.
- Features
- System Requirements
- Installation (End Users)
- Development Setup
- Configuration
- Usage
- Available Tasks
- API Documentation
- Chrome Extension
- License
- Job Queue Management: Create, monitor, cancel, and manage long-running media processing jobs
- Media Browser: Browse, search, and preview media files with a modern web interface
- Auto-Tagging: Automatic image tagging using ONNX-based machine learning models (WD Tagger)
- LLM Descriptions: Generate image descriptions using Ollama vision models
- Transcription: Generate video transcripts using Faster Whisper
- Media Processing: FFmpeg integration for media conversion and manipulation
- Media Ingestion: Batch import media files into the database
- Real-Time Updates: Server-Sent Events (SSE) for live job status updates
- System Tray: Windows system tray integration for easy access
- Database Persistence: SQLite-backed job and media database
- Operating System: Windows 10/11 (x64)
- Disk Space: ~500MB for binaries and embedded tools
- RAM: 4GB minimum, 8GB+ recommended for ML tagging
-
Run the shrike.exe binary. This will start the background server and create an icon in your Windows system tray for launching the WebUI.
-
Check Lowkey Database Path. Open the Config tab in the Web UI. You should see the path to your Lowkey Media Database. If it's incorrect, you can manually change it here.
-
Set Up Model Paths. You'll need to point the server at a few files to enable auto tagging:
- Download Model Files for AutoTagger
- Install Ollama for LLM-based description generation
- Download Faster Whisper for Video Transcription
Shrike requires Go 1.24.0 or later.
Windows (Recommended):
- Download the latest Go installer from https://go.dev/dl/
- Run the MSI installer
- Verify installation:
go version # Should output: go version go1.24.x windows/amd64
Alternative (using winget):
winget install GoLang.GoAlternative (using Chocolatey):
choco install golangRequired for cloning the repository and Go module management.
winget install Git.GitThe SQLite package (modernc.org/sqlite) is a pure Go implementation and does not require CGO. No C compiler is needed.
For full functionality, install these optional tools:
| Tool | Purpose | Installation |
|---|---|---|
| Ollama | LLM-based image descriptions | Download and run installer |
| ONNX Runtime | ML model inference for auto-tagging | Download DLL, configure path in settings |
| Faster Whisper | Video transcription | Download, configure path in settings |
Note: FFmpeg, yt-dlp, gallery-dl, and ExifTool are embedded in the binary and extracted at runtime.
git clone https://github.com/stevecastle/shrike.git
cd shrikego mod downloadgo mod verify# Standard build
go build -o shrike.exe .
# Build with optimizations (smaller binary, no debug info)
go build -ldflags="-s -w" -o shrike.exe ..\shrike.exeThe server will start on http://localhost:8090 and a system tray icon will appear.
For faster iteration during development, you can use go run:
go run .# Run all tests
go test ./...
# Run tests with verbose output
go test -v ./...
# Run tests for a specific package
go test -v ./media/...shrike/
├── main.go # Application entry point, HTTP handlers, system tray
├── go.mod # Go module definition
├── go.sum # Dependency checksums
│
├── appconfig/ # Application configuration management
│ └── config.go # Config loading/saving, defaults
│
├── assets/ # Static assets
│ └── logo.ico # System tray icon
│
├── client/ # Frontend static files
│ └── static/
│ ├── styles.css # Main stylesheet
│ └── details.css # Job details page styles
│
├── embedexec/ # Embedded executable extraction
│ ├── embedexec.go # Runtime extraction of embedded binaries
│ └── bin/ # Embedded executables (see below)
│
├── jobqueue/ # Job queue implementation
│ └── jobqueue.go # Queue, job state, persistence
│
├── media/ # Media database operations
│ ├── media.go # Media queries, search, pagination
│ └── media_test.go # Media tests
│
├── onnxtag/ # ONNX-based image tagging
│ ├── onnxtag.go # Tagger implementation
│ └── config.go # Tagger configuration
│
├── renderer/ # HTML template rendering
│ ├── renderer.go # Template loading, middleware
│ └── templates/ # Go HTML templates
│ ├── index.go.html # Home page
│ ├── jobs.go.html # Jobs list
│ ├── detail.go.html # Job detail view
│ ├── media.go.html # Media browser
│ ├── config.go.html # Configuration page
│ └── ...
│
├── runners/ # Job execution runners
│ └── runners.go # Worker pool implementation
│
├── stream/ # Server-Sent Events (SSE)
│ └── stream.go # Real-time update streaming
│
├── tasks/ # Task implementations
│ ├── registry.go # Task registration
│ ├── autotag.go # ONNX auto-tagging
│ ├── autotag_vision.go # LLM vision tagging
│ ├── command.go # Generic command execution
│ ├── ffmpeg.go # FFmpeg processing
│ ├── media_ingest.go # Media file ingestion
│ ├── media_metadata.go # Metadata generation
│ ├── media_move.go # File moving with DB update
│ ├── media_cleanup.go # Orphan cleanup
│ └── ...
│
├── chrome-extension/ # Browser extension for sending URLs
│ ├── manifest.json
│ ├── popup.html
│ ├── popup.js
│ └── popup.css
│
├── cmd/ # Additional command-line tools
│ ├── onnxtag/ # Standalone ONNX tagger CLI
│ ├── dbcopy/ # Database copy utility
│ └── sbs/ # Side-by-side comparison tool
│
├── API_DOCUMENTATION.md # Detailed API reference
└── README.md # This file
Shrike embeds several third-party executables that are extracted to %ProgramData%\Shrike\tmp\ at runtime:
| Binary | Purpose |
|---|---|
ffmpeg.exe |
Media conversion and processing |
ffprobe.exe |
Media file analysis |
ffplay.exe |
Media playback |
yt-dlp.exe |
Video downloading |
gallery-dl.exe |
Image gallery downloading |
exiftool.exe |
Metadata extraction |
faster-whisper-xxl.exe |
Video transcription (optional) |
dedupe.exe |
Duplicate detection |
createdump.exe |
Crash dump creation |
The embedded binaries are located in embedexec/bin/. To update them:
- Download the new binary
- Replace the file in
embedexec/bin/ - Rebuild the project
Note: Including these binaries significantly increases the final executable size (~200MB+).
Configuration is stored at: %APPDATA%\Lowkey Media Viewer\config.json
{
"dbPath": "C:\\path\\to\\your\\database.db",
"ollamaBaseUrl": "http://localhost:11434",
"ollamaModel": "llama3.2-vision",
"describePrompt": "Please describe this image...",
"autotagPrompt": "Please analyze this image and select tags...",
"onnxTagger": {
"modelPath": "C:\\path\\to\\model.onnx",
"labelsPath": "C:\\path\\to\\selected_tags.csv",
"configPath": "C:\\path\\to\\config.json",
"ortSharedLibraryPath": "C:\\path\\to\\onnxruntime.dll",
"generalThreshold": 0.35,
"characterThreshold": 0.85
},
"fasterWhisperPath": "C:\\path\\to\\faster-whisper-xxl.exe"
}-
Download model files from HuggingFace:
model.onnx- The neural network modelselected_tags.csv- Tag labelsconfig.json- Model configuration (optional)
-
Download ONNX Runtime:
- Get
onnxruntime-win-x64-*.zip - Extract
onnxruntime.dllfromlib/folder
- Get
-
Configure paths in the Shrike Config tab
Once the server is installed, Lowkey Media Viewer should detect it and be able to create jobs. You can also create bulk jobs on the results of any search from the Media Browser tab.
Access the web interface at: http://localhost:8090
- Home: Quick job creation
- Jobs: View and manage all jobs
- Media: Browse and search media files
- Config: Configure server settings
- Stats: View database statistics
Right-click the Shrike icon in the system tray:
- Open Web UI: Launch browser to web interface
- Quit: Shutdown the server
| Task ID | Name | Description |
|---|---|---|
wait |
Wait | Test task that waits 5 seconds |
gallery-dl |
gallery-dl | Download media from websites |
yt-dlp |
yt-dlp | Download videos from YouTube, etc. |
ffmpeg |
ffmpeg | Process media files |
ingest |
Ingest Media Files | Scan directories and add to database |
metadata |
Generate Metadata | Generate descriptions, hashes, dimensions |
autotag |
Auto Tag (ONNX) | Automatic image tagging with ML |
move |
Move Media Files | Move files and update database |
remove |
Remove Media | Remove entries from database |
cleanup |
CleanUp | Remove orphaned database entries |
See API_DOCUMENTATION.md for detailed HTTP API reference including:
- Endpoint specifications
- Request/response formats
- SSE streaming events
- Example curl commands
A Chrome extension is included for quickly sending URLs to Shrike.
- Open Chrome and go to
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked"
- Select the
chrome-extension/folder
- Navigate to a page you want to download
- Click the Shrike extension icon
- Select the download method (yt-dlp, gallery-dl, etc.)
- Job is created automatically
If another application is using port 8090, you'll need to modify the port in main.go:
srv = &http.Server{
Addr: ":8090", // Change this port
Handler: mux,
}- Ensure the database path in config.json exists
- Check file permissions on the database file
- Ensure no other process has locked the database
- Verify all model files are downloaded
- Check ONNX Runtime DLL path is correct
- Ensure model is compatible (ONNX opset 11+)
- Check Windows Event Viewer for crash logs
- Check Windows notification area settings
- Ensure hidden icons are visible
- Try restarting Windows Explorer
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
go test ./... - Submit a pull request
See LICENSE for details.