rx

Remuxing Sony RX-100 footage for iMovie

UPDATE: The latest version of iMovie now natively supports the RX-100 so move along folks.

I’ve been working on a little AppleScript that allows raw Sony RX-100 footage to be used in iMovie. The files are NOT re-encoded, so no conversion to AIC is needed. This simply remuxes the stream and maintains the timestamp.

Usage: browse to the folder containing your .MTS files, then drag and drop onto the droplet. Converted files will be exported to your desktop.

The script can be downloaded here: https://dl.dropboxusercontent.com/u/124043/jaselynch.com/RX-100%20Remux.zip

This isn’t the most user friendly interface at this stage, but it does the job. Will work on getting it a little more ‘friendly’ over the next few days.

The source, for those interested, is below:

on open (theItems) –receive items dropped onto droplet as a list

— get path to ffmpeg
set appPath to path to me as text
set ffmpegPath to quoted form of POSIX path of (appPath & “Contents:Resources:ffmpeg”)

with timeout of 1000000 seconds

tell application “Finder”

— loop through items
repeat with oneItem in theItems

— source file
set sourceFile to quoted form of POSIX path of oneItem

— get file name
set filename to name of oneItem

— build date reading command
set getOriginalDateCommand to “stat -t ‘%Y%m%d%H%M.%S’ ” & sourceFile & ” | cut -d\\ -f12″

— get original date
set originalDate to do shell script getOriginalDateCommand
set originalDate to text items 2 thru 16 of originalDate as string

— new filename
set newFilename to (((((“rx100__” & text items 1 thru 4 of originalDate as string) & “-” & text items 5 thru 6 of originalDate as string) & “-” & text items 7 thru 8 of originalDate as string) & “_” & text items 9 thru 10 of originalDate as string) & “-” & text items 11 thru 12 of originalDate as string) & “-” & text items 14 thru 15 of originalDate as string

— get original file name
set itemName to displayed name of oneItem

— desination path
set destinationPath to “~/Desktop/” & newFilename & “.mov”

— build remux command
set remuxCommand to ffmpegPath & ” -i ” & sourceFile & ” -vcodec copy -ab 128000 -y -strict -2 -f mov ” & destinationPath

— do remux
do shell script remuxCommand

— set date for new file to original date
set setOriginalDateCommand to “touch -mt ” & originalDate & ” ” & destinationPath

— run original date command
do shell script setOriginalDateCommand

end repeat
end tell
end timeout
display alert “Conversion complete”
end open

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>