This pipeline prepares workplace video for sharing. It blurs people’s faces and personal details visible in the frame, mutes spoken identifiers, and masks those words in captions.
The staged support recording shows the same clip before and after redaction, using a synthetic portrait, contact details, and voice. The four workplace recordings show reviewed exports from fixed factory footage, a handheld construction clip, a site interview, and a field software recording. Turn on sound to compare the original callback number with the muted interval in the staged recording. See the gallery.
Staged support recording
Fixed and handheld cameras
Interview and software recordings
Play the staged recording before and after redaction. The four workplace recordings show the reviewed exports.
llm step. Editframe enables pipelines and llm steps for an organization after you tell us about your footage.What it produces
- Faces and speech. The built-in PII detector uses OpenCV YuNet to detect faces across sampled frames and a quantized DistilBERT model from Hugging Face to identify names in the transcript. Editframe tracks each face over time and also marks spoken email addresses and phone numbers. YuNet weights · DistilBERT model.
- On-screen text. Gemini inspects sampled frames for personal details in form fields, titles, badges, and labels. It returns timed boxes around the values so the surrounding text stays visible.
- Reviewed media. After approval, the render applies the visual blurs, mutes the marked audio, and masks the matching words in burned-in captions. The output is a separate MP4 in the organization.
The pipeline
The frames and transcript are prepared in parallel. Screen-text detection uses only sampled images and video metadata. A reviewer can correct the three kinds of annotations before they reach the renderer.
probe
Reads the recording’s duration, frame size, and tracks.
{ "probe": { "type": "probe" } }frames
Takes a frame every quarter-second.
{
"frames": { "type": "sample_frames", "needs": ["probe"], "with": { "every_ms": 250 } }
}transcript
Transcribes the narration and records when each word is spoken.
{
"transcript": {
"type": "transcribe",
"needs": ["probe"],
"with": { "language": "en" }
}
}face_and_speech
Detects faces with OpenCV YuNet and finds spoken names with DistilBERT from Hugging Face. The step also marks spoken email addresses and phone numbers.
{
"face_and_speech": {
"type": "detect_pii",
"needs": ["frames", "transcript"],
"with": { "faces": "all", "speech": ["person", "email", "phone"] }
}
}screen_text
Finds visible personal details in form fields, titles, badges, and labels and returns timed boxes around the values.
{
"screen_text": {
"type": "llm",
"needs": ["frames", "probe"],
"with": {
"provider": "google",
"model": "gemini-4-carbon",
"include": ["probe"],
"max_frames": 16,
"instructions": "…",
"output": { "mode": "json", "schema": "…" }
}
}
}Instructions of screen_text
Find visible names, email addresses and phone numbers in the recording. Look at screen fields,
on-screen titles, name badges and labels. Ignore generic labels, interface controls, charts and
faces. Return one pii.screen_text annotation per sensitive value and continuous visibility
interval. Inspect the sampled frames and their t_ms to find the intervals. Use start_ms 0 and
the input duration as end_ms for values visible throughout. Give each box enough padding to
cover the whole sensitive value, including punctuation, and keep the field label visible.
Keyframe boxes use x, y, w and h as fractions of the full frame, measured from the top left. Use
at least one box per region, with another keyframe when it moves. Use generic labels like Email
address. Do not transcribe or echo the value. Return an empty regions array if nothing
qualifies.Output schema of screen_text
{
"type": "object",
"properties": {
"regions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": { "type": "string", "enum": ["pii.screen_text"] },
"label": { "type": "string" },
"start_ms": { "type": "integer", "minimum": 0 },
"end_ms": { "type": "integer", "minimum": 0 },
"keyframes": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"t_ms": { "type": "integer", "minimum": 0 },
"x": { "type": "number", "minimum": 0, "maximum": 1 },
"y": { "type": "number", "minimum": 0, "maximum": 1 },
"w": { "type": "number", "minimum": 0, "maximum": 1 },
"h": { "type": "number", "minimum": 0, "maximum": 1 }
},
"required": ["t_ms", "x", "y", "w", "h"]
}
}
},
"required": ["kind", "label", "start_ms", "end_ms", "keyframes"]
}
}
},
"required": ["regions"]
}review
Holds the proposed masks and mute ranges for a reviewer to correct and approve.
{
"review": {
"type": "review",
"needs": ["face_and_speech", "screen_text"],
"with": {
"instructions": "Check the recording against the proposed masks and mute ranges. Add any missed detail and adjust coverage before approving. For each kind you correct, include every annotation of that kind that should be rendered. Reject if you cannot verify coverage.",
"expires_after_ms": 86400000,
"on_expiry": "reject"
}
}
}redact
Applies the reviewed blurs and audio mutes, then masks the matching words in captions.
{
"redact": {
"type": "redact_render",
"needs": ["review"],
"with": { "kinds": ["pii.face", "pii.screen_text", "pii.speech"], "captions": true }
}
}Run it
From the repository root, run the example with an API key in EDITFRAME_TOKEN. The runner leaves the review pending.
node elements/examples/scripts/run-example.mjs pii-redaction --review waitOpen the pending review and compare the proposed boxes and mute ranges against the source. Add missed details and adjust boxes and timings as needed. When you submit corrections for a kind, include every annotation of that kind you want to keep. Reject the review if you cannot verify coverage. Rejection and expiry skip the render.
In the staged recording, the face and both form values are visible throughout. The callback number starts around 00:06 and ends just after 00:10. The screen boxes were adjusted in review to cover the full values.
After approval, inspect the exported video, audio, and captions before sharing it. Use redact.metadata.output_file_id to identify the rendered copy. Share only the reviewed MP4.
Run the workplace recordings
Fetch the originals and their verified local paths with node elements/examples/scripts/fetch-sources.mjs --slug pii-redaction. Use pipeline_id from the example runner’s summary.json as PIPELINE_ID and the path to your prepared MP4 as CLIP_MP4.
| Recording | Input used here |
|---|---|
| Fixed factory camera | Full 7-second walkway clip from a pinned Hugging Face dataset |
| Handheld construction camera | Full 5-second WebM, converted to MP4 |
| Construction-site interview | 00:48–01:05 of the original |
| Field software recording | 00:06–00:26 of the original |
npx editframe pipelines upload "$CLIP_MP4" --run "$PIPELINE_ID"Review the faces as they enter, turn, and move out of frame. Check on-screen names in the interview and software recording and listen to the spoken introductions. Check the audio and captions again in the rendered copy.
Licences
- Editframe · Staged support walkthrough · Editframe terms · Staged interface and AI-generated portrait. All contact details are fictional.
- Bryce Beattie · Piper Kristin voice · MIT
- Oğuzhan Önal and Emre Dandıl · Factory walkway, clip 4_te12 · CC BY 4.0 · Redacted by Editframe. Used the safe-walkway clip from the authors’ factory camera dataset.
- Akum20 · Men at work in building site · CC0 1.0 · Converted to MP4 and redacted by Editframe.
- Trevor Welsh, U.S. Army Corps of Engineers · Q & A with Fort Bliss Replacement Hospital Construction Manager · Public domain and DVIDS reuse terms · Excerpted and redacted by Editframe. The appearance of U.S. Department of War (DoW) visual information does not imply or constitute DoW endorsement.
- U.S. Geological Survey · Collecting Manual Verticals in TRDI SxS Pro · USGS public domain · Excerpted and redacted by Editframe.