From reviw-plugin
Decomposes videos into meaningful keyframes using ffmpeg scene detection filter. Extracts images on scene changes (threshold 0.01), timestamps from logs, supports MP4/MOV/WEBM/AVI/MKV. Adjusts sensitivity; warns on low frame counts indicating static videos.
npx claudepluginhub kazuph/reviw --plugin reviw-pluginThis skill uses the workspace's default tool permissions.
動画ファイルをffmpegのシーン検出フィルタでフレーム分解し、意味のあるキーフレーム画像を抽出する。
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
動画ファイルをffmpegのシーン検出フィルタでフレーム分解し、意味のあるキーフレーム画像を抽出する。
ffmpeg がインストールされていること(which ffmpeg で確認).mp4, .mov, .webm, .avi, .mkv, .m4v, .ogvreviwと同じシーン検出アルゴリズムを使用する:
# 出力ディレクトリ作成
OUTDIR="/tmp/video-decompose-$(date +%s)"
mkdir -p "$OUTDIR"
# シーン検出でキーフレーム抽出(閾値 0.01 = 標準感度)
ffmpeg -i <video_path> \
-vf "select='gt(scene,0.01)',showinfo,scale=640:-1" \
-vsync vfr \
-q:v 3 \
"$OUTDIR/scene_%04d.jpg" 2>"$OUTDIR/ffmpeg_stderr.log"
パラメータ解説:
select='gt(scene,0.01)': シーン変化スコアが閾値を超えたフレームのみ抽出showinfo: stderr にタイムスタンプ(pts_time:N.NNNNN)を出力scale=640:-1: 幅640px、高さはアスペクト比維持(確認用に十分な解像度)-vsync vfr: 可変フレームレートで選択フレームのみ出力-q:v 3: JPEG品質(1=最高, 31=最低。3=高品質)# stderr からタイムスタンプを抽出
grep "pts_time:" "$OUTDIR/ffmpeg_stderr.log" | sed 's/.*pts_time:\([0-9.]*\).*/\1/'
| 感度 | 閾値 | 用途 |
|---|---|---|
| 少なめ | 0.3 | 明らかなシーン切り替えのみ |
| やや少 | 0.1 | 大きな変化 |
| 標準 | 0.01 | 通常はこれを使う |
| やや多 | 0.005 | 細かい変化も検出 |
| 多め | 0.001 | あらゆる変化を検出 |
# 動画の長さ(秒)を取得
ffprobe -v error -show_entries format=duration -of csv=p=0 <video_path>
# フレーム数を取得
ffprobe -v error -count_frames -select_streams v:0 -show_entries stream=nb_read_frames -of csv=p=0 <video_path>
シーン変化が少ない動画(静的な画面表示など)の場合、シーン検出では1-2枚しか抽出されない。 これ自体が 「この動画は表示しただけで操作がない」 ことの証拠になる。
OUTDIR="/tmp/video-decompose-$(date +%s)" && mkdir -p "$OUTDIR" && ffmpeg -i <video_path> -vf "select='gt(scene,0.01)',showinfo,scale=640:-1" -vsync vfr -q:v 3 "$OUTDIR/scene_%04d.jpg" 2>"$OUTDIR/ffmpeg_stderr.log" && echo "Frames: $(ls "$OUTDIR"/scene_*.jpg 2>/dev/null | wc -l)" && echo "Timestamps:" && grep "pts_time:" "$OUTDIR/ffmpeg_stderr.log" | sed 's/.*pts_time:\([0-9.]*\).*/\1/' && echo "Output: $OUTDIR"