Mountain Lion Conversion Script and Console

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
Deleted User 792

Mountain Lion Conversion Script and Console

Post by Deleted User 792 »

I have been using the following script and plist file to batch convert files for a couple years. I am now using the 10.8 GM and when running the script I get no output to the console. Is there a command I can add to send the info to the console or something new I need to do? I would even take a terminal pop up window to see the stats. I am using HB 0.9.5 on a 2009 MBP.

script

Code: Select all

#!/bin/bash


SOURCE_DIR=/Volumes/Macintosh\ HDD/xTemp/Encodes/Start/
OUTPUT_DIR=/Volumes/Macintosh\ HDD/xTemp/Encodes/Converted/
PROCESSED_DIR=/Volumes/Macintosh\ HDD/xTemp/Encodes/Done/


cd "$SOURCE_DIR"

ls * | while read FILE

do
    if ( [ ! -N "$FILE" ] )
    then
        # nicefile=`echo $FILE | sed -e 's/,//'`
	nicefile=`echo $FILE | sed -e 's/\..\{3,4\}$//'`

/applications/handbrakecli -i "$FILE" --main-feature -o "$OUTPUT_DIR/$nicefile.m4v" --preset="Universal" 

       mv "$FILE" "$PROCESSED_DIR"
     else
            file "$FILE" > /dev/null
            sleep 1000
        fi
    done
    if [ -e .DS_Store ]  # so this script doesn't run like crazy if you click around in SOURCE_DIR
    then
        rm -f .DS_Store
   fi

plist

Code: Select all

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
            <key>Label</key>
            <string>hb_encode</string>
            <key>Program</key>
            <string>/Users/jerry/documents/scripts/Handbrake/hb_encode.sh</string>
            <key>ProgramArguments</key>
            <array>
                    <string>/Users/jerry/documents/scripts/Handbrake/hb_encode.sh</string>
            </array>
            <key>QueueDirectories</key>
            <array>
                    <string>/volumes/macintosh hdd/xtemp/encodes/Start/</string>
            </array>
                </dict>
    </plist>
Post Reply