Current Version: v1.1.0 (JSON-driven)
AE_AnsysBBoxViewer is an After Effects script that visualizes Python-based video analysis results using bounding boxes imported from JSON files.
It is designed for workflows where object detection or tracking is performed in Python, and the results are reviewed and refined visually inside After Effects.
ae/legacy/AE_AnsysBBoxViewer_v1.0.0.jsx is provided as a minimal, non-JSON example for reference and learning purposes.
The easiest way to generate JSON files is to use Google Colab.
No local Python environment setup is required.
Workflow:
- Run the Google Colab notebook
- Upload an MP4 file
- Download the generated JSON file
- Run AE_AnsysBBoxViewer.jsx
- Select the JSON and MP4 files
- Bounding boxes are automatically visualized in After Effects
👉 Run on Google Colab: https://colab.research.google.com/github/nameshigawa/AE_AnsysBBoxViewer/blob/main/python/colab/ansys_video_colab.ipynb
Run the script, select an MP4 file, and the JSON file will be downloaded automatically.
- Visualize bounding boxes from Python-generated JSON data
- Frame-accurate playback synchronized with composition FPS
- Support for multiple bounding boxes using layer name IDs (
BBox_0,BBox_1, …) - Automatic hiding of bounding boxes when no data exists
- Language-independent expressions (compatible with all After Effects UI languages)
- Run
AE_AnsysBBoxViewer.jsx. - Select the JSON and MP4 files
- In the Controller layer, assign the JSON file using
JSON_Footage. - Duplicate the BBox shape layer and rename it with an ID number
(BBox_0,BBox_1,BBox_2, …) to display multiple bounding boxes.
💡 The number in the layer name corresponds to the
idfield in the JSON data.
The script expects the following JSON structure:
[
[
{
"id": 0,
"x": 398,
"y": 611,
"width": 62,
"height": 108,
"label": "person",
"conf": 0.52
}
]
]- The top-level array represents frames in time order.
- Bounding boxes are indexed per frame starting from 0.
- Shape layer names must include a zero-based numeric ID
that matches the
idfield (e.g. Box_0, Box_1). - If no bounding box exists for a given ID in a frame, the corresponding shape layer will be hidden automatically.
- Additional fields such as tracking IDs or custom metadata can be included and will be ignored by the viewer if not used.
id: Zero-based bounding-box identifierx,y: Top-left position of the bounding boxwidth: Width of the bounding boxheight: Height of the bounding boxlabel: Class label (e.g. "person")conf: Detection confidence (0.0 – 1.0)
Sample files are provided in the samples/ directory.
-
sample.mp4
A short sample video used for object detection. -
sample_bbox.json
Bounding box data generated from the sample video.
You can use these files to quickly test AE_AnsysBBoxViewer without running the Python analysis.
-
v1.2.0: Advanced bounding-box control
- Automatic shape layer duplication by ID
- Label-based color coding
- Confidence threshold and visibility control
-
v2.0.0: Annotation overlay
- Label and confidence text display
- Text layers following bounding boxes
- UI-style visualization
