Preprocess Video

Preprocess videos for browser compatibility and frame extraction

Prepare video file for detection

post
/34/preprocess-video

Processes and prepares a video for AI detection analysis. The video can be provided either as a file upload (multipart/form-data) or as a URL. Supports direct downloads from limited platforms including X and Facebook using yt-dlp. Converts the video to a browser-compatible format, extracts frames at specified intervals, and optionally generates thumbnail images. This endpoint is useful for pre-processing videos before sending them to the detect-video endpoint.

This endpoint performs preprocessing only without AI detection.

Authorizations
AuthorizationstringRequired

API key authentication for service-to-service communication.

Include your API key in the Authorization header:

Authorization: Bearer your-api-key
x-bitmind-application: oracle-api
Body
videostring · binaryRequired

Video file form data or direct URL.

  • Supported formats: mp4, mov, avi.
  • For file upload: Use multipart/form-data with 'video' field
  • For URL: Use JSON request with 'video' field containing URL
startTimenumber · floatOptional

Starting point in seconds for extraction (default 0)

Default: 0
endTimenumber · floatOptional

Ending point in seconds for extraction (default entire video)

Default: 0
fpsintegerOptional

Frames per second to use for processing (default 30)

Default: 30
generateThumbnailsbooleanOptional

Whether to generate thumbnail images (default false)

Default: false
Responses
200

Successful response

application/json
post
/34/preprocess-video
POST /oracle/v1/34/preprocess-video HTTP/1.1
Host: api.bitmind.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 80

{
  "video": "binary",
  "startTime": 0,
  "endTime": 0,
  "fps": 30,
  "generateThumbnails": false
}
{
  "browserCompatibleUrl": "https://applications-temp-videos.s3.amazonaws.com/processed/example_browser.mp4",
  "processingTime": 3.456
}

Last updated