mopar003
asked on
Determining the length of an Audio File (mp3, wav, etc) via ASP
Don't know if this is possible or not, but I need to find out the length of an audio file on the server. I can get size and dimension of a JPEG, so maybe there is something out there that will do the same for an audio file. Any thoughts?
Woops, that's won't work in ASP. Try this instead:
<%
dim filesys, filename, f
Set filesys = Server.CreateObject("Scrip ting.FileS ystemObjec t")
filename = Server.MapPath("filename.m p3")
Set f = filesys.GetFile(filename)
Response.Write(f.size & " bytes")
%>
<%
dim filesys, filename, f
Set filesys = Server.CreateObject("Scrip
filename = Server.MapPath("filename.m
Set f = filesys.GetFile(filename)
Response.Write(f.size & " bytes")
%>
ASKER
I need to find the actual audio length in Minutes, seconds. Not the file size itself.
@CCongdon
That will get the size of the file, but not the length(ie 2:27 seconds of audio).
That will get the size of the file, but not the length(ie 2:27 seconds of audio).
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It's possible to not add the actual iTunes application, but merely an SDK to your system.
http://developer.apple.com/sdk/itunescomsdk.html
http://developer.apple.com/sdk/itunescomsdk.html
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Forced accept.
Computer101
EE Admin
Computer101
EE Admin
dim filesys, filename, f
Set filesys = CreateObject("Scripting.Fi
filename = Server.MapPath("filename.m
Set f = filesys.GetFile(filename)
Response.Write(f.size & " bytes")
%>