🚀 Launch Week Day 2:Introducing Custom Tabs for Org Alerts.Learn More →
Socket
Book a DemoInstallSign in
Socket

transcode-stream

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

transcode-stream

Stream that transcodes video and audio codecs

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

transcode-stream

Transform stream that transcodes video and audio codecs

npm install transcode-stream

Usage

const transcode = require('transcode-stream')

inputStream
  .pipe(transcode({
    vcodec: 'h264',
    acodec: 'mp3'
  }))
  .pipe(outputStream)

API

transformStream = transcode(options)

Transcode an incoding audio or video stream.

Options include:

{
  acodec: 'audio-codec-to-use', // defaults to 'copy'
  vcodec: 'video-codec-to-use', // defaults to 'copy'
  format: 'container-format' // defaults to mp4
}

FFMPEG is used for the actual transcoding so make sure that is in your PATH. PRs for more options welcome.

writableStream = transcode.info(cb)

Get media info about an incoding stream. Returns an object that looks like this:

{
  vcodec: 'the-video-codec-used',
  acodec: 'the-audio-codec-used',
  width: videoWidth,
  height: videoHeight
}

License

MIT

FAQs

Package last updated on 04 Feb 2019

Did you know?

Socket

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