Apply motion-based filtering to clips and aesthetic filtering to frames to prune low-quality assets during curation.
Filtering runs in two passes that balance speed and quality:
decoded_motion_data per clip, then writes motion_score_global_mean and motion_score_per_patch_min_256. Clips below thresholds move to video.filtered_clips, and video.clip_stats.num_filtered_by_motion increments.sequence policy at a chosen target_fps. The aesthetic stage reads extracted_frames[sequence-<target_fps>], produces an aesthetic_score, and removes clips below the threshold. These clips move to video.filtered_clips, and video.clip_stats.num_filtered_by_aesthetic increments.Motion decoding and aesthetic scoring operate on clip buffers. You must run clipping and encoding first so each clip has a valid buffer (bytes).
Use the pipeline stages or the example script flags to enable motion and aesthetic filtering.
Motion filtering is a two‑step process: first decode motion vectors, then filter clips based on motion scores.
Add MotionVectorDecodeStage to sample motion vectors from each clip.
This step adds decoded_motion_data to each clip, or records an error in clip.errors.
Add MotionFilterStage to compute motion scores and filter out low‑motion clips.
motion_score_global_mean and motion_score_per_patch_min_256 to each clip.video.filtered_clips and increments video.clip_stats.num_filtered_by_motion.Aesthetic filtering works best when you prepare frames first, then score clips using a CLIP‑based aesthetic model.
Extract frames earlier in the pipeline. Use a frame extraction stage with a sequence policy and set a target_fps that matches the aesthetic stage. Refer to Frame Extraction for guidance.
Frame Requirements:
sequence frame extraction policy.target_fps here and in the aesthetic stage.clip.extracted_frames contains frames for the signature sequence-<target_fps>.Add ClipAestheticFilterStage to score each clip and drop clips below a threshold.
aesthetic_score to each clip.video.filtered_clips and increments video.clip_stats.num_filtered_by_aesthetic.