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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@flor1n4/audio-cli

v1.0.1

Published

CLI convert audio to mp3 with metadata, rename and speed control.

Readme

@flor1n4/audio-cli

CLI xử lý audio dựa trên FFmpeg: chuyển đổi định dạng, điều chỉnh tốc độ, cập nhật metadata, chuẩn hóa tên tệp và xem thông tin audio.

FFmpeg và FFprobe đã được đóng gói sẵn; không cần cài đặt riêng. Yêu cầu Node.js 18 trở lên.

Cài đặt

npm install -g @flor1n4/audio-cli

Kiểm tra sau khi cài đặt:

audio-cli --help
audio-cli --version

Windows PowerShell, macOS và Linux đều có thể dùng các lệnh dưới đây. Khi đường dẫn chứa khoảng trắng, hãy đặt trong dấu ngoặc kép.

Cách dùng

audio-cli <lệnh> <file-hoặc-thư-mục> [tùy-chọn]

Các lệnh khả dụng:

| Lệnh | Mô tả | | --- | --- | | convert | Chuyển tệp audio sang định dạng mong muốn. | | rename | Chuẩn hóa tên tệp audio. | | metadata | Cập nhật metadata mà không thay đổi codec audio. | | info | Hiển thị codec, thời lượng, bitrate, kích thước và metadata. |

Xem trợ giúp chi tiết cho từng lệnh:

audio-cli convert --help
audio-cli metadata --help

Chuyển đổi audio

# Chuyển toàn bộ file trong thư mục sang MP3 và lưu tại thư mục khác
audio-cli convert ./Novel --output ./output --album "Tiên Nghịch" --bitrate 192k

# Quét cả thư mục con, tăng tốc 1.5 lần và giữ các tệp gốc
audio-cli convert ./Novel --recursive --speed 1.5 --keep

# Xem trước kết quả mà không thay đổi tệp
audio-cli convert ./Novel --recursive --dry-run

# Xuất định dạng khác và giữ nguyên tên file
audio-cli convert ./input --ext m4a --no-clean-name --keep

Tùy chọn convert

| Tùy chọn | Mặc định | Mô tả | | --- | --- | --- | | -o, --output <dir> | Thư mục của tệp đầu vào | Thư mục lưu kết quả. | | -a, --album <name> | — | Gán tên album. | | -s, --speed <number> | 1 | Tốc độ phát; phải lớn hơn 0. | | -b, --bitrate <bitrate> | 128k | Một trong: 64k, 96k, 128k, 160k, 192k, 256k, 320k. | | -e, --ext <ext> | mp3 | Phần mở rộng đầu ra, chỉ gồm chữ và số. | | -r, --recursive | false | Quét cả thư mục con. | | -k, --keep | false | Giữ lại tệp gốc. | | -f, --force | false | Ghi đè tệp đầu ra đã tồn tại. | | --no-clean-name | — | Không chuẩn hóa tên tệp đầu ra. | | --dry-run | false | Xem trước thao tác, không chuyển đổi. | | -v, --verbose | false | Hiển thị thông tin chi tiết. |

Chuẩn hóa tên tệp

# Chuẩn hóa tên các file trong thư mục hiện tại
audio-cli rename ./Novel

# Bao gồm thư mục con; ghi đè nếu tên đích đã tồn tại
audio-cli rename ./Novel --recursive --force

Lệnh này loại bỏ ký tự không hợp lệ và chuẩn hóa tên tệp. Theo mặc định, tệp bị bỏ qua nếu tên đích đã tồn tại.

Cập nhật metadata

# Gán album và nghệ sĩ cho mọi tệp trong thư mục
audio-cli metadata ./Novel --album "Tiên Nghịch" --artist "Audio Team"

# Dùng tên tệp làm tiêu đề, bao gồm thư mục con
audio-cli metadata ./Novel --title-from-filename --recursive

Phải cung cấp ít nhất một trong các tùy chọn --album, --artist hoặc --title-from-filename.

Xem thông tin tệp

audio-cli info ./Novel/chapter-01.mp3

Định dạng đầu vào hỗ trợ

mp3, m4a, aac, wav, flac, ogg, opus, wma, aiff, alac, ape, amr, 3gp, webm.

Lưu ý an toàn

  • convert xóa tệp gốc sau khi chuyển đổi thành công, trừ khi dùng --keep.
  • Nên dùng --dry-run trước khi xử lý thư mục lớn.
  • metadata cập nhật trực tiếp tệp nguồn; nên sao lưu dữ liệu quan trọng trước khi chạy hàng loạt.
  • Khi đầu vào và đầu ra là cùng một tệp (ví dụ MP3 sang MP3), công cụ dùng tệp tạm để tránh mất dữ liệu.

License

MIT