Project

qtrefmovie

0.0
No commit activity in last 3 years
No release in over 3 years
QTRefMovie is a simple tool for generating QuickTime Reference Movie files from a Ruby script.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

QTRefMovie¶ ↑

QTRefMovie is based on PHPRefMovie Copyright © 2003 Juergen Enge (GPL V2 or later)

www.phpclasses.org/browse/file/7719.html

juergen@info-age.net

Most of the code design is Juergen’s.

Most code comments are from Apple’s QuickTime File Format specification.

I just translated the code to Ruby, simplified usage, and made it a Ruby Gem.

Usage¶ ↑

  • Install the qtrefmovie gem

  • Load the library (some or all may not be needed)

    require 'rubygems'
    gem 'qtrefmovie'
    require 'lib/qtrefmovie'
    
  • Make a reference movie

    movie = QTRefMovie::QTMovie.new [{:reference => "rtsp://127.0.0.1:80/test.mov",
                                      :data_rate => 'intranet',
                                      :cpu_speed => 'fast'},
                                     {:reference => "rtsp://127.0.0.1:80/test2.mov",
                                      :data_rate => 't1',
                                      :quality   => 650}]
    File.open("refmovie.mov", "w") { |f| f.write movie.to_s }
    
  • Make the reference movie useful

    This part's up to you

Options¶ ↑

You can have as many movie references as you’d like within a reference movie. The QuickTime client will consider the parameters of each reference, as well as its own settings, to decide which reference to actually load.

Each reference may have the following parameters:

reference:: (required) A URL pointing to a distinct version of the movie available somewhere online
            Any URL accessible to the client and playable by QuickTime

data_rate:: (optional) The minimum connection speed for displaying this version
            A 32-bit number, or:  '28.8 modem', '56k modem', 'isdn', 'dual isdn',
            '256 kbps', '384 kbps', '512 kbps', '768 kbps', '1 mbps', 't1', 'intranet'

cpu_speed:: (optional) An indicator of processor capability needed to view this version
            A 32-bit number divisible by 100, or:  'very slow', 'slow', 'medium', 'fast', 'very fast'

quality::   (optional) A relative measure of the quality of this version compared to others referenced
            A 32-bit number

More Information¶ ↑

Juergen provided detailed comments with the code, which I have maintained intact. These are largely from Apple’s QuickTime File Format specification.

Apple’s QuickTime File Format Specification is currently available at this URL: developer.apple.com/mac/library/documentation/QuickTime/QTFF/

Note on Patches/Pull Requests¶ ↑

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)

  • Send me a pull request. Bonus points for topic branches.

Copyright © 2010 Jonathan Block. See LICENSE for details.