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 🙏

© 2024 – Pkg Stats / Ryan Hefner

video-summary

v1.0.8

Published

Video Summary SDK is a powerful Node.js module for advanced video processing, offering features like speech-to-text transcription, content summarization, automatic chapter extraction, and comprehensive video summarization. It's perfect for developers look

Downloads

2

Readme

Video Summary SDK

Elevate your video processing capabilities with the Video Summary SDK. This Node.js SDK provides a seamless way to transcribe, summarize, and extract chapter information from videos. Whether it's a local file or a hosted URL, Video Summary SDK handles it all with ease.

Key Features

  • Transcription: Convert speech in your videos into accurate text.
  • Summarization: Get concise summaries of video content.
  • Chapter Extraction: Identify and extract distinct chapters from videos.
  • Support for Various Sources: Works with local files, URLs, and S3 buckets.

Installation

Install the package with npm:

npm install video-summary

Getting Started

const VideoSummarySDK = require('video-summary')
const VideoSummary = new VideoSummarySDK('your api key')

setTimeout(async () => {
  try {
    // local file, s3 url, and signed s3 url all work! You can also send an audio file 
    const path = './your/local/file.mp4'
    const res = await VideoSummary.summarize(path)
    console.log("video summary res:", res)
  } catch (e) {
    console.error('video summary sdk e', e)
  }
})

API Methods

The SDK offers several methods to interact with your videos:

Note

The id and callbackUrl are optional. the id field can be used for your own reference if you have as asset id already. the callbackUrl is used to send a webhook when the video is processed and sends the id back to you.

If you don't provide a callback url, the call will be synchronous and wait for the processing to complete.

summarize(url, [id], [callbackUrl])

Summarizes the video content. Provide the URL of the video, and optionally, an ID and a callback URL for asynchronous processing.

transcribe(url, [id], [callbackUrl])

Transcribes the audio content of the video into text. Pass the video URL, and if needed, an ID and a callback URL.

chapter(url, [id], [callbackUrl])

Extracts chapters from the video for easy navigation and understanding. Requires the video URL, with optional ID and callback URL.

summarizeAndChapter(url, [id], [callbackUrl])

Performs both summarization and chapter extraction on the video. Input the video URL, and optionally, an ID and a callback URL.

getFiles(limit, offset)

Retrieves a list of processed files. You can specify the number of files to return and the offset.

getFile(fileId)

Fetches the details of a specific file by its ID.

Each method returns a promise that resolves to an object with 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"
}