npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

sora-ai-video

v1767580.963.83

Published

Professional integration for https://supermaker.ai/video/sora-ai-video/

Readme

sora-ai-video

A JavaScript library for interacting with and processing video data generated by AI models like Sora, providing utilities for format conversion, metadata extraction, and basic editing.

Installation

bash npm install sora-ai-video

Usage Examples

Here are a few practical examples of how to use the sora-ai-video library in your JavaScript/Node.js projects:

1. Extracting Video Metadata: javascript const { getVideoMetadata } = require('sora-ai-video');

async function extractMetadata(videoFilePath) { try { const metadata = await getVideoMetadata(videoFilePath); console.log('Video Metadata:', metadata); } catch (error) { console.error('Error extracting metadata:', error); } }

// Example usage: extractMetadata('./path/to/your/sora_generated_video.mp4');

This example demonstrates how to retrieve essential information about a Sora-generated video, such as its duration, resolution, and codec.

2. Converting Video Format: javascript const { convertVideoFormat } = require('sora-ai-video');

async function convertFormat(inputFilePath, outputFilePath, targetFormat) { try { const result = await convertVideoFormat(inputFilePath, outputFilePath, targetFormat); console.log('Video conversion successful:', result); } catch (error) { console.error('Video conversion failed:', error); } }

// Example usage: convert from MP4 to WebM convertFormat('./path/to/your/sora_generated_video.mp4', './output/converted_video.webm', 'webm');

This snippet illustrates how to convert a video generated by Sora from one format (e.g., MP4) to another (e.g., WebM) for broader compatibility.

3. Trimming a Video: javascript const { trimVideo } = require('sora-ai-video');

async function trim(inputFilePath, outputFilePath, startTime, duration) { try { const result = await trimVideo(inputFilePath, outputFilePath, startTime, duration); console.log('Video trimming successful:', result); } catch (error) { console.error('Video trimming failed:', error); } }

// Example usage: trim the video from 5 seconds to 10 seconds. trim('./path/to/your/sora_generated_video.mp4', './output/trimmed_video.mp4', 5, 5);

This example showcases how to trim a video, extracting a specific segment based on a start time and duration.

4. Generating a Thumbnail: javascript const { generateThumbnail } = require('sora-ai-video');

async function generateThumb(videoFilePath, outputFilePath, timeOffset) { try { const result = await generateThumbnail(videoFilePath, outputFilePath, timeOffset); console.log('Thumbnail generated successfully:', result); } catch (error) { console.error('Thumbnail generation failed:', error); } }

// Example usage: generate a thumbnail at 2 seconds into the video generateThumb('./path/to/your/sora_generated_video.mp4', './output/thumbnail.png', 2);

This shows how to create a thumbnail image from a specific point in your Sora-generated video.

5. Checking Video Compatibility: javascript const { isVideoCompatible } = require('sora-ai-video');

async function checkCompatibility(videoFilePath, targetFormat) { try { const compatible = await isVideoCompatible(videoFilePath, targetFormat); if (compatible) { console.log(Video is compatible with ${targetFormat}); } else { console.log(Video is NOT compatible with ${targetFormat}); } } catch (error) { console.error('Error checking compatibility:', error); } }

// Example usage: checkCompatibility('./path/to/your/sora_generated_video.mp4', 'webm');

This function helps determine if a video is compatible with a certain format before attempting any conversion or processing.

API Summary

  • getVideoMetadata(videoFilePath: string): Promise<object>: Extracts metadata from a video file. Returns a promise that resolves with an object containing video information.
  • convertVideoFormat(inputFilePath: string, outputFilePath: string, targetFormat: string): Promise<string>: Converts a video file to a different format. Returns a promise that resolves with the path to the converted video.
  • trimVideo(inputFilePath: string, outputFilePath: string, startTime: number, duration: number): Promise<string>: Trims a video file. startTime and duration are in seconds. Returns a promise that resolves with the path to the trimmed video.
  • generateThumbnail(videoFilePath: string, outputFilePath: string, timeOffset: number): Promise<string>: Generates a thumbnail image from a video file at a specified time offset (in seconds). Returns a promise that resolves with the path to the thumbnail image.
  • isVideoCompatible(videoFilePath: string, targetFormat: string): Promise<boolean>: Checks if a video is compatible with a given format. Returns a promise that resolves with a boolean value.

License

MIT

This package is part of the sora-ai-video ecosystem. For advanced features and enterprise-grade tools, visit: https://supermaker.ai/video/sora-ai-video/