Sample SDK for Python
The SDK for Python lets you call ApsaraVideo VOD APIs from a server-side Python application — covering upload, processing, playback, media management, editing, content moderation, and live-to-VOD.
Overview
ApsaraVideo VOD is a cloud video service for upload, processing, storage, distribution, and playback. The SDK for Python exposes the full VOD API surface so you can build video-on-demand applications without writing raw HTTP requests.
After installation, initialize the SDK with your AccessKey pair and region to start calling VOD APIs.
Features
-
Installation and initialization
Configure your AccessKey pair and region during initialization to authenticate SDK calls against Alibaba Cloud APIs.
-
Video upload and storage
Upload video files from a server using client upload, server upload, or resumable upload. Video data is stored on Alibaba Cloud infrastructure with built-in security and reliability. Choose the upload method that fits your pipeline — resumable upload handles large files and unstable network conditions.
-
Video processing and optimization
Trigger transcoding, screenshot capture, and watermark addition through the SDK. Apply custom processing templates to produce output that meets playback requirements across mobile and PC devices.
-
Playback and distribution
Generate playback URLs for HTML5 players and other player integrations. Pair with ApsaraVideo CDN to deliver video to global audiences with fast and stable transmission.
-
Media management and classification
Manage video assets with operations for classification, tag management, search, and deletion. Multi-level classification supports complex organizational structures for large media libraries.
-
Video editing and content optimization
Perform video cropping, splicing, and subtitle addition through the SDK to produce customized output.
-
Content moderation and copyright protection
Automatically review video, audio, and image content to detect sensitive material and enforce compliance. The media fingerprint feature generates a unique fingerprint per video to identify duplicate or pirated content.
-
Live-to-VOD and AI analysis
Convert live streams to on-demand videos in real time so viewers can replay content. AI features include video content analysis, scene detection, and person detection.