Home > rqtrotate

rqtrotate

Rqtrotate is a project mainly written in ..., based on the Apache-2.0 license.

Pure ruby library to detect and affect QuickTime movie rotation.

= rqtrotate

Pure ruby library to detect and affect rotation of ISO Base Media Format files such as Apple QuickTime and 3gp by maniuplating the structure matrix, not re-encoding. Note that not all players handle the matrix identically and require re-encoding instead of this method.

== Credits

The logical core of this library is a port of Daniel G. Taylor's qtrotate python library(https://github.com/danielgtaylor/qtrotate). Many, MANY thanks to him!

== Usage

=== Ruby require 'rubygems' require 'rqtrotate'

include RQTRotate

block style

Movie.open(ARGV[0]) do |movie| degrees = movie.rotation
puts "rotation is #{degrees}"

movie.rotation = degrees + 90

end

stream style

File.open(ARGV[0], File::RDWR) do |f| movie = Movie.new(f)

degrees = movie.rotation  
puts "rotation is #{degrees}"

f.seek(0, IO::SEEK_SET)
movie.rotation = degrees + 90

end

=== Command Line

see if a file is rotated

$ qtrotate_get ./test.mov 90

rotate to 0 degrees

$ qtrotate_set ./test.mov 0

== Copyright

Copyright 2011 The Skunkworx.

Previous:cnodedoc