• 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: Get length of audio/video files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get length of audio/video files


  • Subject: Re: Get length of audio/video files
  • From: Alex Zavatone <email@hidden>
  • Date: Mon, 24 Oct 2011 14:14:06 -0500

The QuickTime Player dictionary states that you can get the duration of a file.  The result is returned in seconds.

I'd ask the user to choose a directory
get the number of files in the directory
Loop through all the files
    Open the file
    get the duration and write the file name and the duration to two separate lists
end loop
Loop through the lists and create a text string in the desired format.
Write the file to disk or open TextEdit, create a new document and enter the text there.

I'll see if I have time to put this together, but I may not.


I would not get the entire directory file list through Applescript because it is very slow.  You can do it through a shell script though with good speed.


On Oct 24, 2011, at 1:52 PM, Bob Majors wrote:

> Before I dive in, I thought I'd ask if anyone here has AppleScript code (and/or an Automator Workflow) that would walk through a folder of audio or video files (.aif or .mov for audio; .mov for video), get their length (and perhaps other information (encoding?)), then write out the filename and length to a structured text file. Thanks.
>
> Bob _______________________________________________
> 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/archives/applescript-users
>
> This email sent to email@hidden

 _______________________________________________
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/archives/applescript-users

This email sent to email@hidden

References: 
 >RE: Re: (no subject)That (From: email@hidden)
 >Re: (no subject)Thatinteract with alerts (From: Dana Hill <email@hidden>)
 >Re: (no subject)Thatinteract with alerts (From: Shane Stanley <email@hidden>)
 >Re: (no subject)Thatinteract with alerts (From: Alex Zavatone <email@hidden>)
 >Re: (no subject)Thatinteract with alerts (From: Shane Stanley <email@hidden>)
 >Re: (no subject)Thatinteract with alerts (From: Alex Zavatone <email@hidden>)
 >Re: (no subject)Thatinteract with alerts (From: Shane Stanley <email@hidden>)
 >Re: (no subject)Thatinteract with alerts (From: Alex Zavatone <email@hidden>)
 >Re: (no subject)Thatinteract with alerts (From: Shane Stanley <email@hidden>)
 >Re: (no subject)Thatinteract with alerts (From: email@hidden)
 >Get length of audio/video files (From: Bob Majors <email@hidden>)

  • Prev by Date: Re: Get length of audio/video files
  • Next by Date: Re: Get length of audio/video files
  • Previous by thread: Re: Get length of audio/video files
  • Next by thread: Re: Get length of audio/video files
  • Index(es):
    • Date
    • Thread