Video Summary SDK for Python
Enhance your video processing workflow with the Video Summary SDK for Python. This SDK offers a powerful and easy-to-use solution for transcribing, summarizing, and extracting chapter information from videos. It supports a wide range of sources, including local files and hosted URLs.
Key Features
- Transcription: Accurately convert speech in videos into text.
- Summarization: Efficiently summarize video content.
- Chapter Extraction: Easily identify and extract distinct chapters from videos.
- Versatile Source Support: Compatible with local files, URLs, and various cloud storage solutions.
Installation
Install the package using pip:
pip install video-summary
Getting Started
First, obtain your free API key from VideoSummary.io. Then, install the SDK and integrate it into your Python projects as follows:
from video_summary import VideoSummarySDK
# Initialize the SDK with your API key
video_summary = VideoSummarySDK('your_api_key')
# Example usage
try:
# Local file path or hosted video URL
video_path = './path/to/your/video.mp4'
result = video_summary.summarize(video_path)
print("Video Summary Result:", result)
except Exception as e:
print("Error using Video Summary SDK:", e)
API Methods
The Python SDK offers several methods to interact with your videos. The id and callback_url parameters are optional. The id can be used for your reference if you have an asset ID. The callback_url is for receiving a webhook when the video processing is completed.
If you don't provide a callback url, the call will be synchronous and wait for the processing to complete.
summarize(url, [id], [callback_url])
Summarizes the video content. Provide the URL of the video, and optionally, include an ID and a callback URL for asynchronous processing.
transcribe(url, [id], [callback_url])
Transcribes the audio content of the video into text. Input the video URL, and if desired, an ID and a callback URL.
chapter(url, [id], [callback_url])
Extracts chapters from the video for easier navigation and understanding. This method requires the video URL, with optional ID and callback URL.
summarizeAndChapter(url, [id], [callback_url])
Performs both summarization and chapter extraction on the video. Provide the video URL, and optionally, an ID and a callback URL.
Each method returns a response object containing relevant data about the video processing, including transcripts, summaries, chapters, and file IDs.
output
{
"transcript": {
"speakers": [
{
"speaker": "SPEAKER_00",
"text": " video",
"timestamp": [10,10.26],
"start": 10,
"end": 10.26
},
{
"speaker": "SPEAKER_00",
"text": " products.",
"timestamp": [10.26,10.9],
"start": 10.26,
"end": 10.9
}
],
"chunks": [
{ "text": " video", "timestamp": [Array] },
{ "text": " products", "timestamp": [Array] },
],
"text": "..."
},
"chapters": [
{
"start": 0,
"end": 10.9,
"title": "Introduction to VideoSummary.io",
"text": "Introducing videosummary.io. a simple api to transcribe, chapter and summarize audio and video files."
}
],
"summary": "Developers, check this out. You need VideoSummary.io in your life. It lets you build video products much easier with features like video summarization and video chaptering. Grab it now and start building game-changing video products.",
"fileId": "xxx-xxx-4ffc-a2a5-13d3cee085dd"
}
Metadata
Release files for video-summary 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| video-summary-1.0.3.tar.gz | 6.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| video_summary-1.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.2 kB
Release files / video-summary-1.0.3.tar.gz
| Download URL | video-summary-1.0.3.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
886510ebd003b011895b89d81e0db60252f059977aabf2e4853fd0319fa20c97
|
|
BLAKE2b-256 checksum How to use checksums |
58b8670c8d93bf08443f0b4741b9b9a3499af7a1a95b2ab20b27e45c32eba9c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Release files / video_summary-1.0.3-py3-none-any.whl
| Download URL | video_summary-1.0.3-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b23b8baafcbe4e3c38807623cfa7d5e8d4c003c9db167c8396f7846eb59bd289
|
|
BLAKE2b-256 checksum How to use checksums |
83e6bda584a54b6a294a2764a64cac8971458abfc4d30a56f8e356be300aeb11
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|