Batch Encode AVI to MP4 w/ Hazel and/or Automator?

Talk, speculate, discuss, pontificate. As long as it pertains to Hazel.

Moderators: Mr_Noodle, Moderators

It kinda runs. There's a handful of things I'd like it to do, but it doesn't. It'll convert something, just not properly.

I have TV shows broken into seasons and I'd like to be able to put whole series in at a time and let it run overnight, but what ends up happening is it keeps looping and re-reencoding the files in there. It won't move to my output files. It won't move the source files into a 'waste' folder/directly to the trash. It says it's encoding to a preset I made, but the files, which should be 60-90mb smaller are actually 5-20mb larger.

When I manually load a queue in Handbrake (non-CLI) it works, but I really don't want to add 20-30 files to a queue (for some 3000 (estimated) files, to boot) just so it'll work properly. I believe the code I was able to get written is in this thread a handful of posts above.
5x5
 
Posts: 11
Joined: Fri Jul 13, 2012 10:03 pm

dhy8386 wrote:
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=\"AppleTV 3\" ;"
         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


It will convert in background and change colors when done. I am using the AppleTV 3 preset for handbrake but feel free to change it to which you want in the code.


I created my own HandBrake preset in the HandBrake application. Is there a way to use that in the applescript? I can't seem to get my custom preset to work. I've changed the name from "AppleTV 3" to "QA-LORI".
L2L
 
Posts: 6
Joined: Wed May 06, 2015 12:40 am

Previous

Return to Open Discussion

cron