verify_video_truncate_runtime.py 870 B

1234567891011121314151617181920212223242526272829303132
  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. def main() -> int:
  7. parser = argparse.ArgumentParser(description="Verify video truncation runtime")
  8. parser.add_argument(
  9. "--check-oss",
  10. action="store_true",
  11. help="Also verify ALIYUN_OSS_* credentials are configured",
  12. )
  13. args = parser.parse_args()
  14. try:
  15. from agents.find_agent.tools.qwen_video_analyze import verify_truncation_runtime
  16. result = verify_truncation_runtime(check_oss=args.check_oss)
  17. except Exception as exc:
  18. print(json.dumps({"status": "error", "error": str(exc)}, ensure_ascii=False))
  19. return 1
  20. print(json.dumps(result, ensure_ascii=False))
  21. return 0
  22. if __name__ == "__main__":
  23. raise SystemExit(main())