podhnologic
v2.0.4
Published
converts your music collection to another format; e.g. iPod
Downloads
17
Maintainers
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
: 128kbpsmp3
: 320kbpswav
: 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
, andlyrics
- 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:
- Linux: Install FFmpeg on Linux
- Windows: Install FFmpeg on Windows
- macOS: Install FFmpeg on macOS
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
- If you can tell the difference and care about that difference then, by all means,
- 256 AAC is not lossless, but it is transparent
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.