Why is my video analysis code with Google Gemini API slow, and how can I optimize it?
I am using the Google Gemini API to upload and analyze videos. The code works, but it’s quite slow. It takes about 1.3 minutes to process a 2-minute video. I would like to understand why this is happening and how I can optimize my code to reduce the processing time.