Hey,
according to the Flash Video (FLV) specification [1] E.2 & E.3, [2],
the correct format of the FLV header and the beginning of the stream is:

   FLV\x01(\x01|\x04|\x05)\x00\x00\x00\x09\x00\x00\x00\x00

with 5th byte denoting presence of video (\x01), audio (\x04)
or both (\x05).

However, nginx is currently using:

   FLV\x01\x01\x00\x00\x00\x09\x00\x00\x00\x09

and while denoting presence of only video tags (\x01) isn't strictly
incorrect, denoting presence of both audio and video (\x05) would match
"real world" usage much closer.

The real problem is \x00\x00\x00\x09 in the beginning of the stream
(denoting size of the previous tag), which is plainly wrong, because
according to the specification it should be always \x00\x00\x00\x00.

I'm aware of the fact that virtually all other pseudo-streaming modules
are using the same incorrect header, but that doesn't mean that nginx
must use it as well. Attached patch fixes this.

[1] http://www.adobe.com/devnet/f4v.html
[2] http://osflash.org/flv#flv_format

Best regards,
Piotr Sikora < piotr.sikora@frickle.com >

