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

flac2m4a

v1.1.0

Published

A CLI tool to combine .flac, .jpg, and .lrc files into a single Apple Lossless (.m4a) file.

Readme

flac2m4a 音频合并工具

这是一个命令行工具,用于将 .flac 音频文件、.jpg 封面图片和 .lrc 歌词文件合并成一个带有内嵌封面和歌词的 Apple Lossless (.m4a) 文件。

功能

  • 将 FLAC 无损音频转换为 Apple Lossless (ALAC) 无损音频。
  • 将同名的 JPG 图片作为专辑封面嵌入到音频文件中。
  • 将同名的 LRC 歌词文件作为歌词轨道嵌入,并可指定语言元数据。
  • 支持两种模式:自动扫描当前目录或手动指定文件名。
  • 无需手动安装 FFmpeg,工具会自动处理。

使用方法

将你的 .flac, .jpg, .lrc 文件放在同一个文件夹下,并确保它们的文件名(除扩展名外)完全相同。

例如:

  • 歌曲A.flac
  • 歌曲A.jpg
  • 歌曲A.lrc

然后在该文件夹中打开终端,运行以下命令。

命令

1. 自动扫描模式

直接运行命令,工具会自动查找当前目录中所有匹配的 flac 文件组并进行转换。歌词语言默认为中文 (chi)。

pnpm dlx flac2m4a

2. 手动模式

如果你只想转换特定的一首歌,可以提供一个基础文件名。

pnpm dlx flac2m4a "歌曲A"

(如果文件名包含空格,请使用引号)

选项

设置歌词语言

使用 --lang-l 标志来指定歌词的语言代码(ISO 639-2 标准的三字母代码)。

例如,将歌词语言设置为英语 (eng):

pnpm dlx flac2m4a --lang eng

或者在手动模式下使用:

pnpm dlx flac2m4a "歌曲A" -l jpn

查看帮助

pnpm dlx flac2m4a --help

推荐搭配

为了方便地获取歌曲的封面和 .lrc 格式的歌词文件,推荐使用以下 API 服务:

网易云音乐 API

你可以通过这个 API 获取直接配合本工具使用的音乐文件。