Video Inference API not working sometimes

I have been trying out the video inference API (API Reference - Roboflow Docs) on a model from the Roboflow Universe. I am using links to mp4 videos that are stored in an s3 bucket. It works in most cases, but sometimes the inference doesn’t complete even after a long time and I have no idea why it fails (assuming it has failed). It’s a bit inconsistent as the inference for the same video URL and model works sometimes, and doesn’t work sometimes.

When I try to look for the status of a failed(?) job, the response looks like this:
{
“_id”: “XXX”,
“created_at”: “Fri, 26 Jan 2024 10:38:23 GMT”,
“crop_area”: “full”,
“infer_fps”: 10,
“infer_models”: [
{
“api_key”: “XXX”,
“infer_errors”: 0,
“infer_success”: 0,
“inference_type”: “object-detection”,
“model_id”: “XXX”,
“model_version”: 3
}
],
“memo”: “XXX”,
“metadata”: “”,
“pubsub_message_id”: “9179949623746417”,
“retries”: 0,
“signed_url”: “MP4-LINK-HERE”,
“updated_at”: “Fri, 26 Jan 2024 10:38:23 GMT”,
“webhook_url”: “”
}

Is there a way to get the status or error reason from this?

I would like to know what might be going wrong and fix it. I am new to roboflow, so maybe I am missing out something?

From the information provided in the extracts, it seems like you’re using the Video Inference API correctly. However, to understand the status of your job, you can use the GET/videoinfer/?api_key=&job_id= endpoint. This endpoint returns the current status of the job. The returned JSON’s status key can help you understand the job’s status. If the status key is set to 0, it means the job was successful. If the status is set to 1, it indicates that the job processing is not complete. Any higher values indicate job failure.

In your case, it seems like the status key is missing from the response. This could be due to the job not being completed or an error occurring during the process.

If you’re experiencing inconsistencies with the same video URL and model, it might be due to rate-limiting. The endpoint is rate-limited, so you should avoid polling this endpoint more than once per minute.

If you’re still facing issues, it might be helpful to reach out to Roboflow’s support or check their forum for similar issues.

Here is the source for your reference.


Hi! I’m Roboflow’s AI powered bot. This is an automated response powered using AI with knowledge from our docs, blog, and forum. If this solves your issue, please mark it as the solution using the checkbox icon. If this doesn’t solve your issue, please follow up with what you’ve tried/why, and the community will continue to chime in as usual.

There is no “status” key in the response. I don’t think I am rate-limited as I have been checking the response only once in like 5 mins.

Hi nithish, thanks for your message. May I know what’s the job_id (the field of _id)?

Hi nithish, we fixed some bugs, now I just confirmed that this job has been processed successfully. Thank you so much for your report!

1 Like

The job_id is e9f763f7-371e-4224-8dd7-a51718c84be2

I see it is now showing a success and I can view the json. But it took a really long time to process. The same video previously was analyzed in under 3 mins. But, this time it appears to have taken 2 hours and 10 mins (looking at the updated_at).

What are the factors that decide how long it takes? How can I plan accordingly?

Oh got it. Thanks a lot!

Depending on the duration of video, and how many requests we got from all our users. BUt usually, we don’t expect it takes such a long time. Please feel free to reach out to us if you find your job gets stuck

Sure, I’ll do that. Thanks.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.