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

aac-repair

v1.1.1

Published

Browser refuses to play aac file. Clean cut header and payload. Translation from Python project node.js.

Downloads

22

Readme

Node.js: aac-repair

node.js translation of my Python repository.

aac-repair is a sound file repair tool for .aac and .aacp files. It reads the file header codes.

  • express server terminal with React based frontend file upload
  • command line support
  • module import

Why?

Internet browser refuse to play defective aac files from local folders.

Recorded internet or personal aac streams get a clean cut for header and payload.

Drag and drop a file into the browser window to check

Installation

Install global to get the executable aac-repair.

npm install aac-repair -g

Usage

OS got a User Interface (UI)

Start the Frontend and Backend. Get a Browser window. Terminal window shows progress.

foo@bar:~$ aac-repair  // run the executable if installed global
// serverApp.js - in a local folder
const aac = require("aac-repair");
aac.app( {browser: true} );
foo@bar:~$ node serverApp.js

Folder

The repaired files are dumped to aacRepaired folder beneath.

const aac = require("aac-repair");
aac.repairAacFolder("C:\\Users\\Schtroumpfette\\sound");

File repair

const aac = require("aac-repair");

async function getBytes() {
    let byteArray = await aac.readOneFile("C:\\Users\\Schtroumpfette\\sound\\damaged.aac");
    return byteArray;
}

const oneFile = async () => {  // head and tail cut
    getBytes().then((byteArray) => {
        aac.repairOneFileAac(byteArray)
          .then((repaired) => {console.log("oneFile->", repaired);});
      });
    }
    oneFile();

const bodyCut = async () => {
    let byteArray = await getBytes();
    let head = await aac.repairHead(byteArray);
    let body = await aac.repairTail(head);
    console.log("bodyCut->", body);
    return body;
    }
    bodyCut();

File (folder) test preparation

The cut files (-1 Byte) are dumped to aacDamaged folder beneath.

const aac = require("aac-repair");
aac.cutOneByteAacFolder("C:\\Users\\Schtroumpfette\\sound");

Command line Browser start

foo@bar:~$ aac-repair

Install the package in a folder. Got to "node_modules/aac-repair" directory. --frontend

foo@bar:~$ cd node_modules/aac-repair
foo@bar:~$ node server-aac.js  --frontend

Command line folder repair

Install the package in a folder. Got to "node_modules/aac-repair" directory. -d "path"

foo@bar:~$ cd node_modules/aac-repair
foo@bar:~$ node aacWorker.js -d "./repairDamagedFilesFolder"

Credit

Stack Overflow Website for tripwire awareness and workarounds,

Document: Recommendation ITU-R BS.1196-4(02/2015) Audio coding for digital broadcasting https://www.itu.int/rec/R-REC-BS.1196/en

Document: ETSI TS 102 563 https://www.etsi.org/deliver/etsi_ts/102500_102599/102563/01.02.01_60/ts_102563v010201p.pdf

License

Licensed under MIT

Copyright (c) 2024 René Horn