Project

flv

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
A library for handling FLV files
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.3
>= 0
~> 2.13.0
 Project Readme

FLV

A Ruby library for parsing FLV files and metadata sections.

Installation

Add this line to your application's Gemfile:

gem "flv"

And then execute:

$ bundle

Or install it yourself as:

$ gem install flv

Usage

flv = FLV.read("path/to/your/video.flv")
flv.audio? # => true
flv.video? # => true

data_tag = flv.tags.find { |tag| tag.is_a?(FLV::Tag::Data) }
data_tag.duration # => 60.0
data_tag.frame_rate # => 30.0

The FLV gem also supports streaming parsing, so you can handle tags as they arrive from an I/O stream.

This is useful for pulling metadata out of FLV videos without having to download the whole lot:

flv = FLV.new(io)
data_tag = flv.each_tag.first
io.close

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request