We'll cover the token maths in a future article. On a quick note, 0.5 FPS would mean 1 frame every 2 seconds.
A 1min video = 60 sec / 2 = 30 frames. A 2h movie = 120 min * 30 frames = 3600 frames.
Multiplying 3600 by around $0.003825 for an image (input tokens) ~= 13$.
On top of these, we would need the output tokens, which are text captions, which are priced differently.
Overall, an overview would yield an approximate <20$ in cost. In this course, we've capped the frames and sampled selectively, to keep the price as low as possible (<1$ overall).
We'll cover these at length, stay tuned for the next articles ;)
Oh, yes. I made a mistake. Estimate should be about $15 per 2 hour movie. It will be nice to see how it really works. Great idea by the way. You both are doing a really good job.
Dark Knight Rises. Prison, cave, police, robbery, buildings, blasts, guns, fights, so many commonlife events which would hopefully be captured accurately by the application if asked.
I am not sure what is more suspenseful - the cliff-hanging moments in the clips above or anticipation of the next installment of how this video-RAG works... :-)
im stuck with the rate limit error of using gpt4o-mini to generate captions on the 61 frame , pixeltable docs say they are handling this issue , but im still getting the same
RateLimitError: Error code: 429 - {'error': {'message': 'Rate limit reached for gpt-4o-mini in organization org-XXXXXXXXXXXXX on tokens per min (TPM): Limit 200000, Used 200000, Requested 775. Please try again in 232ms. Visit https://platform.openai.com/account/rate-limits to learn more.', 'type': 'tokens', 'param': None, 'code': 'rate_limit_exceeded'}}
The above exception was the direct cause of the following exception:
Error Traceback (most recent call last)
/usr/local/lib/python3.11/dist-packages/pixeltable/store.py in load_column(self, col, exec_plan, abort_on_exc)
263 if abort_on_exc and row.has_exc():
264 exc = row.get_first_exc()
--> 265 raise excs.Error(f'Error while evaluating computed column {col.name!r}:\n{exc}') from exc
We are trying to reproduce it. We have different rate limits on our OpenAI accounts (way higher) so it's difficult to trigger. Let us know if you encounter it consistently. Can you file an issue here: https://github.com/pixeltable/pixeltable/issues so we can interact with you directly. I'm not monitoring this newsletter comment section.
Miguel Otero Pedrido, I have whole website running the different courses in text and video format. If you consider approximately 1000 videos of each avg lenth of 20-30 mins. What will be the price of the entire system(approx)?
Thank you, learned about Pixeltable today
nice!!
Nice. And what will be the cost of 2 hour movie? My estimate with 0.5 second frame capture is about 1.5$
We'll cover the token maths in a future article. On a quick note, 0.5 FPS would mean 1 frame every 2 seconds.
A 1min video = 60 sec / 2 = 30 frames. A 2h movie = 120 min * 30 frames = 3600 frames.
Multiplying 3600 by around $0.003825 for an image (input tokens) ~= 13$.
On top of these, we would need the output tokens, which are text captions, which are priced differently.
Overall, an overview would yield an approximate <20$ in cost. In this course, we've capped the frames and sampled selectively, to keep the price as low as possible (<1$ overall).
We'll cover these at length, stay tuned for the next articles ;)
Oh, yes. I made a mistake. Estimate should be about $15 per 2 hour movie. It will be nice to see how it really works. Great idea by the way. You both are doing a really good job.
thanks!! We really need to try a 2h movie. It would be the final test xD Do you have any movie in mind?
Dark Knight Rises. Prison, cave, police, robbery, buildings, blasts, guns, fights, so many commonlife events which would hopefully be captured accurately by the application if asked.
🦇
Following since the Alex’s post, I’m really psyched that I could have hands-on this early 🫶🏽
Amazing job guys…
What an article! 🔥
thanks man!! Looking forward to yours :)
I am not sure what is more suspenseful - the cliff-hanging moments in the clips above or anticipation of the next installment of how this video-RAG works... :-)
im stuck with the rate limit error of using gpt4o-mini to generate captions on the 61 frame , pixeltable docs say they are handling this issue , but im still getting the same
any recommendation ?
Can you share the exact issue/error you are getting?
RateLimitError: Error code: 429 - {'error': {'message': 'Rate limit reached for gpt-4o-mini in organization org-XXXXXXXXXXXXX on tokens per min (TPM): Limit 200000, Used 200000, Requested 775. Please try again in 232ms. Visit https://platform.openai.com/account/rate-limits to learn more.', 'type': 'tokens', 'param': None, 'code': 'rate_limit_exceeded'}}
The above exception was the direct cause of the following exception:
Error Traceback (most recent call last)
/usr/local/lib/python3.11/dist-packages/pixeltable/store.py in load_column(self, col, exec_plan, abort_on_exc)
263 if abort_on_exc and row.has_exc():
264 exc = row.get_first_exc()
--> 265 raise excs.Error(f'Error while evaluating computed column {col.name!r}:\n{exc}') from exc
266 table_row, num_row_exc = row_builder.create_table_row(row, None, row.pk)
267 if col.col_type.is_media_type():
Thanks - let me check this morning, will come back to you before EOD.
any updates ?
We are trying to reproduce it. We have different rate limits on our OpenAI accounts (way higher) so it's difficult to trigger. Let us know if you encounter it consistently. Can you file an issue here: https://github.com/pixeltable/pixeltable/issues so we can interact with you directly. I'm not monitoring this newsletter comment section.
FYI : its only 61 frames to be captioned
frames_view.add_computed_column(
im_caption=vision(
prompt="Describe this image in detail",
image=frames_view.resized_frame,
model="gpt-4o-mini",
)
)
Miguel Otero Pedrido, I have whole website running the different courses in text and video format. If you consider approximately 1000 videos of each avg lenth of 20-30 mins. What will be the price of the entire system(approx)?