Thinkai's Blog

Autohotkey|Python|php|aardio|VOIP|IT 爱好者

info := audioinfo("test.mp3")
msgbox, 64, Notice, % "The File duration is " info.duration "!"

audioinfo(file){
	ret := cmd(A_ScriptDir "\tools\ffmpeg64.exe -i """ file """") ;32位请去掉64
	if RegExMatch(ret, "Audio:\s*([^\s]+)\s*\(*[^\)]*\)*,\s*(\d+)\s*Hz,\s*([^,]+),\s*([^,]+),\s*([^,]+)\skb/s", match)
	{
		RegExMatch(ret,"Duration:(\s*[^,]+),",dur)
		return {"code":match1,"samRate":match2,"tract":match3,"dep":match4,"bitRate":match5,"duration":dur1}
	}
}



来了就留个评论吧! 1个评论




友情链接:Autohotkey中文帮助Autohotkey官网Autohotkey中文网联系作者免GooglePlay APK下载

 主题设计 • skyfrit.com  Thinkai's Blog | 保留所有权利

62 queries in 2.012 seconds |