I was doing this yesterday and downloaded that nightly build.
I do get a successful conversion, I watch handbrakeCLI in the activity monitor and once complete I get the growl notification that it successfully completed although it does not get colored. If I leave this new m4v file for a few minutes this is when I get a second growl notification that it successfully completed the conversion and the same file turns yellow but is only a second long. In activity monitor, handbrake is not running during this time once it completes the initial conversion....very strange.
I will run a few more and post some logs.
I tried running it as a separate script, as an embedded script in Hazel removing the first and last lines and even tried substituting the first and last lines with 'try' per one of the posts and all have the exact same result.
Edit: Here's the Hazel log.
The watched folder is called Temp.
The file being converted is dailyshowtrimmed.
At 14:43:15 the first conversion completes and I get the m4v file.
Four minutes later it looks like then try's to process the new m4v file.
No idea why it's looking for Adobe Unit Types or Flock files....
- Code: Select all
Sunday, December 19, 2010 2:42:37 PM America/New_York
2010-12-19 14:42:45.576 (null)[0] DEBUG: Program is licensed.
2010-12-19 14:42:45.586 hazelfolderwatch[13658] DEBUG: Error reading file /Users/bikerlee/Library/Application Support/Flock/profiles.ini: Error Domain=NSCocoaErrorDomain Code=260 UserInfo=0x10210d0d0 "The file “profiles.ini” couldn’t be opened because there is no such file." Underlying Error=(Error Domain=NSPOSIXErrorDomain Code=2 "The operation couldn’t be completed. No such file or directory")
2010-12-19 14:42:45.594 hazelfolderwatch[13658] DEBUG: Could not resolve alias. Old path: (null) Error: -50
2010-12-19 14:42:45.594 hazelfolderwatch[13658] DEBUG: Could not resolve alias. Old path: (null) Error: -50
2010-12-19 14:42:45.594 hazelfolderwatch[13658] DEBUG: Initialized
2010-12-19 14:42:45.594 hazelfolderwatch[13658] DEBUG: Pausing to wait for things to settle down.
2010-12-19 14:42:47.594 hazelfolderwatch[13658] DEBUG: Processing directories: (
"/Users/bikerlee/Movies/temp"
)
2010-12-19 14:42:47.594 hazelfolderwatch[13658] DEBUG: About to process directory /Users/bikerlee/Movies/temp
2010-12-19 14:42:47.597 hazelfolderwatch[13658] dailyshowtrimmed.mov: Rule Convert to iphone matched.
2010-12-19 14:42:47.597 hazelfolderwatch[13658] DEBUG: New rule signature. Executing actions.
Old signature: (null)
New Signature:{typeObject isType: "public.movie"}:{(applescript:f49564a19656af1646fe436e7a249932,{
})}
2010-12-19 14:42:47.616 hazelfolderwatch[13658:903] Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found. Did find:
/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: mach-o, but wrong architecture
2010-12-19 14:43:13.763 hazelfolderwatch[13658] DEBUG: AppleScript executed successfully with file /Users/bikerlee/Movies/temp/dailyshowtrimmed.mov. Result: <NSAppleEventDescriptor: 'null'()>
2010-12-19 14:43:13.763 hazelfolderwatch[13658] DEBUG: Action changed file: dailyshowtrimmed.mov
2010-12-19 14:43:13.764 hazelfolderwatch[13658] DEBUG: Writing out DB file: /Users/bikerlee/Movies/temp
2010-12-19 14:43:13.765 hazelfolderwatch[13658] DEBUG: Directory /Users/bikerlee/Movies/temp processed.
2010-12-19 14:43:13.765 hazelfolderwatch[13658] DEBUG: Sleeping
2010-12-19 14:43:15.766 hazelfolderwatch[13658] DEBUG: Done
hazelfolderwatch: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" declares no loadable handlers.
2010-12-19 14:47:09.735 (null)[0] DEBUG: Program is licensed.
2010-12-19 14:47:09.745 hazelfolderwatch[13664] DEBUG: Error reading file /Users/bikerlee/Library/Application Support/Flock/profiles.ini: Error Domain=NSCocoaErrorDomain Code=260 UserInfo=0x100738fe0 "The file “profiles.ini” couldn’t be opened because there is no such file." Underlying Error=(Error Domain=NSPOSIXErrorDomain Code=2 "The operation couldn’t be completed. No such file or directory")
2010-12-19 14:47:09.754 hazelfolderwatch[13664] DEBUG: Could not resolve alias. Old path: (null) Error: -50
2010-12-19 14:47:09.754 hazelfolderwatch[13664] DEBUG: Could not resolve alias. Old path: (null) Error: -50
2010-12-19 14:47:09.754 hazelfolderwatch[13664] DEBUG: Initialized
2010-12-19 14:47:09.754 hazelfolderwatch[13664] DEBUG: Pausing to wait for things to settle down.
2010-12-19 14:47:11.754 hazelfolderwatch[13664] DEBUG: Processing directories: (
"/Users/bikerlee/Movies/temp"
)
2010-12-19 14:47:11.755 hazelfolderwatch[13664] DEBUG: About to process directory /Users/bikerlee/Movies/temp
2010-12-19 14:47:11.760 hazelfolderwatch[13664] dailyshowtrimmed.m4v: Rule Convert to iphone matched.
2010-12-19 14:47:11.760 hazelfolderwatch[13664] DEBUG: New rule signature. Executing actions.
Old signature: (null)
New Signature:{typeObject isType: "public.movie"}:{(applescript:f49564a19656af1646fe436e7a249932,{
})}
2010-12-19 14:47:11.778 hazelfolderwatch[13664:903] Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found. Did find:
/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: mach-o, but wrong architecture
2010-12-19 14:47:13.341 hazelfolderwatch[13664] DEBUG: AppleScript executed successfully with file /Users/bikerlee/Movies/temp/dailyshowtrimmed.m4v. Result: <NSAppleEventDescriptor: 'null'()>
2010-12-19 14:47:13.341 hazelfolderwatch[13664] DEBUG: Action changed file: dailyshowtrimmed.m4v
2010-12-19 14:47:13.344 hazelfolderwatch[13664] DEBUG: dailyshowtrimmed.mov: Rule signature matched for rule Convert to iphone. Not executing actions.
2010-12-19 14:47:13.344 hazelfolderwatch[13664] DEBUG: Writing out DB file: /Users/bikerlee/Movies/temp
2010-12-19 14:47:13.345 hazelfolderwatch[13664] DEBUG: Directory /Users/bikerlee/Movies/temp processed.
2010-12-19 14:47:13.345 hazelfolderwatch[13664] DEBUG: Sleeping
2010-12-19 14:47:15.345 hazelfolderwatch[13664] DEBUG: Done
hazelfolderwatch: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" declares no loadable handlers.
And here's the code I have embedded in Hazel:
- Code: Select all
tell application "Finder"
try
--Set to red label to indicate processing
set label index of theFile to 2
--Assemble original and new file paths
set origFilepath to quoted form of POSIX path of (theFile as alias)
set newFilepath to (characters 1 thru -5 of origFilepath as string) & "m4v'"
--Start the conversion
set shellCommand to "nice /Applications/HandBrakeCLI -i " & origFilepath & " -o " & newFilepath & " --preset=\"Normal\" ;"
do shell script shellCommand
--Set the label to orange
set label index of theFile to 3
end try
end tell
tell application "Finder"
set movieName to name of item theFile
end tell
tell application "GrowlHelperApp"
set the allNotificationsList to {"Handbrake convert complete"}
set the enabledNotificationsList to {"Handbrake convert complete"}
register as application "Handbrake Encode Growler" all notifications allNotificationsList default notifications enabledNotificationsList icon of application "HandBrake"
notify with name "Handbrake convert complete" title "Handbrake conversion complete" description "The video \"" & movieName & "\" has been converted." application name "Handbrake Encode Growler"
end tell