檢查影片技能
基於 Gemini 的影片檢查,用於品質分析與除錯。
目的
利用 Gemini 3 Pro 的影片理解能力:
- 描述影片中的事件
- 識別凍結畫面、黑畫面、畫面異常
- 偵測視覺品質問題
- 驗證內容是否符合預期
- 產生品質報告
使用方法
python skills/inspect-video/inspect.py <video_file> [--prompt "custom query"]
預設檢查
若不提供自訂提示詞,將執行標準品質檢查:
python skills/inspect-video/inspect.py video.mp4
輸出:
{
"description": "Panel discussion with 3 speakers...",
"quality_issues": ["Video appears to freeze at 35s"],
"visual_quality": "good",
"audio_sync": "appears synchronized",
"recommendations": ["Check source video at 35s mark"]
}
自訂查詢
針對影片提出具體問題:
# 檢查特定內容
python skills/inspect-video/inspect.py video.mp4 --prompt "Who are the speakers and what are they discussing?"
# 除錯凍結問題
python skills/inspect-video/inspect.py video.mp4 --prompt "Does the video freeze or loop at any point?"
# 驗證字幕
python skills/inspect-video/inspect.py video.mp4 --prompt "Are the captions visible and readable?"
整合方式
在渲染後用於品質保證:
from skills.inspect_video.inspect import inspect_video
result = inspect_video("output/final.mp4", "Does the video have any visual glitches?")
if "freeze" in result.lower() or "glitch" in result.lower():
print("Quality issue detected!")
Gemini 影片理解
- 支援長達 1 小時的影片
- 分析視覺內容、動態、文字
- 可偵測音訊問題(若要求)
- 提供問題發生的時間戳記