Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Length of MP3 File
#1
Is there any way to grab the duration of MP3 files?
#2
Macro
Code:
Copy      Help
str s="Q:\mp3\x.mp3"

typelib WMPLib {6BF52A50-394A-11D3-B153-00C04F79FAA6} 1.0
WMPLib.WindowsMediaPlayer w._create
WMPLib.IWMPMedia m=w.newMedia(s)
out m.duration ;;seconds
out m.durationString
#3
I tested on a MP3 and I get 0 and 0:00 in the output.

I'll try on some other MP3 files.

Thanks.
#4
If the file does not exist, the function does not throw error but length is 0.
The path must not contain $special folder$.
#5
Geeze...I didn't even think of that!

how do you toggle back to full file name...?
#6
s.expandpath


Forum Jump:


Users browsing this thread: 2 Guest(s)