Script to move .MOV videos off Canon EOS_Digital CF card on mount?

I use Adobe Lightroom as an integral part of my digital photography workflow, and I recently acquired a Canon EOS 5D Mark-II digital camera, which is capable of capturing 1920x1080 HD video.
The problem I am having is that Lightroom does not provide support for importing video, so every time I insert my compact flash card containing images and video captured using the 5D MKII, I am notified of videos on the card that cannot be transferred into my Lightroom database...I then have to click OK to dismiss this notification message, then I have to manually browse the card to find the movies and copy them to my computer manually...
While this might not seem like that big of an issue, I've become accustomed to this process being a completely automated, so to go back to having to perform a number of steps manually seems a bit too much like backtracking to me, so I was hoping that someone here might be able to help me automate this process via AppleScript...
*• Ideally, a script that could be executed on my "EOS_Digital" volume (my CF card's name, which will always remain the same), and will scour the contents of that volume for .MOV files, and upon finding such files, it would copy them all to my ~/Movies/ directory before then removing (deleting) them from the card completely...*
*• The CF card will also contain .THM files that correspond to the .MOV files to provide thumbnails of the .MOV files for Windows users...I would ideally like to have these moved along with the .MOV files to the ~/Movies/ directory (or trashed completely), because Lightroom give me a notification warning that they cannot be imported into the image database*
*• I would trigger the script via QuickSilver (or FastScripts, QuicKeys, etc), which I could do manually after inserting my CF card...*
I know it's a long shot that someone would be willing to help me out with this task, but any help at all would be greatly appreciated!!
Thanks so much, and I look forward to your responses!

Hello
If you are going to call the script manually when the target volume is mounted, try something like SCRIPT1.
--SCRIPT1
main()
on main()
set srcPath to "EOS_Digital:" -- # HFS path of source directory
set dstPath to (path to movies folder from user domain as Unicode text) -- # HFS path of destination directory
try
set src to quoted form of ((POSIX path of (srcPath as alias))'s text 1 thru -2)
set dst to quoted form of (POSIX path of (dstPath as alias))
on error errs number errn
display dialog errs & " " & errn with icon 2
error number -128
end try
set sh to "find " & src & " -type f \\(-iname '*.mov' -or -iname '*.thm' \\) -print0 | xargs -0 -J % mv % " & dst
do shell script sh
end main
--END OF SCRIPT1
If you want the script to be called automatically when the target volume gets mounted, try something like SCRIPT2.
You need to set up it as a Folder Action attached to /Volumes directory.
--SCRIPT2
Usage -
(1) Save this script as compiled script or script bundle in either of -
/Library/Scripts/Folder Action Scripts/
~/Library/Scripts/Folder Action Scripts/
(2) Using /Application/AppleScript/Folder Actions Setup,
enable Folder Actions for /Volumes directory and attach this script (saved in (1)) to it.
cf.
ASLG > Folder Actions Reference
http://developer.apple.com/documentation/applescript/Conceptual/AppleScriptLangG uide/
on adding folder items to da after receiving aa
set srcPath to "EOS_Digital:" -- # HFS path of source directory
set dstPath to (path to movies folder from user domain as Unicode text) -- # HFS path of destination directory
repeat with a in aa
set a to a's contents
if (a as Unicode text) = srcPath then
set src to quoted form of ((POSIX path of a)'s text 1 thru -2)
set dst to quoted form of (POSIX path of (dstPath as alias))
set sh to "find " & src & " -type f \\(-iname '*.mov' -or -iname '*.thm' \\) -print0 | xargs -0 -J % mv % " & dst
do shell script sh
end if
end repeat
end adding folder items to
--END OF SCRIPT2
Hope this may help,
H
PS. Please copy code from this web page, not from subscribed email text, for I escaped some characters for posting.
Message was edited by: Hiroto (fixed the link)

Similar Messages

  • Cannot import MOV Video off of Nikon D5100 in FCPX

    Hi.
    I just got a new Nikon D5100 wicht is great!. But when I wanted to import some of my videos from the SD Card and then onto my Mac into Final Cut Pro X, it wouldn't open. I clicked on the camera and it opened right up to my Facetime HD Camera. I tried opening archive and then clicking on the SD Card, but it just when back to the FaceTime HD Camera. I really need help because I have a video due in a week and I need FCPX! Please help!

    If you are importing directly from the flash card, don't forget to check the "copy" option in the import dialog. Otherwise Final Cut will just point to your memory card and as soon as you eject it, you will have disconnected media.
    When you import from camera's that support using the Camera Import function, FCP X knows to do the copy (you don't even get the option), but it doesn't know when you use File->Import.

  • Help i need to recover deleted videos off of an sd card

    can someone plz tell me an application that works that i can use to recover these videos

    MVI indicates, you're using a Canon Camera, correct?
    .. hmm?
    Those devices record in h.264.mov - usually fully compatible in MacOS.
    my assumption is, that the recovered file somehow 'lacks' bits&pieces (pun intended).
    Damaged mov are really tricky - inside such a file is a complex structure, if something is kaputt, the whole video is damaged.
    Only solution which comes to my mind:
    • try to open the file in Mpeg Streamclip ... does it show anything?
    • finally VLC - it virtually opens 'anything'  ... if this doesn't display anything, I'm afraid, the file is too corrupted..
    if any of these tools show content, there's hope to  'transform' it into usable...

  • HT4528 With IOS 7 I had to move my photos and videos off to a backup to install the IOS.  When they moved back to the phone during a sync I have no way to delete them.  The trashcan stays grayed out and the usage page doesn't give me a delete option.

    I got the message that IOS 7 was ready to download.  I wish I had read the reviews on it first.  I had to move my photos and videos off the phone to free up memory space for the install.  I was still able to see the phone with a file browser and grabbed the photos and videos and stored them in a directory on my hard drive.  Meanwhile my itunes updated too.  So with my files moved and deleted from the phone I made a backup of the phone.  I installed the ios 7.  When I synced the itunes moved my backup directories back to the phone.  I can't figure out how to remove them from the phone.  Under photos they have installed themselves with the names iphone09282013 and videos directories.  When I access them I don't get a delete option.  The trashcan is greyed out.  The settings usage page no longer gives me the swipe delete function.  How do I remove these files to free up space now that I have them saved to my computer?

    Hi Eric Ferguson,
    Thanks for using Apple Support Communities.
    For troubleshooting on this, take a look at this article:
    iTunes: Specific update-and-restore error messages and advanced troubleshooting
    http://support.apple.com/kb/ts3694
    Error 13, 14, 35 and 50 (or -50)
    These errors are typically resolved by performing one or more of the steps listed below:
    Perform USB isolation troubleshooting, including trying a different USB port directly on the computer. See the advanced steps below for USB troubleshooting.
    Put a USB 2.0 hub between the device and the computer.
    Try a different USB 30-pin dock-connector cable.
    Eliminate third-party security software conflicts.
    There may be third-party software installed that modifies your default packet size in Windows by inserting one or more TcpWindowSize entries into your registry. Your default packet size being set incorrectly can cause this error. Contact the manufacturer of the software that installed the packet-size modification for assistance. Or, follow this article by Microsoft: How to reset Internet Protocol (TCP/IP) to reset the packet size back to the default for Windows.
    Connect your computer directly to your Internet source, bypassing any routers, hubs, or switches. You may need to restart your computer and modem to get online.
    Try to restore from another known-good computer and network.
    Best of luck,
    Mario

  • Audio and Video off sync in a few movies in my library

    Hello everyone, I have about 1500 movies in my iTunes library and two ATV. One ATV is in my family room along with my Mac Pro and timecapsule, the other ATV is two floors up in my bedroom. Some movies that are played in my family room play off sync with the audio 5-10 seconds behind video.
    I play the same movie in my bedroom and it plays fine. I use a 3rd party app to convert my DVD's to mp4. I don't have a problem with HD pic and 5.1 dolby just audio/video off sync. Does anyone have any answers or the same problem

    I have looked a little bit more, and it seems as though the video is lagging behind, not the other way around. Video seems choppy, but the audio is playing perfectly. Music Videos are suffering from the same problem as well. Also, when I sync to my iPod Touch 16GB, audio & video match up perfectly.
    I still have no idea how to fix this. Please help.

  • Message "video too long to send" when trying to move a video off my IPAD.

    I have IPAD IOS 7 but am unable to move a video, almost 2 minutes in length off the IPAD in either email or direct connection to my laptop...message I get is "video too long to send"...I am just trying to get this video off my IPAD and into permanent storage.
    I bought app VideoEmail tried to move video quality setting to "low" but it still only sends part of the video.

    Shut down the app...
    - From any Home Screen, double tap the home button to bring up the Recents List
    - Tap and hold any icon until they wiggle
    - Press the red to delete the offending app from this list.
    - Press the home button twice when done.
    - Restart the app

  • Can you import movie videos from SD camera card

    Can you import movie videos (MP4) into an Ipad from an SD camera card on a Lightning cable ... or can you only do this from a laptop via Itunes? In other words, is Itunes the only way to get non-Itune videos to the Ipad? Hope I havent made this sound confusing.

    To import the videos must follow a very strict naming convention.
    All file names must have 8 characters for a name and be located in a folder named DCIM
    for example
    DCIM
    MOV_5789.mp4
    You can't watch the videos off the cart, they must be imported into the iPad. They'll go into the camera roll, when you tap on them it'll open the video app and you can watch from there.

  • IPod-Video-80Gig No longer plays movies, videos, TV shows (older shows)

    What gives, only 6 months ago the videos played just fine...then I begin having a host of problems (started with the death of the battery at the ripe old age of 8 months). This $400 video iPod had played the few movies and TV shows I purchased...and it will play the audio of them...but will no longer play the video portion. I've tried the resetting (holding the MENU plus CENTER buttons at same time). No go still. I haven't played the movies/videos in a while; but now I'm going on a roadtrip and wanted to take them with me to watch on the plane. So sad. Any help anyone can pass along would be rightly appreciated!

    OMI...my daughter had told me she was "fiddling" with the settings and wouldn't you know, she changed the VIDEO SETTINGS "TV Out from Off to On." Word to people with kids...tell them to step away from the iPod.

  • About MOV video in flash cc air

    Hi,
    I imported MOV video in an air app. The video didn't show up after publishing the mobile app in iPad. I attached the video as a file when I published the app.  The video exists in the same flash file though.
    Why the video doesn't work on iPad after publishing it? Does anyone have an idea?

    this doesn't sound like a scripting issue.
    look at the directory with your published air file.  do you see something like alongflvplaybackskinname.swf?
    that swf needs to be added to your included files in the publish settings.

  • IPhoto won't import .mov video from iPhone

    I just got my wife a new Mac mini.  It is running the latest versions of Mountain Lion and iPhoto.
    She's recorded some short videos of the kids with her iPhone (4s), and wants to organize these in iPhoto alongside pictures of the kids (she's done this before).
    However, since getting her new computer, when she tried to import the videos, she got an error message that said the files were an unrecognized format.
    We were able to retrieve the videos and copy them to her hard drive using Image Capture; however, she would still like to import them to iPhoto.
    Any help is appreciated.
    Thanks.
    -tri

    There are many, many posts of this nature in these forums.  See, for example:
    iphoto won’t import mov video
    For many, rebuilding the XPC helper cache solves the problem off the bat. In terminal try this, and reboot:
    sudo /usr/libexec/xpchelper --rebuild-cache
    The above posted by Andy Ball on a thread related to a similar problem with Aperture:
    Re: Import video to Aperture library on Mountain Lion
    Other things to try:
    1. create a fresh iPhoto library and try that.  (hold down opt while launching iPhoto)
    2. create a new OS X user (in system preferences) and try there.
    In my case – and many cases – neither of those things work either, which means the problem is system wide.  Again suggesting that the xpc helper solution might work. But for me it did not either.
    There are other suggestions that there are conflicts with Perian (on Yosemite) and flip4mac.  In my case uninstalling both of those didn't solve it either.
    So maybe one of those solutions will work for you, results apparently vary.  But this is a huge unresolved issue many others are having as well.  I have a case with a senior apple advisor open, still unresolved. His suggestion of course, at this point, is an archive and re-install. I'm not ready to go there yet.
    BTW, another thing he had me try was to import the file with Image Capture (which works).  Then open it in QuickTime Player X.  Then try exporting to 480p.  Does QuickTime crash?  It does for me.
    My summary:
    1. Files successfully import with Image Player.
    2. Files play with QuickTime Player X.
    3. QuickTime Player X crashes when exporting to 480p.
    4. Files import with iMove.
    5. Files fail to import with iPhoto (unrecognized format as with OP)
    6. iPhoto import failure/errors are system wide and not specific to a library or a user.
    7. rebuilding xpchelper cache and rebooting in my case does not resolve issue.
    8. same videos import fine in iPhoto on a totally different system (laptop running same versions of OS X 10.10 and iPhoto 9.5.1)

  • Embedding .mov video - followed all steps - not working!

    I followed the steps, and it's not working.
    I selected the space where I want it. Clicked "insert" "media" "plugin". Chose my .mov video from my root media folder - things looked good to me.
    On properties changed the width and height. There is a lovely empty box on the page!
    I am not sure what exactly needs to go in the Url. space (in properties).
    One site says - http://www.apple.com/quicktime. for those users that don't have it - another linked to a web page I did not understand.
    This is a Windows file .mov, so I am assuming it does not need the Mark of the Web - please correct me if I'm wrong.
    Can anyone see what is wrong. Ppl make it look so easy - follow the steps and it just plays - Brilliant!!! - why NOT FOR ME?
    Thanks a million.

    Do not use .mov files.  Very few people have QuickTime / browser plugins to support this file type.  The universal standard now is HTML5 <video> with OGV, WEBM and MP4 files.  No players or special plugins required to view it.  And it works in all web devices!
    Copy & paste the following HTML5 code into a new, blank document.  Save and preview in browsers.
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>HTML5 with Video</title>
    <!--help for older IE browsers-->
    <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    </head>
    <style>
    video {
        max-width:100%;
        display:block;
        margin:0 auto;
    </style>
    <body>
    <h2>Use 3 File Types to support all browsers &amp; mobile devices:  MP4, WEBM and OGV.</h2>
    <h3>Online Video Converter
    http://video.online-convert.com/</h3>
    <!--begin video-->
    <video controls poster="Your_poster_image.jpg">
    <!--these are 6 sec sample videos for testing purposes. Replace sample-videos with your own files-->
    <source src="http://techslides.com/demos/sample-videos/small.webm" type="video/webm">
    <source src="http://techslides.com/demos/sample-videos/small.ogv" type="video/ogg">
    <source src="http://techslides.com/demos/sample-videos/small.mp4" type="video/mp4">
    If you're seeing this, you're using an
    outdated browser that doesn't support
    the video tag. </video>
    <!--end video-->
    </body>
    </html>
    Nancy O.

  • 1080p30 .mov files from canon eos 5DMarkII in Final cut express 4.0.1

    Hi everybody.
    i need some help to import HD vidéo .mov files from Canon Eos 5DMarkII in final cut express.
    The files is in 1080p30 (h264) like avchd but in the final cut configuration i have only 50i and 60i option in HDV and AVCHD
    Final cut necessity to do a render (5h for 15min on my G5) and the movement quality is not the same.
    Anybody have a idea to import Progressive files in final cut ?
    maybe they have an update with new avchd 1080p codec in configuration ?
    or i need final cut pro...?
    Thanks in advance
    and sorry for my english...i'm french

    There is no good solution for working with this camera in FCE. It's 30fps progressive. There is no true video format that is 30fps. This is something Canon was cobbled together for this stills camera.
    You can use MPEG Streamclip to convert the material to QuickTime using the Apple Intermediate Codec at 1920x1080. I think that's what it shoot. You should check the camera manual to confirm it shoots 1920 and not 1440.
    The problem is the frame rate. You can convert it to 29.97fps or to 25fps. 25fps conforms to the European frame rate, but I don't know how well Streamclip will do this conversion. You also need to make sure the material is not interlaced by Streamclip.
    The other problem is that FCE handles 1080 as an interlaced format, because for production it's supposed to be an interlaced format, at least in the formats, HDV and AVCHD, that FCE works with. You can set your sequence properties to have no field dominance, which should prevent it interlacing during compositing of any effects.

  • Iphoto won't import mov video

    Iphoto 9.5.1 (mac mini, mavericks) suddenly stopped playing some mov videos. With iphoto library manager I found out that unplayable mov files are indicated in iphoto as pictures. When I press «reveal in finder» I still can play all the mov files via quicktime. But when I try to delete and re-import them into iphoto library I  always get the message «The following files could not be imported. The file is an unrecognised format». I deleted perian, quicktime 7, fip4mac, I did rebuild and repair of the library. Nothing helps (sorry for my English).

    I think I have the EXACT same problem. (Everything also up to date)
    I can't view movies that were viewable just days ago. (So, I am guessing this happened for me with the most recent OS update a day or so ago.)
    Some videos from my (non iPhone) cameras will play. But LOTS don't. Some have audio and no video. iPhone movies won't play at all.
    I can't import videos from my iPhone 5  into a library -- not even a brand new library. It gives me the same message that it is an unrecognized format. In fact, I can't import .mov files from two new Canon cameras that I imported from just days ago! I get the same error message.
    This happens with some variation in both Aperture and iPhoto. Actually, iPhoto shows many of my videos (except iPhone vids), unlike Aperture which lets me view very few.
    I have repaired and rebuilt the library/database. As I said, I have created a new library. No change - same problem occurs.
    iPhoto won't even let me export video.
    But, if I view the original movie file in finder, everything works fine, no problems - I can Quick Look it, open it in Quicktime, etc. etc.
    ** This is THE ERROR MESSAGE that I am getting TONS of in the console whenever I try to do just about anything with movies: **
    Any help greatly appreciated.

  • I need a shell script to move latest archivelogs from one server to another server..

    Hi,
         I need a shell script to move latest archivelogs from one server to another server..
    Thanks&Regards,
    Vel

    ea816fb9-f9ea-45ac-906f-36a8315970d0 wrote:
    Thanks it's really helpfull..
    Now i have pasted a shell script which generates archivelog and shows latest archivelog time..
    just check let me know the answer, that how i need to execute it..
    # Force a logswitch to get the last archivelog to the standby host
    ORACLE_SID=ORCL
    ORAENV_ASK=NO
    . oraenv >/dev/null 2>&1
    SwitchLogfile()
      # Do logswitch 
      RESULT=`echo "Alter system switch logfile;" | sqlplus -S / as sysdba | grep 'System altered'`
      if [ "$RESULT" = "System altered." ]
      then
      export RETURN=1
      else
      export RETURN=0
      fi
      # Do we need to do something with this return value?
      export RETURN
    GetArchiveTime()
      CURYEAR=`date +%Y`
      echo "set heading off;" > temp.sql
      echo "set termout off;" >> temp.sql
      echo "select to_char(first_time,'YYYY-MM-DD HH24:MI:SS') from v\$archived_log where sequence#=(select sequence# - 1 from v\$log where status='CURRENT');" >> temp.sql
      sqlplus -S / as sysdba <
    spool tempres.txt
    @temp.sql
    quit
    EOF
    cat tempres.txt | grep ${CURYEAR} | grep -v grep | awk '{print $1" "$2}'
    #rm -f temp.sql  tempres.sql
    SwitchLogfile
    GetArchiveTime
    You seem to have ignored Dude's VERY good advice and continue to press down this ill-advised path.  If you continue this approach, you WILL have problems at the very time you do not need any additional problems.  Trying to recover your production database at 2:00 in the morning is not the time to be getting errors from rman because it can't find what it needs - because you decided to move them around yourself.
    Please reconsider.

  • ITunes won't play audio with mp4 or mov video

    I have wasted many frustrating hours now trying to get iTunes to play mp4 and mov videos but can't get any sound. A few months back it was working fine. Tried ALL the suggested fixes like uninstalling, updating and checking all the MIME/File boxes. When I went back to QT 7.5 and played the files independently of iTunes everything was fine. Quicktime  7.6, 7.67 & 7.7.1 do not play the audio independently or under iTunes and of course iTunes won't play video with QT less than 7.7.1. The same mp4 videos uploaded to my iPOD work fine. I currently have iTunes 10.5.3.3 installed on a Windows XP SP3 on an e-machines pc. Ideas please!!

    I got this problem as well. Seems as soon as I moved to version 7.6 it stopped playing my video audio. My music plays fine, but my video audio is non-existant. It's not the file itself because I can play off my iPod (though not off my iPod through iTunes) just fine. I've done all the suggestions above and NOTHING has worked. Is there anything else we can find???

Maybe you are looking for