Sora2Detector is a first-generation framework for multi-modal, multi-stage video analysis.
It coordinates a sequence of independent detection modules β including metadata extraction, watermark localization, audio feature analysis, and motion-based video evaluation β through a unified orchestration layer and reproducible API.
The system is designed to support research-grade reproducibility and transparent cross-modality evaluation.
Each backend operates as an isolated Python process, producing interpretable outputs that the controller aggregates into a structured summary.
This structure enables direct comparison between heterogeneous detection pipelines (e.g., classical OCR vs. CNN-based watermark detectors) without manual integration work.
Sora2Detector combines these design goals:
-
Modularity: each detector is an independent Python file with a standard interface.
-
Reproducibility: identical results from command-line or API contexts.
-
Transparency: all stdout/stderr are preserved and viewable through the web interface.
-
Scalability: easily extended to additional modalities (e.g., OCR, NLP, model fingerprinting).
Sora2Detector/
ββ api.py # FastAPI web server (upload + analysis API + static UI)
ββ controller.py # Orchestrator that runs all backend detector
ββ backend.py # Metadata analyzer
ββ backend-2.py # Watermark detector
ββ backend-3.py # Audio classifier
ββ backend-4.py # Video/motion detector
ββ static/
β ββ index.html # Simple upload UI for the browser
ββ requirements.txt # Python dependencies
ββ README.md # You are here
python -m venv .venv
# Windows
.venv\Scripts\activate
# macOS / Linux
source .venv/bin/activate
pip install -r requirements.txt
This project depends on FFmpeg for audio and video processing.
You must have ffmpeg and ffprobe accessible in your system PATH.
Option 1 β via Winget (recommended):
winget install --id Gyan.FFmpeg.Essentials -e --accept-package-agreements --accept-source-agreements
Option 2 β via Chocolatey:
choco install ffmpeg -y
Option 3 β Manual (portable):
-
Download a static build from https://www.gyan.dev/ffmpeg/builds/.
-
Unzip it somewhere (e.g.
C:\ffmpeg\bin\). -
Add that
binfolder to your PATH environment variable.
Then verify:
ffmpeg -version
ffprobe -version
sudo apt update && sudo apt install ffmpeg -y
brew install ffmpeg
After installation, rerun your detection script:
python backend-3.py "sample.mp4" --detect-audio detect_audio.py --trainer trainer.py
uvicorn api:app --reload --port 8000
Then open http://localhost:8000 in your browser.
Once running, the system serves a clean web UI where you can:
-
Upload an
.mp4file -
Wait for the backend detectors to execute
-
View concise summaries for each detector
-
Expand sections for full stdout/stderr logs
If a detector doesnβt produce any output, it automatically returns:
AI
to indicate that no explicit detection was found (useful for distinguishing βsilentβ models from βerrorsβ).
api.py handles incoming uploads via FastAPI:
-
Streams
.mp4files to a temp folder (no large in-memory buffers) -
Passes the file path to
controller.py -
Waits for all detectors to finish
-
Returns structured JSON of all results
controller.py runs each backend sequentially:
backends = [
("Metadata", "backend.py"),
("Watermark", "backend-2.py"),
("Audio", "backend-3.py"),
("Video", "backend-4.py"),
]For each backend:
-
Executes
[python backend-x.py <video>] -
Captures stdout and stderr
-
Extracts a short summary (based on JSON, keywords, or first lines)
-
Returns full output for display
Outputs answer based on whether or not it is AI
If a timeout or error occurs β a descriptive message is returned.
-
Uploads videos via
fetch('/analyze', { method: 'POST', body: FormData }) -
Renders each detectorβs result in a neat card UI with expandable logs
-
Uses no frameworks β pure HTML, CSS, and JavaScript for simplicity
Example returned by /analyze:
{
"file": "C:\\videos\\demo.mp4",
"results": {
"Metadata": {
"short": "duration=3.2s, codec=h264",
"full": "... full ffprobe output ..."
},
"Watermark": {
"short": "AI",
"full": "No visible watermark detected"
},
"Audio": {
"short": "speech: 97% confidence",
"full": "... full classifier output ..."
},
"Video": {
"short": "motion score 0.81",
"full": "... full detector output ..."
}
}
}
Edit in controller.py inside run_backend():
timeout=120 # secondsAdd a new entry in BACKENDS:
("MyNewDetector", "backend-5.py"),Ensure your script accepts a single video path as its first argument and prints or returns JSON.
Each backend should always print one summary line or JSON object at the end, e.g.:
print(json.dumps({"summary": "Watermark found (confidence 0.87)"}))If nothing is printed, the controller will automatically substitute "AI".
This is due to the fact that the output will print 'not Ai" when it isn't AI
But when it does detect AI it returns nothing
This will be fixed in the future but I was under a time constraint at my hackathon
For all intents and purposes it functions as it ought to, it just has a bandaid
You can run the controller manually (without the web server):
python controller.py path/to/video.mp4
Youβll see formatted output like:
=== Sora2Detector Combined Analysis ===
File: path/to/video.mp4
Metadata: duration=3.2s, codec=h264
Watermark: AI
Audio: speech detected
Video: motion score 0.81
=== End of Analysis ===
-
Default timeout per backend: 120 s
-
Temporary uploads are deleted automatically after processing
-
Designed for Windows / Linux / macOS (Tested only on windows with
AMD hardware, will test other options in future)
-
Works with Python β₯ 3.10 (tested on 3.12 and 3.13)
-
Accuracy is estimated to be around 95% has not been tested, could be as low as 85%
Attributtions
Data collected from
UT Austin CHuG project
the DagsHub Audio Dataset
Sora2
| Component | Description |
| -------------------- | ---------------------------------------- |
| Python 3.12+ | Core runtime |
| FastAPI | Web server for uploads and API responses |
| Uvicorn | ASGI server (hot reload) |
| HTML | Lightweight frontend |
| subprocess.run() | Isolated backend execution |
| JSON | Common exchange format |
-
More accurate AI models trained with more data
-
Fix the bug with the output of some being blank when it should say ai (high priority bugfix)
-
Have the option for batch testing
-
Have a lightweight option availible
-
Make the website function properly for hosting
-
Option to select between different video AI detection (IE sora2 vs Veo 3)
-
Create an Omni detector for a large variety of ai detectors
-
Ensure other hardware is supported (ie Intel and Nvidia)
-
Have it work on social media platforms to help seemlessly check for AI
-
Have the way I trained the AI be made open to allow other people do the same
-
Deal with potential poison pill of Sora2
Apache 2.0 license
Lee Marshall
University of Central Florida
GitHub β’ UCF CS '26
If you want to help maintain this, let me know and we can talk