Interactive segment browser
A static, in-browser tool that ranks every stimulus segment by any combination of
annotation features and plays the matching moment. It reads a precomputed index
(analysis/web/segments.json) and runs entirely client-side — no server logic.
Pick any set of features, toggle each High or Low, and segments are ranked by their mean z-score across the chosen features (with a features-covered count when a segment lacks some channels). Interpretable vector channels are expanded per component, so — for example — EmoNet’s 20 emotion categories and the eight facial expressions are individually searchable. Rankings are face-valid: high optical flow surfaces action scenes, high word-rate the dialogue clips, EmoNet “Aesthetic Appreciation” the beach-sunset clips.
Playback & media. The ranking interface works anywhere. Actually playing a clip needs the source media served from the same origin — so playback works when you serve the project locally, but not on the public GitHub Pages site, where the licensed media are not hosted. To use it fully, serve the repository root with
python3 tools/serve.py(a small Range-capable server, so video seeking works — the built-inpython -m http.servercannot seek) and openanalysis/web/index.html.
Notes from the app README
Interactive browser tool to rank movie/story segments by any combination of computational annotations and play the matching moment.
Launch
Serve from the project root with the bundled server, then open the page:
cd <project-root>
python3 tools/serve.py # http://localhost:8000 (pass a port to change it)
# then open: http://localhost:8000/analysis/web/index.html
Use tools/serve.py, not python -m http.server: the built-in server ignores HTTP
Range requests, so <video> cannot seek — the scrub bar and “play segment” won’t
jump. tools/serve.py adds byte-range support so seeking works. Serving from the root is
also what lets the player load videos from /data/movies/...; opening index.html via
file:// shows rankings but cannot play clips.
Use
- Filter/scroll the feature list (grouped by class); tick features to search on.
- Toggle each picked feature High / Low.
- Optionally filter by source and choose how many results to show.
- Segments are ranked by the mean z-score of the selected features. Each result has ▶ Segment (seeks to its start, auto-stops at its end) and ▶ Clip (plays the whole stimulus); the player repeats these for the loaded segment.
- Selected features are plotted as a time series over the whole clip, with a marker that tracks playback. Click the plot to jump the video to that time; the video scrub bar works too.
Rebuild the index
segments.json is generated from the annotated corpus. Regenerate after annotating
more stimuli (or to change the window length):
PYTHONPATH=src .venv/bin/python tools/build_search_index.py --seglen 5