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

dash-converter

v0.1.0

Published

DASH Converter is a [Node.js](https://nodejs.org/en/) tool to automate the encoding of multi-bitrate media for DASH delivery. Based on this [guide](https://accurate.video/docs/guides/encoding-multi-bitrate-content-optimal-dash-delivery/) by Jonas Sandberg

Downloads

4

Readme

DASH Converter

DASH Converter is a Node.js tool to automate the encoding of multi-bitrate media for DASH delivery. Based on this guide by Jonas Sandberg of Codemill.

Installation and Usage

To use DASH Converter as a command line tool, make sure Node.js and mp4box are installed on your machine. FFmpeg and FFprobe binaries are provided automatically.

Install globally with NPM:

$ npm install -g dash-converter

Create a new directory to store the files ./input and ./output folders, and optionally a config.json file to configure your desired output formats. If you don't create one, a default one will be created when the converter is run. See the configuration section for details on configuration options.

When ready, place all of your source video files into ./input and run the following command:

$ dash-converter

DASH Converter will process every video file in the ./input folder into an MPEG-DASH compatible format and store the results in ./output.

For experimental NVENC hardware acceleration you can pass the -hwaccel flag:

$ dash-converter -hwaccel

Building locally

Clone this repo and use npm install to install dependencies:

$ git clone https://github.com/JeffSchofield/dash-converter.git
$ cd dash-converter
$ npm install

Build the project with NPM:

$ npm run build

Use NPM link to make your local DASH Converter available to the command line:

$ npm link
$ dash-converter

Programmatic Usage

You can integrate the converter into your Node.js application by installing and importing the DASH Converter lib:

$ npm install dash-converter

Example:

import { DASHConverter } from 'dash-converter'

async function init() {
	const dash = new DASHConverter({
		video_formats: [
			{ name: '1080p', args: {} }
		],
		audio_formats: [
			{ name: '', args: {} }
		]
	})

	let result = await dash.convert('./some_source_video.mp4', './output_folder')
}

Configuration

DASH Converter will create a default config.json file for you when first run. Alter this file to specify video and audio formats to be transcoded.

default_audio_args

  • Type: FFmpegAudioArgs

  • Default: { 'c:a': 'aac', 'b:a': '192k', 'vn': undefined }

    Arguments that are always passed to FFmpeg during audio transcode.

default_video_args

  • Type: FFmpegVideoArgs

  • Default: { 'c:v': 'libx264', 'profile:v': 'main', 'crf': 23, 'preset': "slow", 'pix_fmt': "yuv420p", 'an': undefined }

    Arguments that are always passed to FFmpeg during video transcode.

audio_formats

  • Type: FFmpegAudioFormat[]

    List of audio formats to be transcoded to. Each format contains a name and a list of arguments to pass to FFMpeg in this shape: { name:string, args:FFmpegAudioArgs }

video_formats

  • Type: FFmpegVideoFormat[]

    List of video formats to be transcoded to. Each format contains a name and a list of arguments to pass to FFMpeg in this shape: { name:string, args:FFmpegVideoArgs }

License

DASH Converter is MIT licensed.