---
title: "视频伪流技术(pseudostreaming)"
author: "rcfalcon"
date: "2011-11-04T19:56:00Z"
tags: []
slug: "pseudostreaming"
draft: false
lastmod: "2012-03-01T23:52:04Z"
id: 1434890
url: "https://swee.iteye.com/blog/1434890"
---

接触FLASH视频播放的人，不免接触到伪流的概念。之前一直没有找到比较好理解的相关介绍，今天翻flowplayer的文档时，看到一篇不错的介绍，将其简单翻译一下。

原文地址：[点击打开链接](http://flowplayer.org/plugins/streaming/pseudostreaming.html)

伪流技术是一种能在常见HTTP服务器如APACHE、tomcat、IIS或lighttpd上安装提供的一种协议。它使用服务端脚本来提供FLASH到服务器的视频交互。播放器在URL上携带start time的参数发送HTTP请求到服务端，服务端的脚本处理视频流并且给予回复，保证提供的视频流起始位置与START TIME参数所对应。这个start time的参数通常命名为“start"，这个技术同样被风靡全球的youtube所使用，它使用的是lighttpd WEB服务器。

对于播放器来说，使用伪流或其他流式的解决方案最大的好处是：能跳转到尚未下载到的视频部分。这种情况在很符合大文件播放需求，比如2个小时的视频，用户想立刻跳转到它的后面部分开始播放，（这样不需要下载中间用户不关心的部分了）。好处如下：

\# 能够随机跳转到视频的任意时间

\# 从视频的中间开始播放

\# 提供客户方流媒体服务器和服务端脚本集成的可能（？？？）

\# 支持FLV和H.264的视频

以下是比较流行的伪流服务端技术方案：

- [lighttpd Web server and it's FLV streaming script](http://blog.lighttpd.net/articles/2006/03/09/flv-streaming-with-lighttpd)
- [H.264 Streaming Module for Apache, Lighttpd and Nginx](http://h264.code-shop.com/trac/wiki)
- [richbellamy.com pseudostreaming PHP script](http://richbellamy.com/wiki/Flash_Streaming_to_FlowPlayer_using_only_PHP)
- [Apache FLV streaming using a native Apache module](http://tperspective.blogspot.com/2009/02/apache-flv-streaming-done-right.html)
- [HTTP/1.1 capable web servers with support for byte-range requests a.k.a Byte serving.](http://en.wikipedia.org/wiki/Byte_serving)Requires[a socket policy file server](http://www.adobe.com/devnet/flashplayer/articles/socket_policy_files.html)to be installed and supports flv files only.

See also[pseudostreaming with IIS and ASP.NET](http://flowplayer.org/forum/5/14702)