Upload methods, file requirements, and best practices.
Requirements
- API key from
/dashboard/api-keys - A collection slug
- Supported formats:
mp4,mov,mkv
Upload via SDK (Node)
import PlayVideo from '@playvideo/playvideo-sdk';
const client = new PlayVideo(process.env.BLOCKBUSTER_API_KEY!);
const response = await client.videos.uploadFile('./video.mp4', 'my-collection', {
onProgress: ({ percent }) => console.log(`${percent}%`)
});
console.log(response.video.id);
Upload via API (multipart)
curl -X POST https://api.playvideo.dev/v1/videos \
-H "Authorization: Bearer play_live_xxx" \
-F "[email protected]" \
-F "collection=my-collection"
Best Practices
- Use smaller source files when possible to reduce processing time.
- Prefer H.264 + AAC for faster transcoding.
- Keep file names stable for easier tracking.
- Store the returned
video.idfor polling progress and webhooks.
Progress & Status
Use the video progress endpoint to track processing:
curl https://api.playvideo.dev/v1/videos/VIDEO_ID \
-H "Authorization: Bearer play_live_xxx"
Limits
Uploads are subject to your plan’s bandwidth and file-size limits. If you hit a limit, you’ll be prompted to upgrade.