Re: Get length of audio/video files
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