- @echo off
- chcp 65001 >nul
- rem 批处理保存为utf-8编码格式,需要ffmpeg ffprobe,自行修改相关路径
- rem 获取时长,创建一个同时长同名静音音频覆盖原文件
- for /f "delims=" %%i in ('dir /b /s /a-d *.mp3') do (
- for /f "tokens=1-2 delims==" %%a in ('ffprobe -loglevel 0 -show_streams "%%i" ^|find "duration="') do (
- ffmpeg -f lavfi -i anullsrc -t %%b "%%i" -y
- )
- )
- pause
复制代码
|