Web 2.0 Expo Conference
This talk was presented by Cal Henderson from Flickr
- Notes can be found at http://iamcal.com/talks
What did flickr have to do to host video?
In order to host videos there are several things you have to deal with:
Videos are very large(huge). This presents a problem.
- HTML Form
- Client application
- pros: ubiquitous, simple
- cons: slow, upload progress???, one at a time
- Upload progress can be overcome using Ajax to poll the server. Doesn’t work when you have clustered servers involved.
- Solution to this is Perlbal – webserver that broadcasts upload progress info via UDP making info available to all servers
- pros: upload progress, fast, multiple files
- cons: difficult to implement, not really ubiquitous
- pros: upload progress, very fast, multiple files, drag n drop
- cons: hard to develop, hard to deploy
Then there are server issues
- Uploading is slow, ties up threads for a long time.
- The solution is to proxy uploading. Perlbal supports this, so does mod_proxy (apache).
- Moving files between servers is slow – Must use background/asynchronous processing to move files.
- Transcoding is about format conversion.
There are lots of different input sources, different formats.
- AVI = Audio Video Interleaved.
(He was moving pretty fast through this stuff and kind of lost me here. Here is a wikipedia page on Video Compression Picture Types that I found useful.
- Intraframe – each frame is compressed.
- Interframe – store differences b/n frames. treat frames as 3d layers of pixels. Can reuse pixels that don’t change?
- 3 frame types: I P B.
- I = Index or Key or Intra coded frames. Contain the most bits.
- P = Predictive.
- B = Bi-predictive
Seeking within video takes you to the nearest I (key) frame. Having more I frames in your video allows more precise seeking.
- pretty much ubiquitous. Funny how he contradicted himself here. Apparently Flash isn’t ubiquitous enough for uploading but for playback it’s just fine.
- no 3D/VR
He then sped through a history of the Flash player and the supported video types.
- Flash 6 2002
- Flash 7 2005
- On2 TrueMotion VP6
- Flash 9 update 3
- probably illegal for GPL use.
- bulk of the videos on the web use this format
- not proprietary
- good compression
- MPEG standard
- not likely GPLable
YouTube uses it for higher quality vids.
iPhone/Apple TV use it.
- based on libavcodec for VP6
- H264 decode only, no encode support
- both use libavcodec
- Flash encoder
- creators of VP6
- Windows or Linux
- H264 support
Rhozet Carbon Coder
Wikipedia has a good description of H264.
- just large files
- use of checksum to ensure quality
- progressive download
- best for live video
- requires special software
- firewall issues
- Open Source Streaming server written in Java.
- most sites are going this route unless content is live.