Tiny media transcoding utility for node 🎶

Overview

Mediaplex

Tiny media transcoding utility for node.

🏗️ This package is a work in progress.

Installation

$ npm install --save mediaplex

Example

const mediaplex = require('mediaplex');

const stream = createReadStream('./media.mp3');
const result = mediaplex.probe(stream);

console.log(result);

/*
{
    channels: 2,
    sampleRate: 44100,
    framesPerBlock: 0,
    codec: 4099, // use `CodecType` enum to validate this
    nFrames: 796032,
    duration: 18 // seconds
}
*/
You might also like...
Basilisk node - cross-chain liquidity protocol built on Substrate

Basilisk node Local Development Follow these steps to prepare a local Substrate development environment 🛠️ Simple Setup Install all the required depe

A node API for the dprint TypeScript and JavaScript code formatter

dprint-node A node API for the dprint TypeScript and JavaScript code formatter. It's written in Rust for blazing fast speed. Usage Pass a file path an

Substrate Node for Anmol Network
Substrate Node for Anmol Network

Anmol Substrate Node 🖼 🛠️ 👷 Anmol is the First Cross-Chain NFT Toolkit, on Polkadot. Introducing: Moulds NFT Breeding Multi-Chain NFT Migration ink

Manager for single node Rancher clusters

Bovine Manage single node Rancher clusters with a single binary, bovine. % bovine run Pulling [rancher/rancher:latest], this may take awhile... Ranche

Minimal Substrate node configured for smart contracts via pallet-contracts.

substrate-contracts-node This repository contains Substrate's node-template configured to include Substrate's pallet-contracts ‒ a smart contract modu

Trinci blockchain node

TRINCI TRINCI Blockchain Node. Requirements The required dependencies to build correctly the project are the following: clang libclang-dev (ver. 11 su

Substrate Node Template Generator

Substrate Node Template Generator A tool to generate stand-alone node templates of a customized Substrate clients used in "Substrate Library Extension

Subsocial full node with Substrate/Polkadot pallets for decentralized communities: blogs, posts, comments, likes, reputation.

Subsocial Node by DappForce Subsocial is a set of Substrate pallets with web UI that allows anyone to launch their own decentralized censorship-resist

Node implementation for aleph blockchain built with Substrate framework
Node implementation for aleph blockchain built with Substrate framework

This repository contains the Rust implementation of Aleph Zero blockchain node based on the Substrate framework. Aleph Zero is an open-source layer 1

Comments
  • Add Transcoder

    Add Transcoder

    Since this library was created for discord-player, the API should be similar to its current transcoder, which is a node.js stream. It works by taking raw stream, piping it to transcoder and receive the desired output.

    My current idea is to implement something similar to the following:

    import { probeStream, CodecType, Transcoder } from 'mediaplex'
    
    const stream = getInputStream();
    const probeResult = await probeStream(stream);
    
    if (!probeResult.result) return; // unsupported stream
    
    const transcoder = new Transcoder({
        format: CodecType.OPUS, // the output format
        sampleRate: 48000, // output sample rate
        channels: 2, // the number of channels
        ... // other options
    }); // Transcoder extends Transform stream
    
    const output = stream.pipe(transcoder); // output shall be Opus stream, as specified in format
    
    enhancement 
    opened by skdhg 0
Owner
AndrozDev
We build free tools for everyone
AndrozDev
Simple node and rust script to achieve an easy to use bridge between rust and node.js

Node-Rust Bridge Simple rust and node.js script to achieve a bridge between them. Only 1 bridge can be initialized per rust program. But node.js can h

Pure 5 Apr 30, 2023
Sample lightning node command-line app built on top of Ldk Node (similar to ldk-sample).

ldk-node-sample Sample lightning node command-line app built on top of Ldk Node (similar to ldk-sample ). Installation git clone https://github.com/op

optout 3 Nov 21, 2023
A small and modular media manager

Bookshelf - a small and modular media manager Bookshelf is made for managing media, mainly books. Modules are to be made by the user (or stolen from t

Chocolate Overflow 33 Jul 21, 2022
A tiny blockchain for demonstraion.

tinychain Substrate入门课 Office Hour 演示项目。 项目介绍 本项目旨在介绍区块链基本原理,重点关注如何生成区块和如何与其他节点达成共识,会简化其他逻辑。 只有转账功能,不包含智能合约,也不包含Substrate相关内容 共识机制:PoW 网络协议:使用HTTP模拟P2

Che Kwas 11 Dec 23, 2022
Tiny CLI for submitting large calldata transactions to EVM networks to stress test the networking layer. Main motivation: EIP4844blobs.

stress4844 Tiny CLI for submitting large calldata transactions to EVM networks to stress test the networking layer. Main motivation: EIP4844 blobs. ca

Paradigm 50 Jan 4, 2023
Tiny CLI for submitting large calldata transactions to EVM networks to stress test the networking layer

Tiny CLI for submitting large calldata transactions to EVM networks to stress test the networking layer. Main motivation: EIP4844blobs.

Paradigm 50 Jan 4, 2023
Bijou is a tiny yet fast encrypted file system.

Bijou ✨??✨ Bijou (['bi:ʒu], French for "jewel") is a tiny yet fast encrypted filesystem, built upon RocksDB. Bijou provides a FUSE interface, as well

Mivik 5 Sep 27, 2023
Polkadot Node Implementation

Polkadot Implementation of a https://polkadot.network node in Rust based on the Substrate framework. NOTE: In 2018, we split our implementation of "Po

Parity Technologies 6.5k Jan 6, 2023
⋰·⋰ Feeless is a Nano cryptocurrency node, wallet, tools, and Rust crate.

⋰·⋰ Feeless What is Feeless? Feeless is a Nano cryptocurrency node, wallet, tools, and Rust crate. This is not the official project for Nano, only an

null 127 Dec 5, 2022
Statemint Node Implementation

Statemint Implementation of Statemint, a blockchain to support generic assets in the Polkadot and Kusama networks. Statemint will allow users to: Depl

Parity Technologies 72 Oct 30, 2022