惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Latest news
Latest news
T
Troy Hunt's Blog
V
Vulnerabilities – Threatpost
L
LINUX DO - 热门话题
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Simon Willison's Weblog
Simon Willison's Weblog
V
V2EX
博客园 - 司徒正美
B
Blog RSS Feed
AWS News Blog
AWS News Blog
MyScale Blog
MyScale Blog
Scott Helme
Scott Helme
Cisco Talos Blog
Cisco Talos Blog
Last Week in AI
Last Week in AI
NISL@THU
NISL@THU
博客园 - Franky
P
Proofpoint News Feed
博客园_首页
C
CERT Recently Published Vulnerability Notes
雷峰网
雷峰网
S
Schneier on Security
P
Proofpoint News Feed
Hugging Face - Blog
Hugging Face - Blog
G
GRAHAM CLULEY
博客园 - 三生石上(FineUI控件)
月光博客
月光博客
WordPress大学
WordPress大学
The Hacker News
The Hacker News
T
Threatpost
阮一峰的网络日志
阮一峰的网络日志
A
Arctic Wolf
Microsoft Azure Blog
Microsoft Azure Blog
T
The Exploit Database - CXSecurity.com
Engineering at Meta
Engineering at Meta
罗磊的独立博客
T
The Blog of Author Tim Ferriss
D
Darknet – Hacking Tools, Hacker News & Cyber Security
I
Intezer
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
K
Kaspersky official blog
SecWiki News
SecWiki News
云风的 BLOG
云风的 BLOG
美团技术团队
C
Cybersecurity and Infrastructure Security Agency CISA
博客园 - 【当耐特】
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Security Latest
Security Latest
C
Cyber Attacks, Cyber Crime and Cyber Security
B
Blog
S
Security Affairs

Cyberia

排印演进 - Cyberia EAC相关工具集合 - Cyberia 《C(金钱掌控)》观后感 - Cyberia C#在Windows UI开发中的衰落 - Cyberia 存储退潮 字体padding计算器 开源已死 如何写出优雅完整的音频元数据 自动化EAC音频抓取 起夜级家庭网络正在变得越来越重要 优化Powershell的启动时间 无JavaScript其实没有很重要 你不需要一个电纸书阅读器 文件分享的难题 为什么我不敢看都市 某科学的 SSH 算号指南 时代的辉夜姬 为什么 Pixi 是神 关于神椿的过去,当下以及未来,我的一点看法 Tahoe 的图标令人难评 The EVE of PUSHING LIMITS 在 Word 中通过制表符实现居中对齐等操作 编码之殇:前 Unicode 时代的 WAV 处理 sHELL 即地狱 WR1800K AX NAND 路由器刷入 Immortalwrt 一个 PWM 的世界 沉痛悼念复选框同志 字体焕新 独立博客自省问卷15题 答一答 解决 Visual Studio Code 内终端启动报错问题 (1) 简评《鱿鱼游戏》 Sword Art Online,以及它带来了什么 解决 Visual Studio Code 内终端启动报错问题 2024 年度总结 轻小说重度依赖 铃音之后 解决部分应用在 Windows 平台下端口被随机占用的问题 计算机科学中最困难的事:居中 宿舍场景下多人共用路由器下流量分流实践 Extra Decal Pre Processor 解决 MultiMC 无 Forge 版本的 Optifine 安装问题
自动化处理 Amazon Music 文件 MD5 不一致问题
Nullpinter · 2024-05-01 · via Cyberia

当你从某些特殊渠道拿到Amazon Music的音频文件的时候,你会发现其Hi-Res FLAC文件md5与其他平台售卖版本不同,这是因为其前面有空采样。因此只需去除空采样即可达到“Bit Perfect”。故写这一脚本自动化处理具有错误md5的文件。

# This code is distributed under the Apache 2.0 License.

# author: nptr

$files = Get-ChildItem -Recurse -Filter *.flac | Select-Object FullName, BaseName

$files | ForEach-Object {

$fullName = $_.FullName

$fileName = $_.BaseName

Write-Host Processing $fileName

$flag = metaflac --show-tag=BP $fullName

$res = metaflac --show-sample-rate $fullName

$skip = 0

switch ($res) {

44100 { $skip = 286 }

48000 { $skip = 312 }

96000 { $skip = 624 }

192000 { $skip = 1248 }

Default { $skip = 0 }

}

if ($flag -ne "BP=1") {

Write-Host SampleRate: $($res / 1000)kHz, skip $skip

if ($skip -ne 0) {

flac -8 --skip=$skip -f $fullName

metaflac --set-tag=BP=1 $fullName

}

}

else {

Write-Host Skipping $fileName

}

}

用到了PowerShell7以及metaflac,相信聪明的你能够解决这两个问题。