For those who may need the answer to this question I will outline my OS-independent solution.
The file format of an .flv file is documented in http://download.macromedia.com/f4v/video_file_format_spec_v10_1.pdf To spare you the effort of reading the documentation ... Read the metadata header into a string. Reading 10K should be way more than enough. Search for the string "duration" (without the quotes). "duration" is null terminated. The next 16 bytes are a double and can be interpreted as String.unpack("G"). The double so interpreted is the duration in seconds. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

