Video Mode
Process an uploaded video while it uploads, or after
An uploaded video is buffered in full before processing starts. That is the safe default, but it means the first prediction waits for the last byte. stream mode processes the video while it is still uploading, so predictions start arriving almost immediately.
buffer (default)
Upload completes, then the video is processed
stream
Video is processed as it uploads
This is a property of the source rather than of the request, because it only means anything for uploaded video. Fetched URLs and live streams are always processed as they arrive.
Buffering has to hold the whole video, so it is capped at 1 GiB. A larger upload is rejected with a 400. stream mode has no such cap, because nothing is held — it is the answer for a video too big to buffer, as well as for one you do not want to wait for.
from eyepop.worker.worker_types import VideoMode
job = endpoint.upload("clip.mp4", video_mode=VideoMode.STREAM)
while result := job.predict():
print(result)import { VideoMode } from '@eyepop.ai/eyepop'
const results = await endpoint.process({
source: { path: 'clip.mp4', videoMode: VideoMode.STREAM },
})Last updated
