Web UI Usage Guide
This guide covers how to install, run, and use the Video Analyzer Web UI.
Prerequisites
- Python 3.8 or higher.
- The
video-analyzer
package must be installed and accessible in your environment. - FFmpeg must be installed on the system where the server is running.
Installation
Navigate to the root directory of the repository and install the UI package using pip:
# From the project root
pip install ./video-analyzer-ui
# Or, for development
pip install -e ./video-analyzer-ui
This will install the UI and its dependencies, including Flask. It also sets up the video-analyzer-ui
command.
Running the Server
You can run the server in two modes: development and production.
Development Mode
This mode is ideal for local use and development. It enables auto-reloading when code changes and provides detailed debug output.
video-analyzer-ui --dev
By default, the server will be accessible at http://localhost:5000
.
Production Mode
For broader access (e.g., within a local network), you can run the server bound to all network interfaces.
video-analyzer-ui --host 0.0.0.0 --port 5000
Command-Line Options
Option | Description | Default |
---|---|---|
--dev |
Enable development mode with auto-reload. | False |
--host |
The host address to bind the server to. | localhost |
--port |
The port number to listen on. | 5000 |
--log-file |
Path to a file for logging output. | None |
Using the Interface
-
Open in Browser: Navigate to the server's address (e.g.,
http://localhost:5000
). -
Upload a Video: Drag and drop a video file (
.mp4
,.avi
,.mov
,.mkv
) onto the upload area, or click to open a file selection dialog. -
Configure Analysis: Once uploaded, the configuration form will appear.
- Select your desired client (
Ollama
orOpenAI API
). - Fill in the required fields for your chosen client (e.g., API Key for OpenAI).
- Adjust other parameters like the Whisper model, max frames, or add a custom prompt.
- The Command Preview box will update in real-time to show the command that will be executed.
- Select your desired client (
-
Start Analysis: Click the "Start Analysis" button.
-
Monitor Progress: The view will switch to the output section. The raw output from the
video-analyzer
command will be streamed to the page, so you can monitor its progress. -
Download Results: When the analysis completes successfully, a "Download Results" button will appear. Click it to save the
analysis.json
file. -
New Analysis: Click the "New Analysis" button to reset the interface and start over with a new video. This will also clean up the files from the previous session on the server.