Automator/Applescript help for video conversion

Discussion in 'Mac Programming' started by drewc1138, Mar 12, 2010.

  1. drewc1138 macrumors 6502

    Jun 30, 2007
    Not sure if this is the right place or not, but here goes.

    I download a few videos using Transmission from time to time, and I watch them either on my iPhone or AppleTV. Right now, what I'm having to do is wait for them to finish and drag them over into VisualHub, which converts them and automatically adds them into iTunes after conversion.

    I'd like to be able to automate this process somehow. I'd somehow like it to happen where, as soon as a file has completed downloading, it dumps over into VisualHub, where the file is converted, and then automatically imports into iTunes.

    Does anyone have a similar script, or know of a direction I can head to find one?
  2. paintstripper macrumors newbie

    Mar 13, 2010
    I don't know the specifics but here are some starting points.

    OSX provides a tool for checking if a file has changed called MAILCHECK.
    When in the terminal try this:

    When the file named testfile is changed, you will get a notification in the terminal. Another method is to use the stat command to monitor an entire directory for changes.
    stat testdir
    Gives an output similar to:
    234881029 7966131 drwxr-xr-x 5 apl staff 0 170 "Sep 4 15:40:50 2005" "Sep 4 15:47:31 2005" "Sep 4 15:47:31 2005" 4096 0 0 testdir

    As far as converting the video goes, you could either try to use automator to record your actions to convert with the program you are using. I use ffmpeg (you can find a version compiled for osx in the ffmpegX program) and use settings specifically for an iPod / iPhone - found here Link

    Then all you would have to do is wrap these up in a shell script and you are good to go.

Share This Page