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

js-stream-packager

v1.0.0

Published

HLS and DASH packager for video and audio files

Downloads

2

Readme

PackagerJS

A package that edits and packages your HLS and DASH videos

Getting Started

Make sure FFMpeg and Shaka Packager are installed and add to your path

Instalation

npm install js-stream-packager --save

Usage

const packager = require("packager")

const videopackager = new packager()
//To create DASH contents
videopackager().dash([{input:"/path/to/inputfile.mkv",duration:"59",output:'/path/to/outputfile.mp4'}],'/path/to/outputDASHManifest.mpd')

// To skip creating the steams and jump generate the manifest
// Note input files must be mp4
videopackager().dash([{input:"/path/to/inputfile.mp4",output:'/path/to/outputfile.mp4'}],'/path/to/outputDASHManifest.mpd',false)

//To create HLS contents
videopackager().hls([{input:"/path/to/inputfile.mkv",duration:"59",output:'/path/to/outputfile.mp4'}],'/path/to/outputHLSManifest.m3u8')

// To skip creating the steams and jump generate the manifest
// Note input files must be mp4
videopackager().dash([{input:"/path/to/inputfile.mp4",output:'/path/to/outputfile.mp4'}],'/path/to/outputHLSManifest.m3u8',false)

//Multiply video streams can be created to and edited with FFMPEG 
p.ffmpeg([{input:'/path/to/video.mp4',duration:'10',
size:'144x360',duration:'10',aspectRatio:'4:3',framerate:'10',output:'/path/to/outvideo.mp4'},
{input:'/path/to/video.mp4',duration:'10',startTime:'10',
size:'720x360',duration:'10',aspectRatio:'4:3',framerate:'10',output:'/path/to/video.mp4'}]
)

Built With

Contributing

[GitHub]https://github.com/Sectur1/pakager)

Authors

License

This project is licensed under the MIT License

Options

| Video stream options | Use | | ----------------------- | -------------------------------------------------------------------------------- | | input | The input (This can be on the input parameter to signify 1 stream or per stream) | | size | The video's size for eg "720x360" | | duration | The duration of the video eg "50" or "1:50" | | aspectRatio | The video's aspect eg"16:9" | | frameRate | The video's framerate eg "24" or "60" | | bitsPerRawSample | The video's Bit Per Sample | | startTime | Offset time to the start the video | | noVideo | To disenable the video | | videoFilters | FFMPEG's video filter | | videoBitRate | The video's bitrate |

| Audio options | Use | | ------------------------ | ------------------------------------------------------------------------------ | | aframes | Number of audio frames to output | | quality | Codec specific audio quality | | sample | Audio sample rate in Hz | | channels | Audio channels in number | | noAudio | Disenables audio | | audioCodec | Audio codec to use | | volume | Sets the audio volume. It defaults to 256 | | audiFilters | FFMPEG's audio filter |

| General options | Use | | -------------------------- | ------------------------------------------------------------------------------ | | metadata | File metadata | | fileSize | Force file size | | frames | Number of frames to output eg 1 for a picture | | timestamp | When the video was created defaults to now | | to | Stop transcoding at set time eg 1:50 |