video-processor
Remove specified segments from a video and concatenate the remaining parts via ffmpeg trim/atrim+concat, producing `compressed_video.mp4` and a task-format `compression_report.json`.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- video-processor
- description
- Remove specified segments from a video and concatenate the remaining parts via ffmpeg trim/atrim+concat, producing `compressed_video.mp4` and a task-format `compression_report.json`.
02 资源文件 1
- 脚本scripts/process_video.py5.3 KB
03 SKILL.md 正文
Steps
- Treat the workflow as incomplete until both required artifacts exist in the current workspace and are validated:
compressed_video.mp4andcompression_report.json. Do not stop after an intermediate file. - Verify the input video exists and record its duration with ffprobe (also confirms the file is readable):
ffprobe -v error -show_entries format=duration -of default=nw=1:nk=1 /path/to/input_video.mp4 - Build a final removal list end-to-end (pipeline order):
audio-extractor→energy-calculator→silence-detector(opening) →pause-detector(start at opening end) →segment-combiner(then normalize/merge/clamp).
- Process the video using the bundled processor script (workspace-relative path). Use the required output filename:
(The script re-encodes with libx264 CRF 23 + AAC 128k.)python3 video-processor/scripts/process_video.py \ --input /path/to/input_video.mp4 \ --output compressed_video.mp4 \ --remove-segments /path/to/all_segments.json - Generate the required report separately (the processor’s
<output>_report.jsonhas different keys than the task requires):python3 report-generator/scripts/generate_report.py \ --original /path/to/input_video.mp4 \ --compressed compressed_video.mp4 \ --segments /path/to/all_segments.json \ --output compression_report.json - If compression is off, retune and re-run from detection:
- Opening too short/too long: adjust
silence-detector --threshold-multiplier(higher ⇒ remove more opening; lower ⇒ remove less). - Pauses missed/too many: adjust
pause-detector --threshold-ratio(higher ⇒ more pauses removed; lower ⇒ fewer) and/or--min-duration.
- Opening too short/too long: adjust
Expected Result
compressed_video.mp4 is playable with valid audio/video streams, and compression_report.json is parseable, schema-correct, and mathematically consistent (original ≈ compressed + removed) with sorted, non-overlapping, in-range removal segments.
04 同仓库更多 Skills
video-frame-extraction
Extract frames from video files and save them as images using OpenCV
openai-vision
Analyze images and multi-frame sequences using OpenAI GPT vision models
image-ocr
Extract text content from images using Tesseract OCR via Python, including structured field extraction from receipts and forms
video-frame-extraction
Extract frames from video files and save them as images using OpenCV
openai-vision
Analyze images and multi-frame sequences using OpenAI GPT vision models
image-ocr
Extract text content from images using Tesseract OCR via Python, including structured field extraction from receipts and forms