Automate conversion, send to iTunes?

HandBrake for Mac support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
gianthobbit
Posts: 4
Joined: Thu Oct 07, 2010 7:07 pm

Automate conversion, send to iTunes?

Post by gianthobbit »

Is there any way to have Handbrake monitor a folder for new files and then automatically convert them and send them to iTunes?
mduell
Veteran User
Posts: 8207
Joined: Sat Apr 21, 2007 8:54 pm

Re: Automate conversion, send to iTunes?

Post by mduell »

Gee, if only there were dozens of other posts on watch folder automation...
lowlight
Posts: 3
Joined: Thu Sep 30, 2010 11:17 pm

Re: Automate conversion, send to iTunes?

Post by lowlight »

I've tried 2 potential solutions, Breakfast and Transcode machine. Neither of them have worked for me. If there are that many threads, could please point us to something that answer the question? I've searched and can't find anything.

Thanks,
Rob
gianthobbit
Posts: 4
Joined: Thu Oct 07, 2010 7:07 pm

Re: Automate conversion, send to iTunes?

Post by gianthobbit »

Just spent the better part of 2 hours trying to find something. To my knowledge there is no commercial product to do this and most of the open source attempts are no longer around. I did a search on this forum and found nothing (stickies would go a long way here) and a Google search produces nothing but results for DropFolders (a AIR app that is not fully mac supported yet).

Would be much appreciated if someone could point me in the right direction or just to give up on this altogether, thanks much.
mduell
Veteran User
Posts: 8207
Joined: Sat Apr 21, 2007 8:54 pm

Re: Automate conversion, send to iTunes?

Post by mduell »

Let me Google that for you:
Watch folder
Send to iTunes
gianthobbit
Posts: 4
Joined: Thu Oct 07, 2010 7:07 pm

Re: Automate conversion, send to iTunes?

Post by gianthobbit »

Ok, those results are not really what I am looking for, this is kind of frustrating.

Could someone just list the name a mac app that will do what I am looking for, I am honestly doing the searching and digging but coming up with nothing...
jmdpc
Posts: 1
Joined: Thu Sep 30, 2010 2:43 pm

Re: Automate conversion, send to iTunes?

Post by jmdpc »

I have a folder action I downloaded from somewhere and modified slightly. It takes a while. So any changes would be appreciated, but it does work. I then use HAzel to add the files to itunes.

on adding folder items to thisFolder after receiving theitems


with timeout of 10000000 seconds
try
--repeat the command to compress each item as an individual archive

repeat with oneItem in theitems
tell application "Finder"
--used to extract the name and location of the file
set itemProp to properties of oneItem
--where the file is
set sourceFile to quoted form of POSIX path of oneItem
--where the compressed file should end up
set destFold to quoted form of POSIX path of ¬
(container of itemProp as alias)
--what the name of the file is

--set extension hidden of oneItem to true
if extension hidden of oneItem then
set itemName to displayed name of oneItem
else
set extension hidden of oneItem to true
set itemName to displayed name of oneItem
set extension hidden of oneItem to false
end if

set itemExtension to name extension of oneItem
--set itemBody to name body of oneItem

--display dialog itemExtension

set tmpFile to "conversion_output.tmp"
end tell
--display dialog destinationFile
set wasError to false

try
--Convert Movie
--set ConvertMovieCmd to "nice /Applications/HandBrakeCLI -i " & sourceFile & " -o " & tmpFile & " --preset=\"High Profile\" ;"
set ConvertMovieCmd to "nice /Applications/HandBrakeCLI -i " & sourceFile & " -o " & tmpFile & " -f mp4 -4 -X 1280 --loose-anamorphic -e x264 -q 20 -a 1,1 -E faac,ac3 -6 dpl2,auto -R 48,Auto -B 160,auto -D 0.0,0.0 -x cabac=0:ref=2:me=umh:b-pyramid=none:b-adapt=2:weightb=0:trellis=0:weightp=0 -v 1 ;"










--display dialog ConvertMovieCmd
do shell script ConvertMovieCmd

--short pause before copy
delay 10

--Replace Original
set ReplaceOriginalCmd to "mv -f " & tmpFile & " " & destFold & "'" & itemName & ".m4v" & "'"
--display dialog ReplaceOriginalCmd
do shell script ReplaceOriginalCmd

--Tag file with green label

on error errmsg
--should conversion or copy fail display error message and continue with next file
--display dialog errmsg

--Tag file with red label
set wasError to true

end try

tell application "Finder"

if wasError then
set label index of oneItem to 2
else
set label index of oneItem to 6
end if


end tell

end repeat

on error errmsg
--should anything go wrong let the user know
display dialog errmsg
end try
end timeout
end adding folder items to
gianthobbit
Posts: 4
Joined: Thu Oct 07, 2010 7:07 pm

Re: Automate conversion, send to iTunes?

Post by gianthobbit »

Hmm that looks pretty intense, I guess I am just really surprised they dont have a pre made solution out there for this...
Post Reply