Since most Cameras store their rotation/orientation within the exif-metadata, i would suggest using exifttool
and the a ruby wrapper gem called mini_exiftool
which is actively maintained.
Install exiftool:
apt-get exiftool || brew install exiftool || port install exiftool
or use what ever package manager is available
Install mini_exiftool:
gem install mini_exiftool
Try it:
irb>
require 'mini_exiftool'
movie = MiniExiftool.new('test_movie.mov')
movie.orientation #=> 90
cheers
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…