Editing w/QuickTime Player (not Pro)
Editing w/QuickTime Player (not Pro)
- Subject: Editing w/QuickTime Player (not Pro)
- From: "Pepper, Rick G. (CCC)" <email@hidden>
- Date: Mon, 17 Mar 2003 13:21:26 -0600
I'm running OS 9.2.2, QuickTime 5.0.2, and I keep getting an error 2302 with
this code on the "clear" line.
on open strFilePath
set strFilePath to strFilePath as text
tell application "QuickTime Player"
open strFilePath
set strTime to duration of movie 1
select movie 1 at 0 to 100
clear movie 1
export movie to file "Scratch:test.aif" as AIFF with replacing
close every window saving no
end tell
end open
How else can I cut out a selection. I want to adapt this to breaking longer
files into smaller pieces. So, I may take a 40 minute AIFF and chop it into
4 - 10 minute chunks.
Thanks,
Rick
>
----------
>
Subject: Re: Batch MP3 Editing
>
From: Mr Tea <email@hidden>
>
To: AS Users <email@hidden>
>
>
This from Michael D. Atella - dated 17-03-03 07758am:
>
>
> OK, a bit of an under-whelming response to my question, so let me ask a
>
> different question that could also solve the same problem:
>
>
>
> Is it possible to use Finder scripting to drag files one at a time into
>
an
>
> open window of a non-scriptable application? And also use the finder to
>
> type commands, like command-S, command-V, command-C, etc? I know
>
QuickKeys
>
> used to do this kind of thing (dragging), but as far as I know,
>
AppleScript
>
> doesn't let you script a file drag.
>
>
That's right. The nearest it comes is 'open x using y' where x is a
>
document
>
and y is the app file you want to open it with. And no. You can't script
>
key
>
presses with plain AppleScript.
>
>
Like Emmanuel, I was going to suggest that you try using QuickTime (Pro)
>
to
>
achieve your ends, but a glance through QT Player's export options
>
suggests
>
that it can't save the amended file as an MP3. But you could still use QT
>
as
>
a staging post, then reconvert the file with iTunes.
>
>
Here's a (very) rough script demonstrating how to achieve the goal you
>
stated in your original message. This just works on one file (so you can
>
test it without too much grief). To make it work on a folder, you'll need
>
to
>
change the 'choose file' command to 'choose folder', and wrap the
>
cut&paste
>
section of the script in a repeat loop. This assumes that you want the
>
tracks cut exactly in half and the same ad appended to each. (NB - This
>
was
>
written and tested in OS X, but I don't think I've included anything that
>
will break in OS 9)
>
>
set theAd to alias [path to the file whose contents you want to paste at
>
the
>
end of your edited mp3]
>
choose file with prompt "Select a track to work on:" returning theTrack
>
tell application "QuickTime Player"
>
open theAd
>
tell movie 1
>
select all
>
copy
>
close
>
end tell
>
open theTrack returning currentTrack
>
set theTime to duration of currentTrack
>
select currentTrack at theTime / 2 to theTime
>
tell currentTrack
>
clear
>
set current time to theTime / 2
>
paste
>
end tell
>
set theTempFile to (theDest & "X-" & name of currentTrack)
>
export currentTrack to file theTempFile as AIFF with replacing
>
close every window saving no
>
end tell
>
>
tell application "iTunes"
>
convert alias theTempFile returning newMP3Ref
>
set newMP3 to location of item 1 of newMP3Ref
>
end tell
>
>
tell application "Finder"
>
delete alias theTempFile
>
make new alias file to newMP3 at alias theDest
>
end tell
>
>
>
HTH
>
>
>
Nick
>
pp Mr Tea
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.