seedance-ai-video
v1767581.341.557
Published
Professional integration for https://supermaker.ai/video/seedance-ai-video/
Maintainers
Readme
seedance-ai-video
A JavaScript library for programmatically interacting with video content using AI-powered analysis. Streamline your video workflows and unlock new possibilities for video understanding and manipulation.
Installation
Install the package using npm: bash npm install seedance-ai-video
Usage Examples
Here are a few examples of how to use seedance-ai-video in your JavaScript/Node.js projects:
1. Analyzing Video Content for Key Moments: javascript const seedance = require('seedance-ai-video');
async function analyzeVideo(videoUrl) { try { const analysis = await seedance.analyze(videoUrl); console.log("Video analysis complete:", analysis);
// Extract key moments based on scene changes or other criteria.
const keyMoments = analysis.scenes.filter(scene => scene.importanceScore > 0.8);
console.log("Key Moments:", keyMoments);} catch (error) { console.error("Error analyzing video:", error); } }
analyzeVideo('https://example.com/myvideo.mp4');
2. Generating Video Summaries: javascript const seedance = require('seedance-ai-video');
async function generateSummary(videoUrl, maxLength = 60) { // maxLength in seconds try { const summary = await seedance.summarize(videoUrl, maxLength); console.log("Video Summary:", summary); } catch (error) { console.error("Error generating summary:", error); } }
generateSummary('https://example.com/presentation.mp4', 120); // Summarize to 2 minutes
3. Identifying Objects and People in a Video: javascript const seedance = require('seedance-ai-video');
async function detectObjects(videoUrl) { try { const detections = await seedance.detectObjects(videoUrl); console.log("Object Detections:", detections);
detections.forEach(detection => {
console.log(`Found a ${detection.object} at time ${detection.timestamp}`);
});} catch (error) { console.error("Error detecting objects:", error); } }
detectObjects('https://example.com/productdemo.mp4');
4. Transcribing Video Audio: javascript const seedance = require('seedance-ai-video');
async function transcribeVideo(videoUrl) { try { const transcription = await seedance.transcribe(videoUrl); console.log("Video Transcription:", transcription); } catch (error) { console.error("Error transcribing video:", error); } }
transcribeVideo('https://example.com/interview.mp4');
5. Extracting Video Metadata: javascript const seedance = require('seedance-ai-video');
async function getVideoMetadata(videoUrl) { try { const metadata = await seedance.getMetadata(videoUrl); console.log("Video Metadata:", metadata); console.log("Video Duration:", metadata.duration); console.log("Video Resolution:", metadata.resolution); } catch (error) { console.error("Error getting metadata:", error); } }
getVideoMetadata('https://example.com/tutorial.mp4');
API Summary
analyze(videoUrl): Analyzes the video provided by the URL, returning insights into scene changes, object recognition, and overall content.summarize(videoUrl, maxLength): Generates a concise summary of the video, aiming for a duration no longer thanmaxLengthseconds.detectObjects(videoUrl): Identifies and locates objects within the video frames, providing timestamps and bounding box information.transcribe(videoUrl): Transcribes the audio content of the video into text.getMetadata(videoUrl): Retrieves metadata information about the video, such as duration, resolution, and codec details.
License
MIT
This package is part of the seedance-ai-video ecosystem. For advanced features and enterprise-grade tools, visit: https://supermaker.ai/video/seedance-ai-video/
