给你的gnome桌面菜单加个检测无损按钮
本帖最后由 dwzn 于 2022-4-3 17:57 编辑linux 下,gnome桌面环境,需要用到nautilus_script,
其实只要是LINUX下就能用,配合你桌面自己改就好了。
# File Name: addto-mpv.sh
# Author: Dwzn-Tom
# mail: dwznmz@gmail.com
# Created Time: 2019-12-09
#!/bin/bash
for File in "$@"
do
if [ -d "$File" ]; then
zenity --error --text="'$File' is a directory."
exit
fi
Fullname=$File
Fname=${Fullname%.${Fullname##*.}*}
Ename=${Fullname##*.}
Ename=$(echo $Ename | tr '' '')
DestEname=.wav
DestFname=
if [ $Ename = flac ] || [ $Ename = ape ] || [ $Ename = wv ]; then
ffmpeg -n -i "$File" "/tmp/$Fname$DestEname" | zenity --progress --pulsate --auto-close --title="Convter audio file to Wav for Check..." --text="Convter is processing"
if [ $? = 0 ] ; then DestFname="/tmp/$Fname$DestEname";fi
fi
if [ $Ename = wav ]; then
DestFname="$File"
fi
if [ -n "$DestFname" ]; then
#sleep 2|tee >(zenity --progress --pulsate --no-cancel --auto-close --text="Please wait...")
chkResult=`LAC "${DestFname}"`
echo $chkResult | grep Clean
if [ $? -eq 0 ]
then
zenity --info --no-markup --text="$chkResult"
else
zenity --error --no-markup --text="$chkResult"
fi
if [ "$DestFname" != "$File" ] ; then rm "${DestFname}";fi
exit
else
zenity --info --text="'$File' not is a ape|wav|wv|flac file."
fi
done
需要用到一个Lossless-Audio-Checker的无损检测工具,自己去下载LINUX下的指令行工具,链接到/bin下,因为这个工具linux下只支持WAV格式,
所以改写了一下。可以支持flac,wv,wav,ape四种格式。图个方便而已,没啥技术,
好用,谢谢!
背后逻辑有些问题,很多正版频谱完全正确会误判为Upsampled。 leonbernieni 发表于 2022-8-4 17:46
背后逻辑有些问题,很多正版频谱完全正确会误判为Upsampled。
这个哪有百分百的呢,作个参考罢了。:lol
页:
[1]