X
Xptnlmax2
Neues Mitglied
- Dabei seit
- 25.06.2011
- Beiträge
- 7
- Reaktionspunkte
- 0
Wenn du als Preset "Itunes kompatibel" eingibst, dauert das konvertieren bei mir 4 min. (Bei 45 min 720p video)
Folgen Sie dem Video unten, um zu sehen, wie Sie unsere Website als Icon auf Ihrem Homescreen erstellen.
Anmerkung: This feature may not be available in some browsers.
on run {input, parameters}
repeat with curItems in input
set currentFolder to curItems as alias
set convertFlags to " -e x264 -q 20" as string
set doneFiles to {"#"}
tell application "System Events"
set isRunning to (count of (every process whose bundle identifier is "com.Growl.GrowlHelperApp")) > 0
end tell
tell application "Finder"
if (kind of currentFolder as string) is "Ordner" or "Folder" then
set all_Files to (every file of entire contents of currentFolder whose ((name extension is "avi" or name extension is "mp4" or name extension is "mkv") and label index is 0))
repeat with i from 1 to number of items in all_Files
try
if isRunning then
tell application id "com.Growl.GrowlHelperApp"
try
set the allNotificationsList to {"Starte Konvertierung", "Konvertierung beendet", "Fehler"}
set the enabledNotificationsList to {"Starte Konvertierung", "Konvertierung beendet", "Fehler"}
register as application ¬
"ConvertFolder" all notifications allNotificationsList ¬
default notifications enabledNotificationsList ¬
icon of application "Script Editor"
end try
end tell
end if
set currentFile to (item i of all_Files) as alias
set fileName to (name of currentFile as text)
set unixPath to POSIX path of currentFile
if (exists folder "done" of currentFolder) is false then
set doneFolder to make new folder at currentFolder with properties {name:"done"}
else
set doneFolder to (currentFolder & "done" as text) as alias
end if
set newFile to ((doneFolder as text) & (name of currentFile as text))
set newFile to (characters 1 thru -4 of newFile as string) & "m4v"
set newFileUnix to POSIX path of newFile
set shellCommand to "nice /Applications/HandBrakeCLI -i " & quoted form of unixPath & " -o " & quoted form of newFileUnix & convertFlags
if isRunning then
tell application id "com.Growl.GrowlHelperApp"
try
notify with name ¬
"Starte Konvertierung" title ¬
"Starte Konvertierung" description ¬
("Konvertiere ") & fileName & " / " & ((number of items in all_Files) - i as text) & " verbleibend" application name "ConvertFolder"
end try
do shell script shellCommand
end tell
else
do shell script shellCommand
end if
set label index of currentFile to 6
set end of doneFiles to newFile
on error errmsg
beep
delay 2
set label index of currentFile to 2
set the_log to open for access file ((currentFolder as text) & "Error.txt") with write permission
write errmsg & return to the_log starting at eof
close access the_log
if isRunning then
tell application id "com.Growl.GrowlHelperApp"
try
notify with name ¬
"Fehler" title ¬
"Fehler" description ¬
"Fehler in File " & fileName application name "ConvertFolder"
end try
end tell
end if
end try
end repeat
if ((isRunning) and (number of items in all_Files > 1)) then
tell application id "com.Growl.GrowlHelperApp"
try
notify with name ¬
"Konvertierung beendet" title ¬
"Konvertierung beendet" description ¬
"Pumpe " & ((number of items in doneFiles) - 1 as text) & " Files zu iFlicks" application name "ConvertFolder"
end try
end tell
end if
repeat with i from 2 to number of items in doneFiles
set currentFile to item i in doneFiles as alias
tell application "iFlicks"
import currentFile without gui
end tell
end repeat
end if
end tell
end repeat
return input
end run
Es gibt mittlerweile eine Anwendung: Handbrake Batch (http://www.osomac.com/apps/osx/handbrake-batch/) die macht genau das was ich brauche. Einen sequentiellen Massenkonvert mit eine ausgewählten Std Preset.