The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
On2 Flix Engine

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Matt Bauer

Posts: 48
Nickname: bauer
Registered: Apr, 2007

Matt Bauer owns Mosquito Mole Multiworks - a Rails Hosting and Consulting Company
On2 Flix Engine Posted: May 18, 2007 9:38 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Matt Bauer.
Original Post: On2 Flix Engine
Feed Title: blogmmmultiworks
Feed URL: http://blog.mmmultiworks.com/feed/rss.xml
Feed Description: Thoughts on Ruby, hosting and more
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Matt Bauer
Latest Posts From blogmmmultiworks

Advertisement

Tomorrow Jon Dahl will be giving a talk at RailsConf about Video Transcoding. I'm quite excited that Jon is doing a presentation on video transcoding and using some of the work I've done with On2. I've used On2 for a variety of projects and most recently with the MotionBox team. I want to take a little time here to talk about the On2 Engine SDK.

In short the On2 Engine SDK takes video and converts it into VP6 Flash VIdeo. Here's a little background to help you. Flash video comes in a variety of video and audio formats. The main video codecs are H.263 and VP6. The VP6 codec is better by far in quality and file size. FFMpeg will easily convert video in the H.263 format but no the VP6 format (though it can read it). Only On2 technologies can do this whether bundled with Flash or purchased separately like in On2 Flix Engine SDK. I'll speak to the On2 Flix Engine here.

The On2 Flix Engine is a licensed technology (i.e. costs money) that will take video and convert it into VP6 formated video. It's works as a daemon process on Windows and Linux and accessable over the network (though the source files must be local to the flix server). The Flix Engine comes with SDKs for C, Perl, Python and Java. Unfortunately there isn't one for Ruby but don't worry. I'm wriitng one.

The On2 Flix Engine can take input video in the following formats: .avi, .dv, .mov/.qt, .mpeg, .mp4, .3gp, .asf/.wmv, flv, mp3, .wav, .wma, QCELP, AMR. In the Linux version (the one I use) there is a daemon process that runs called flixd. It is this process that the api's connect to via rpc to request encoding.

Now there are some unique things about the Flix Engine. First is the licensing. I have a NDA with On2 and can't tell you the price. What I will tell you is that it's worth it if your application depends on enconding into VP6. Another thing about licensing is the fact that the flixd daemon does a call home each time it's started to amke sure the current license is fine. The need to call home has caused more than one problem in my experience. I would really like to see On2 change this policy.

In the past I've used the C api to get done what I needed as it's quite vast. Lately I've had more need to for a Ruby binding to the C api and I've started on just this. You can find the latest code at:

http://rubyforge.com/var/svn/mmmultiworks/on2/trunk

The code noted above is just the start and needs much more done. It is a start however and was used to encode some videos for Jon Dahl's RailsConf presentation. In other words, it works - minimal as it is. To use it you'll need to download the trial version of the On2 Flix Engine SDK. You'll also need to download the On2 Ruby code I wrote from the Subversion repository at Rubyforge as it's not mature enough to relase as a gem. Soon it will be though.

Once you have the source code for the Ruby On2 bindings, just run:

rake install

The code is quite simple. To encode a file you simply need to do:

flix_engine = On2::FlixEngine.new
flix_engine.source_path = "/home/bob/funny_video.mov"
flix_engine.output_path = "/home/bob/funny_video.flv"
flie_engine.encode
while (flix_engine.encoding?) {
  puts flix_engine.percent_complete
}

The encode method does not block just like the C API. This allows the flixd daemon to take care of scheduling though you still have to be aware of server resource usage. I'll have more about that in a future article along with some performance numbers.

The next step is to finish up a 0.1 version with source file information, encoding stats and codec options - all available in Ruby. So stay tuned and look for integration with rvideo shortly. That is, once this RailsConf is done and I get some sleep.

Read: On2 Flix Engine

Topic: heckle gets more evil inside Previous Topic   Next Topic Topic: Off to RailsConf 2007 Soon

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use