方法一: 在项目开发过程中,需要获取音视频文件时长.查询资料后发现 JAVE能够完美得到想要的结果,JAVE项目简介如下: The JAVE (Java Audio Video Encoder) library is Java wrapper on the ffmpeg project. Developers can take take advantage of JAVE to transcode audio and video files from a format to another. I
在开发一个web项目时,需要获取MP3的播放长度.上网找了一些方法,最后找到了一个可以用的java包jaudiotagger-2.2.3.jar,java包网址http://www.jthink.net/jaudiotagger/ 然后附上网上cope的一段代码 public static int getMp3TrackLength(File mp3File) { try { MP3File f = (MP3File)AudioFileIO.read(mp3File); MP3AudioHe
setTimeout(function () { var vid = document.getElementById("videoIntro"); var currentTime=vid.currentTime.toFixed(1); if(currentTime==1.2){ //触发 return false; } console.log(currentTime); getvideoprogress(); }, 1000); function getvideoprogress(
1 Shell32 //添加引用:COM组件的Microsoft Shell Controls And Automation //然后引用 using Shell32; //如果出现“无法嵌入互操作类型 请改用适用的接口”报错————修改引用里面的shell32属性嵌入互操作类型改为false public static string GetMP3FileDurationAll(string fileName) { ShellClass sh = new ShellClass(); Folder