I’ve been exploring several avenues for making videos stream, rather than needing to cache. In this post, I’ll be describing some of the techniques I’m working on, what their status is, and what is needed to make it work. Unfortunately, they will not be in the 1.0 version, as they’re not ready yet.
- YouTube’s higher-quality videos are sometimes available in the codec MPEG-4. This is a standard codec that is supported by QuickTime, and so when available, it can be streamed right away. I have some proof-of-concept of this running. There are two problems with this approach. First, not all videos are available in this format, and certainly not on other video sites (hint hint), and so it can’t be relied upon; I still need an alternate approach for FLV videos. Second, I haven’t found a way to determine if the video is available in the MP4 format before handing it off to QuickTime without downloading the data twice. I haven’t spent as much time on this approach as the others, as it only applies to a small subset of videos. However, I will be spending more time on it for higher-quality videos after I can get streaming to work.
- Tubular currently uses the open-source Perian QuickTime codec to decode the FLV files. However, it cannot stream them. Under the hood, Perian uses the open-source Ffmpeg library to decode the video; Perian then massages the decoded video into a QuickTime movie, which is played by Tubular. I’m working on another approach that bypasses Perian and uses Ffmpeg directly to decode the video in real-time. I’m currently able to decode the video and audio, but not get them into QuickTime yet, which Tubular relies on for both playback and iPod conversion (and will be depended upon heavily for upcoming features).
- Most recently, Adobe released the full specification for the FLV file format for free, as part of their Open Screen Project initiative. This information was previously available, but it required a decent fee and was only allowed to be used in applications that create FLV files, not read them. Since then, I’ve begun working on my own FLV file decoder based on the specification. Getting it to read in files quickly and accurately, however, is difficult. One convenient thing with this approach is that I’ll have complete control over the decoding, which means I can optimize and enhance it for specific hardware (including, say, mobile devices…), and makes streaming trivial. Clearly, this is the most optimal solution, and it’s one I’m very heavily pursuing, but is far more complex than using the above two methods. It was also just released barely a month ago, and I haven’t had as much time to work on it.
Hopefully soon, one of these techniques will prove successful, making Tubular all the more useful. I’m certainly not happy about the fact that Tubular cannot stream, and that’ll be a major focus point in upcoming versions.
RSS · TrackBack
Leave a Comment