1
12 34
How do I access the properties of a QuickTime movie? I'm trying RubyOSA,
but am open to other ideas.
I ultimately want to save the middle frame of movies I download from my
digital camera. That jpg will be a placeholder in Aperture. Here's what
I think are the essentials at this point
require 'rbosa'
require 'fileutils'
include FileUtils
appQT = OSA.app('QuickTime Player')
src = "/Volumes/photos/"
filesCount = 0
frameFilesCount = 0
Find.find(src) do |fn|
if File.file?(fn)
if ['.mov','.avi'].include?(File.extname(fn).downcase)
appQT.open(fn) # works
frameCount = appQT.duration("movie 1") >> undefined method
‘duration’ for #<OSA::QuickTimePlayer::Application:0x1065c24>
puts "frameCount: #{frameCount}"
appQT.close(fn) # doesn't work
end
end
end
puts
I looked at the output of appQT.methods and none of the items listed
that made sense to me worked.
This newbie needs some help groking RubyOSA, Ruby, and QuickTime.
Thanks
but am open to other ideas.
I ultimately want to save the middle frame of movies I download from my
digital camera. That jpg will be a placeholder in Aperture. Here's what
I think are the essentials at this point
require 'rbosa'
require 'fileutils'
include FileUtils
appQT = OSA.app('QuickTime Player')
src = "/Volumes/photos/"
filesCount = 0
frameFilesCount = 0
Find.find(src) do |fn|
if File.file?(fn)
if ['.mov','.avi'].include?(File.extname(fn).downcase)
appQT.open(fn) # works
frameCount = appQT.duration("movie 1") >> undefined method
‘duration’ for #<OSA::QuickTimePlayer::Application:0x1065c24>
puts "frameCount: #{frameCount}"
appQT.close(fn) # doesn't work
end
end
end
puts
I looked at the output of appQT.methods and none of the items listed
that made sense to me worked.
This newbie needs some help groking RubyOSA, Ruby, and QuickTime.
Thanks