Files batch-convert mit Quicktime?!?

Xcell

Mitglied
Thread Starter
Dabei seit
08.07.2004
Beiträge
50
Reaktionspunkte
0
Hi,
ich habe gerade bei version-tracker nach nem Audio Batchconverter gesucht, hab mir dann aber gedacht - moment, das muss doch eigentlich mit nem Script und Quicktime gehen...
Folgendes will ich machen:
• Ordner auswählen
• Die Files die darin enthalten sind mit Quicktimer exportieren
• einmal das Format angeben (könnten auch verschiedene Scripts sein)
• Exportieren in neu angelegten Ordner

Ehrlichgesagt komme ich nicht besonders weit. Das hab ich:

tell application "QuickTime Player"
activate
end tell

wow ;-) Ich denke ich brauche noch folgendes:
can export v: um festzustellen, ob ich überhaupt exportieren kann
export reference: geht hier ein Folder?
export to: geht hier auch ein Folder? und kannn ich den auch dabei anlegen?
export as: eigentlich immer wave, aber mal 32kHz, mal 44.1 mal 48, oder 8Bit 16 Bit oder 24 (eins würde erstmal reichen, können ja wiegesagt auch mehrere Scripts sein)

Ich denke das wars. Was muss ich tun? Ich weiß super Frage...
Für Hilfe wäre ich sehr dankbar!
Grüße aus Mainz,
Xcell
 
Ciao Xcell,
folgender Code ist aus einem Archiv-Script recycelt, sollte Dir helfen, um einen Einstieg zu erhalten. Den Feinschliff mußt Du dann selbst übernehmen...
Das Script ist ein "Droplet"; als Application speichern und die Soundfiles draufziehen:
PHP:
on open myFiles
	tell application "QuickTime Player"
		display dialog "Choose export format for the selected files:" buttons {"Cancel", "AIFF", "WAV"}
		if button returned of the result = "AIFF" then
			set theFormat to AIFF
		else if button returned of the result = "WAV" then
			set theFormat to wave
		end if
		
		set theFolder to choose folder with prompt "Choose the destination folder for the exported files:"
		
		if theFormat = AIFF then
			my AIFFexport(myFiles, theFolder)
		else if theFormat = wave then
			my WAVexport(myFiles, theFolder)
		end if
	end tell
end open

on AIFFexport(myFiles, theFolder)
	repeat with aFile in myFiles
		tell application "Finder"
			set theFileName to name of aFile as string
			tell application "QuickTime Player"
				activate
				open aFile as alias
				set nameNewFile to (theFolder & theFileName & ".aiff") as string
				export movie 1 to file nameNewFile as AIFF
				close movie 1
			end tell
		end tell
	end repeat
end AIFFexport

on WAVexport(myFiles, theFolder)
	repeat with aFile in myFiles
		tell application "Finder"
			set theFileName to name of aFile as string
			tell application "QuickTime Player"
				activate
				open aFile as alias
				set nameNewFile to (theFolder & theFileName & ".wav") as string
				export movie 1 to file nameNewFile as wave
				close movie 1
			end tell
		end tell
	end repeat
end WAVexport
Frohes scripten
Farid
 
Zurück
Oben Unten