Socket
Socket
Sign inDemoInstall

video-summary

Package Overview
Dependencies
9
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    video-summary

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


Version published
Weekly downloads
109
increased by10800%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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

  • Grab your api key for free at https://videosummary.io then follow the instructions below.
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"
}

Keywords

FAQs

Last updated on 23 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc