官术网_书友最值得收藏!

  • Lighttpd
  • Andre Bogus
  • 334字
  • 2021-08-25 18:06:24

Streaming Content

There are different solutions for streaming flash videos. Dedicated streaming servers, an apache module, and different CGI-backend-based solutions have sprung up. Of course, Lighttpd plays this game, too, with mod_flv_streaming. The configuration is as simple as it gets:

# add mod_flv_streaming to our module list
server.modules = (..., "mod_flv_streaming", ...)
# set a list of extensions to stream
flv-streaming.extensions = ( ".flv" )

That's it. Now we need a player that works with our streaming protocol. Fabian Topfsted has written such a player, and has made it available for noncommercial purposes at http://www.topfstedt.de/weblog/?page_id=208. The site has everything we need to know about setting up and embedding the player into our pages.

Apart from that, we need to be sure that our videos have the metadata (byte position of the first frame in the file, kilobytes per second, and so on) embedded in the beginning. For flash video, which keeps a constant bitrate, the playing position can then be set freely. H.264 video, which has variable bitrates, can only be played from start to end.

There are some tools to convert videos to the flv format and change the metadata:

  • MPlayer/MEncoder at www.mplayerhq.hu is a fairly minimal player/encoder combo that is quite fast and plays or encodes almost everything with a minimal user interface and lots of command line options.
  • yamdi (short for "Yet Another MetaData Injector for FLV") is a command line tool to inject metadata to FLV files. It is pretty fast, because it reads only what it needs. Download it from http://yamdi.sourceforge.net.
  • FLVTool2, located at http://inlet-media.de/flvtool2 is another utility for FLV metadata. FLVTool2 is written in Ruby, and is thus platform-agnostic. It may not be the fastest tool, but it does the job.
  • FLVMDI is a Windows-based tool with a GUI that sets and shows FLV metadata. The homepage at http://www.buraks.com/flvmdi has the documentation and the downloads.

This is it. We can now go and build our own YouTube. Or whatever site we may want to enhance with FLV streams.

主站蜘蛛池模板: 阿拉善盟| 嘉鱼县| 固原市| 聊城市| 河池市| 子长县| 罗田县| 永丰县| 邛崃市| 井陉县| 潢川县| 通江县| 南丰县| 钟祥市| 德清县| 永嘉县| 曲沃县| 基隆市| 衡东县| 宁德市| 河北区| 宣恩县| 永泰县| 台东市| 灌阳县| 长子县| 剑川县| 宁海县| 夹江县| 枣庄市| 同德县| 闸北区| 柘城县| 乃东县| 启东市| 文登市| 蒲江县| 莱芜市| 德保县| 龙里县| 大安市|