• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Durations of mp3 files?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Durations of mp3 files?


  • Subject: Re: Durations of mp3 files?
  • From: Mr Tea <email@hidden>
  • Date: Thu, 07 Dec 2006 20:14:51 +0000

This from Luther Fuller - dated 7/12/06 7.20 pm:

> Both QuickTime Player and iTunes contain a 'duration' command.

...and I think you probably have to open the file to use it.

QuickTime Player might be the way to go. I knocked this up in a couple of
minutes and got a usable result.

tell application "QuickTime Player"
 open alias "Shed!:iTunes Music:Slam:Warparty D & House AB:Positive
Education.mp3"
 set theLength to round (duration of movie of window 1) / 600
 set trackname to name of window 1
 close window 1
end tell
set {theMinutes, theSeconds} to {theLength div 60, theLength mod 60}
set showTime to trackname & " - " & theMinutes & ":" & theSeconds

--> Positive Education - 6:32

I'm sure this could be adapted/tidied up and made into a useful droplet or
script menu item for the purposes of the OP.


Nick
pp Mr Tea

--

Brew of the day: [ibid]



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Durations of mp3 files?
      • From: "Steven D. Majewski" <email@hidden>
References: 
 >Re: Durations of mp3 files? (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: Getting started with XML?
  • Next by Date: Re: Durations of mp3 files?
  • Previous by thread: Re: Durations of mp3 files?
  • Next by thread: Re: Durations of mp3 files?
  • Index(es):
    • Date
    • Thread