Category: Uncategorized

  • Installing Apple Pro Video formats for QuickLook without FCP/Motion using Pacifist

    In order to use certain Pro video codecs on Mac – you need to use Apple’s Pro Video Format’s installer – (version 2.03 available here – or click here to google search for the latest version when this post is outdated) – however – there’s a catch!

    Screen Shot 2015-10-02 at 4.11.19 PMIf you don’t have Final Cut Pro, Motion or Compressor (all paid apps) – you won’t be able to install them. This means you can’t use:

    • Apple Intermediate Codec
    • Apple ProRes
    • AVC-Intra
    • DVCPRO HD
    • HDV
    • XDCAM EX / HD / HD422
    • MPEG IMX
    • Uncompressed 4:2:2

    These codecs are necessary for use in third party apps such at the 64bit version of VDMX, or with Adobe Premiere or After Effects. If you install them, they will also enable the ability to view Pro Video codecs with QuickLook and Quicktime Player X – so convenient – surely there must be a way to pull them out of the installer without paying for the Pro Apple Apps?

    Enter Pacifist – this piece of software lets you extract elements out of the .pkg installer files that come with some software.

    1. Download Pacifist
    2. Open the ProVideoFormats.pkg found in the dmg you downloaded from Apple
    3. Once open, you can see that the package contains everything you needScreen Shot 2015-10-02 at 4.19.48 PM
    4. Now you can just select the top option “Contents of ProVideoFormats.pkg” and then click “Install” in the upper left and it will install it in the intended locations.

     

     

    And that’s it! Now you should be able to use Pro Res and other pro formats in Quicktime Player X and QuickLook.

  • Memory Leak Murderer

    A theoretically useful, but dangerous shell script for use on OS X…proceed with caution.

    Now of course you always do a solid job on your programming, but maybe you didn’t have enough time to find all the memory leak bugs that start to appear a few days into your installation. Something that only appears up after your software loops through 100 times is a much harder thing to deal with than something that shows up every single time. Sometimes you need a hot fix if you’re not able to find the true cause on short notice.

    The following is a script that you’ll need to modify for your own uses, but this is essentially what it does: When set to run automatically (cron job or lingon), it checks your computer’s processes every so often to check their memory usage. If an application suddenly shoots over the memory usage threshold, this script quits the leaky app, and then re-opens it…hopefully freeing up leaked memory and allowing the computer to run for a longer period.

    Sometimes apps that have leaked too much can grind your computer to a halt and even your other automatic scripts can have a hard time running, so this can work as an early warning system. This could even be modified to email you if your app goes over a specified memory amount.

    Thanks to Patricio Gonzalez Vivo for the help with the regular expressions and logic/formatting syntax in the shell scripting

    Again, test ahead of time if possible:

    #!/bin/sh
    #Script to reboot application after crossing memory usage threshold
    #Can be used in conjunction with Lingon or a Cron to run on a periodic basis, e.g. every 2 minutes.
    #Version 1.0 written by Daniel Mare from http://hintsforums.macworld.com/showthread.php?p=592991
    #Date: 02/08/2010
    #Modified by Blair Neal 11_27_2012 http://www.blairneal.com
    #Helpful shell scripting additions from Patricio Gonzalez Vivo http://www.patriciogonzalezvivo.com/
    
    MEM_THRESHOLD=6 #INTEGERS ONLY If any process uses more MEM (in percentage of total MEM) than this threshold, the application will be rebooted
    #Say you have 8gb of RAM, then a process that is using 2gb or more would be using 25%
    
    #test is MEM usage is excessive
    MEM_LINE=$(ps wwaxm -o %mem,command | head -2 | tail -1) #Output from ps showing the TOP app that is using the most memory
    MEM_USAGE=`echo $MEM_LINE | sed 's/ .*//'` #Strip off the numbers from above output
    MEM_USAGE=${MEM_USAGE/.*} #Truncate decimals - bash only compares integers TODO: incorporate this line into one above
    
    if [ $MEM_USAGE -gt $MEM_THRESHOLD ] ; then
        #echo "Original line: " $MEM_LINE | sed -e 's/.*///' 
        MEM_PROCESS=`echo $MEM_LINE | sed -e 's/.*///'` #this is the process name, used to kill the app later
        MEM_FORMATTED=`echo $MEM_LINE | sed -e 's/.*///' | sed 's/ -psn_[0-9]_[0-9]*/.app/' | sed 's/ //g'` #Get the name of process that triggered this alert, strip off the -psn and ID numbers and delete all spaces so it can be compared with your app name. Could be more elegant, but gets the job done!
        echo "Memory leak threshold exceeded by this process: " $MEM_FORMATTED
        echo $MEM_FORMATTED "It was using this percentage of memory: " $MEM_USAGE
    
        if [ $MEM_FORMATTED == "Twitter.app" ]; then #make sure you're killing your own app, not something else important like a system process
            echo "Closing Leaky App " $MEM_PROCESS
            killall $MEM_PROCESS
        else
            echo "This is not the leaky process you're looking for!" #Your app wasn't the culprit
        fi
    else
        echo "All is well! Your app is not using too much memory."
    fi
    
    sleep 15 #Wait 15seconds (arbitrary) for everything to close out before restarting
    
    #Now check and see if your app is closed out, and if it isn't then re-open it
    if [ $(ps ax | grep -v grep | grep "Twitter.app" | wc -l) -eq 0 ] ; #Replace Twitter.app with your own app's name
        then
        echo "YourAppName not running. Opening..."
        open /Applications/Twitter.app
    else
        echo "YourAppName running"
    fi

    You could also set it to open an Automator Script or an Applescript to do whatever it is you need run instead of having it just close and open your app.

    P.S. I’ve found Firefox is a really good tester if you need something that gobbles up memory quickly 🙂

  • Warm-up Exercise for a Visualist

    Enter a pitch black room. Bring nothing inside with you.

    1. Using just your body, make every kind of sound you can think of. Use you hands, feet, and voice or interact with the room itself. Careful, it’s dark in there.

    2. Using just your body, light up the room.

    The exercise is finished when you have generated enough light to find your way out of the room.

  • Mysl

    Mysl
    Spring 2006
    Custom Hardware+Max/MSP

    Using a BASIC Stamp, three distance sensors, and a gutted Mac Classic, I developed an interface to use with my Max/MSP looping patch. The distance sensors on either side controlled a stereo delay time. The loops and type of delay were controlled by a midi footpedal. The BASIC stamp actually output MIDI data and could be hooked up to any MIDI controllable device.

    Making this interface allowed me to experience working with musical elements in a new context and allowed for certain gestural controls not possible with other interfaces. As with any new instrument, this one required some practice to get a hold of, and I’m not sure I ever quite got it, because the distance sensors were very odd things to work with, due to the lack of force feedback (which I tried to remedy by using old vinyl records as controllers). Something to be revisited in the future though.