java.lang.Object
com.tlcsdm.core.util.AudioUtil
音频处理工具类,利用 ws.schild:jave2 处理.
WAV转MP3 ffmpeg -i input.wav -f mp2 output.mp3 MP3转WAV ffmpeg -i input.mp3 -f wav output.wav
- 作者:
- unknowIfGuestInDream
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static booleanconcatAudio(String srcPath, String targetPath, String... audios) 连接音频.static booleanconcatAudioWithCommand(String srcPath, String targetPath, String... audios) ffmpeg命令连接音频.static boolean切割音频.static ws.schild.jave.info.MultimediaInfogetMediaInfo(String sourcePath) 获取音频文件的编码信息.static boolean合并mp3音频.static boolean音频转换为mp3格式,audioPath可更换为要转换的音频格式.
-
构造器详细资料
-
AudioUtil
private AudioUtil()
-
-
方法详细资料
-
toMp3
音频转换为mp3格式,audioPath可更换为要转换的音频格式. -
getMediaInfo
获取音频文件的编码信息. -
cut
切割音频.- 参数:
srcPath- 音频源文件路径targetPath- 音频结果路径offset- 起始时间(秒)duration- 切片的音频长度(秒)
-
concatAudio
连接音频. 多个音频拼接 -
concatAudioWithCommand
ffmpeg命令连接音频. 多个音频拼接(有损耗) -
mergeMp3
合并mp3音频. 多个音频合并到一起
-