http://blog.chinaunix.net/uid-9688646-id-3399113.html
File "/project/apps/ffserver/test.flv"
Format flv
</Stream>
Error occurs when I transcode a file into asf format
http://ffmpeg.gusari.org/viewtopic.php?f=11&t=590
You can't stream avi file format, it's not designed to be streamed, rather to be used as a file/storage format. Streaming formats are: flv, mpegts, asf, rtmp/rtp/rtsp... So, try changing Format avi to Format mpegts and see if that works. But, the most convenient way of using ffmpeg/ffserver is to create a config file for ffserver and then run ffmpeg, telling it to feed the ffserver, which will do the actual encoding and streaming.
ffmpeg與ffserver的協同工作
http://blog.csdn.net/shendan00/article/details/18839837
工作流程如下:
1、 啟動ffserver,配置參數
ffserver先於ffmpeg啟動,它在啟動的時候需要加參數-f指定其配置文件,配置文件里包含端口信息、緩沖文件配置、傳送流配置(如編碼方式,幀率,采樣率……)。
2、 啟動ffmpeg,輸入流
啟動ffmpeg,向緩沖文件輸入數據流,數據流可以來自攝像頭,也可以來自本來就存在的文件。
feed1.ffm是一個緩沖文件,fserver啟動后,feed1.ffm就會自動被創建,feed1.ffm開始的部分已經寫入向客戶端傳送流的配置信息,在feed1.ffm做緩沖用的時候,這些信息是不會被覆蓋掉。
ffmpeg啟動的一個關鍵參數就是“http://ip:port/feed1.ffm”,其中ip是運行ffserver主機的ip,如果 ffmpeg和ffserver都在同一系統中運行的話,用localhost或者127.0.0.1也行。ffmpeg啟動后會與ffserver建立 一個連接(短暫的連接),通過這第一次的連接,ffmpeg從ffserver那里獲取了向客戶端輸出流的配置,並把這些配置作為自己編碼輸出的配置,然后ffmpeg斷開了這次連接,再次與ffserver建立連接(長久的連接),利用這個連接ffmpeg會把編碼后的數據發送給ffserver。如果你觀察ffserver端的輸出就會發現這段時間會出現兩次HTTP的200,這就是兩次連接的過程。
3、連接過程
ffmpeg從攝像頭獲取數據后,按照輸出流的編碼方式編碼,然后發送給ffserver,ffserver收到ffmpeg的數據后,如果網絡上 沒有播放的請求,就把數據寫入feed1.ffm中緩存,寫入時把數據加上些頭信息然后分塊,每塊4096B(每塊也有結構),當feed1.ffm的大 小到了ffserver.conf中規定的大小后,就會從文件開始(跳過頭)寫入,覆蓋舊的數據。直到網絡上有播放的請求,ffserver從feed1.ffm中讀取數據,發送給客戶端。

RTSPPort 8091
BindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 1000
CustomLog -
<Feed feed1.ffm>
#File /tmp/feed1.ffm
File "/home/yingc/gcyin/test/thirdparty/output/ffmpeg/bin/feed1.ffm"
FileMaxSize 20000000K
ACL allow 127.0.0.1
</Feed>
#<Stream test.ts>
#Feed feed1.ffm
#Format mpegts
#
#AudioCodec libmp3lame
#AudioBitRate 128
#AudioChannels 2
#AudioSampleRate 44100
#AVOptionAudio flags +global_header
#
#VideoBitRate 800
#VideoFrameRate 25
#VideoSize 640x480
#VideoCodec libx264
#AVOptionVideo flags +global_header
#</Stream>
#
#<Stream test.asf>
#Feed feed1.ffm
#Format asf
#
#AudioCodec aac
#AudioBitRate 128
#AudioChannels 2
#AudioSampleRate 44100
#AVOptionAudio flags +global_header
#
#VideoBitRate 800
#VideoFrameRate 25
#VideoSize 640x480
#VideoCodec libx264
#AVOptionVideo flags +global_header
#</Stream>
<Stream test.ts>
Feed feed1.ffm
Format mpegts
</Stream>
<Stream test.avi>
Feed feed1.ffm
Format avi
</Stream>
<Stream test.flv>
Feed feed1.ffm
Format flv
</Stream>
<Stream test.mp4>
Format rtp
File "/home/yingc/gcyin/test/thirdparty/output/ffmpeg/bin/h.mp4"
</Stream>
<Stream test.asf>
Feed feed1.ffm
Format asf
</Stream>
<Stream stat.html>
Format status
# Only allow local people to get the status
ACL allow localhost
ACL allow 192.168.110.0 192.168.110.255
</Stream>
# Redirect index.html to the appropriate site
<Redirect index.html>
URL http://www.ffmpeg.org/
</Redirect>