verify_video_truncate_runtime.py 881 B

123456789101112131415161718192021222324252627282930313233
  1. #!/usr/bin/env python3
  2. """Verify ffmpeg/OSS runtime dependencies for qwen video truncation."""
  3. from __future__ import annotations
  4. import argparse
  5. import json
  6. import sys
  7. def main() -> int:
  8. parser = argparse.ArgumentParser(description="Verify video truncation runtime")
  9. parser.add_argument(
  10. "--check-oss",
  11. action="store_true",
  12. help="Also verify ALIYUN_OSS_* credentials are configured",
  13. )
  14. args = parser.parse_args()
  15. try:
  16. from agents.find_agent.tools.qwen_video_analyze import verify_truncation_runtime
  17. result = verify_truncation_runtime(check_oss=args.check_oss)
  18. except Exception as exc:
  19. print(json.dumps({"status": "error", "error": str(exc)}, ensure_ascii=False))
  20. return 1
  21. print(json.dumps(result, ensure_ascii=False))
  22. return 0
  23. if __name__ == "__main__":
  24. raise SystemExit(main())