public class VideoUtils extends Object
| 构造器和说明 |
|---|
VideoUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static long |
getDuration(String filePath)
得到语音或视频文件时长,单位秒
|
static long |
getDuration(String filePath,
String format)
得到语音或视频文件时长,单位秒
|
static long |
getMp4Duration(String videoPath)
获取视频文件的播放长度(mp4、mov格式)
|
static String |
getVideoFormat(String path)
得到文件格式
|
public static long getMp4Duration(String videoPath) throws IOException
videoPath - IOExceptionpublic static long getDuration(String filePath) throws IOException
filePath - IOExceptionpublic static long getDuration(String filePath, String format) throws IOException
filePath - IOExceptionCopyright © 2023. All rights reserved.