MP4,用这个可以
Dim shell As New Shell32.Shell()
Dim folder As Shell32.Folder = shell.[NameSpace](System.IO.Path.GetDirectoryName("c:\videotest.mp4"))
Dim item As Shell32.FolderItem = folder.ParseName("videotest.mp4")
msgbox(folder.GetDetailsOf(item, -1))
用这个,也可以
Dim vFileName As String = "c:\videotest.mp4"
Dim ffmpeg As String = ProjectPath & "ffmpeg.exe"
Dim p As new System.Diagnostics.Process
p.StartInfo.FileName = ffmpeg
p.StartInfo.UseShellExecute = False '关闭Shell的使用
p.StartInfo.RedirectStandardInput = True '重定向标准输入
p.StartInfo.RedirectStandardOutput = True '重定向标准输出
p.StartInfo.RedirectStandardError = True '重定向错误输出
p.StartInfo.CreateNoWindow = True '设置不显示窗口
addhandler p.ErrorDataReceived, addressof OutputCallback
p.StartInfo.Arguments = String.Concat("-i ", vfilename)
result.remove(0, result.length)
p.Start()
p.BeginErrorReadLine()
p.WaitForExit()
p.Close()
p.Dispose()
msgbox(result.Tostring)
Dim mc = System.Text.RegularExpressions.Regex.Matches(result.Tostring, "(?<=Duration:)\s(\d{2}:\d{2}:\d{2}.\d+)")
Dim s = mc(0).value
msgbox(s)
认认真真看这个帖子 http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=126485&skin=0