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

podhnologic

v2.0.4

Published

converts your music collection to another format; e.g. iPod

Downloads

617

Readme

npx podhnologic \
--input "/path/to/input" \
--output "/path/to/output" \
--ipod

what?

  • A tool to convert your music collection from A to B
  • Written for and used by me to convert my FLAC library to ALAC + 256 AAC

why?

Apple's Music encoder is single-threaded and requires you to import your library into it before you can (very slowly) convert it. Since it's considered the best, we're still going to use Apple's encoder if it's available on your system.

quality

This tool is simple and opinionated. I assume you want the best possible but practical quality.

  • alac & flac: lossless (or down-sampled with --ipod)
  • aac: 256kbps w/Apple's encoder (where available)
  • opus: 128kbps
  • mp3: 320kbps
  • wav: pcm_s16le (should we be doing something different?)

iPod

  • --ipod is shorthand for 256 kbps AAC
  • if --codec alac is also specified, tracks will be down-sampled to 16-bit 44.1kHz.
    • This prevents track skipping on the iPod.
  • Moves the moov atom at the beginning of the file, which is useful for streaming and playback compatibility.
  • Eliminates all metadata except for title, artist, album, date, track, genre, disc, and lyrics
    • This helps increase the number of track you can fit in memory on an iPod
    • Optionally add --no-lyrics to squeeze even more space
  • Album art is preserved

performannt

Runs X-times faster than iTunes while utilizing the same encoder on a machine with X idle cores

resumable

Checks if the output file already exists before converting. If a big job gets interrupted, just re-run the same command and the files that are already done will be skipped.

how?

requirements

  • ffmpeg must be installed, or at least located locally, such that you can specify with the path via --ffmpeg. If an installed version is found it will automatically be used.
  • node.js is used to execute and run this tool.
    • I initially planned to distribute a self-contained binary, but dealing with modern security / code signing is not worth our time. Be glad you can easily inspect/modify this code.

There are no other dependencies.

options

npx podhnologic \
  --input <inputDir> \
  --output <outputDir> \
  --codec [flac|alac|aac|wav|mp3|opus] \
  [--ipod] \
  [--ffmpeg /opt/homebrew/bin/ffmpeg] \
  [--dry-run]

examples

npx podhnologic \
--input "/path/to/input" \
--output "/path/to/output" \
--ipod
npx podhnologic \
--input "/path/to/input" \
--output "/path/to/output" \
--codec alac
npx podhnologic \
--input "/path/to/input" \
--output "/path/to/output" \
--ipod \
--ffmpeg "/opt/homebrew/bin/ffmpeg"

node.js Installation

Follow the instructions for your operating system to install Node.js

ffmpeg Installation

Follow the instructions for your operating system to install FFmpeg:

tips

For iPod, just use --ipod (256-kbps AAC) and be done with it.

  • battery life
    • less storage accesses / wake ups
    • hardware is optimized for decoding aac
  • storage
    • files are significantly smaller
  • transparent
    • 256 AAC is not lossless, but it is transparent
      • If you can tell the difference and care about that difference then, by all means, --codec alac is for you

disclaimer

This software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement. In no event shall the authors be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software.