diff --git a/tests/Makefile b/tests/Makefile
index 746f190f04..6358b5c81f 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -9,9 +9,14 @@ CFLAGS=-O2 -Wall -g
REFFILE=$(SRC_PATH)/tests/ffmpeg.regression.ref
+SERVER_REFFILE=$(SRC_PATH)/tests/ffserver.regression.ref
+
LIBAV_REFFILE=$(SRC_PATH)/tests/libav.regression.ref
-all: test
+all: test test-server
+
+test-server: vsynth1/0.pgm asynth1.sw
+ @$(SRC_PATH)/tests/server-regression.sh $(SERVER_REFFILE)
# fast regression tests for all codecs
test mpeg4 mpeg: vsynth1/0.pgm asynth1.sw
diff --git a/tests/ffserver.regression.ref b/tests/ffserver.regression.ref
new file mode 100644
index 0000000000..121a14bc82
--- /dev/null
+++ b/tests/ffserver.regression.ref
@@ -0,0 +1,12 @@
+7bf9a40a17c5be245be240c9a3c9e4e7 test_h.avi
+574837c3606a866d7a29d4ca06da1050 test_l.avi
+77062b94a9994c839b87ef4900ea272c test_h.mpg
+ee8c31c5708bed84a72256afdc510dd2 test_l.mpg
+9e5dc8a640ada7d66a2b6365713a982a test.swf
+d5f3078d72062b91cf8ce98920bd150b test_h.asf
+623b9e764e07231ecc39ba1a3e090bc2 test_l.asf
+703f00c6c1d4eec27aba51920a10cc25 test_h.rm
+4dd1f53c1e4e43ae8718681c3ade6ff8 test_l.rm
+a73eafd5c2690eb2195dd1aef617a2f8 test.jpg
+4517811e6371cbf0b0d141aaaec47d47 test_small.jpg
+c504cc470edb77a4eff44bcdf10556a5 test.mjpg
diff --git a/tests/server-regression.sh b/tests/server-regression.sh
new file mode 100755
index 0000000000..d5a41c5f1f
--- /dev/null
+++ b/tests/server-regression.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+FILES=`perl -n -e 'print \$1, " " if //i' test.conf`
+
+rm -f /tmp/feed.ffm
+../ffserver -d -f test.conf 2> /dev/null &
+FFSERVER_PID=$!
+sleep 1
+(
+ cd data
+ for file in $FILES; do
+ wget --user-agent=NSPlayer -q --output-document=- http://localhost:9999/$file?date=19700101T000000Z | head --bytes=100000 > $file &
+ done
+ wait
+ # the status page is always different
+ md5sum $FILES | grep -v html > ffserver.regression
+)
+kill $FFSERVER_PID
+wait > /dev/null 2>&1
+if diff -u data/ffserver.regression $1 ; then
+ echo
+ echo Server regression test succeeded.
+ exit 0
+else
+ echo
+ echo Server regression test: Error.
+ exit 1
+fi
diff --git a/tests/test.conf b/tests/test.conf
index af0327a989..028eea4ab8 100644
--- a/tests/test.conf
+++ b/tests/test.conf
@@ -51,7 +51,7 @@ CustomLog -
# File=/tmp/feed_name.ffm FileMaxSize=5M
File /tmp/feed.ffm
-FileMaxSize 10M
+FileMaxSize 100M
# Fire up ffmpeg pointing at this stream
@@ -70,14 +70,14 @@ Feed feed1.ffm
Format avi
#
VideoFrameRate 10
-VideoSize 320x240
+VideoSize 352x288
VideoBitRate 100
VideoGopSize 30
NoAudio
PreRoll 10
StartSendOnKey
-MaxTime 1000
+MaxTime 100
@@ -93,7 +93,52 @@ NoAudio
PreRoll 20
StartSendOnKey
-MaxTime 1000
+MaxTime 100
+
+
+
+
+Feed feed1.ffm
+#
+VideoFrameRate 10
+VideoSize 352x288
+VideoBitRate 100
+VideoGopSize 30
+NoAudio
+
+PreRoll 10
+StartSendOnKey
+MaxTime 100
+
+
+
+
+Feed feed1.ffm
+#
+VideoFrameRate 2
+VideoSize 320x240
+VideoBitRate 40
+VideoGopSize 20
+NoAudio
+
+PreRoll 20
+StartSendOnKey
+MaxTime 100
+
+
+
+
+Feed feed1.ffm
+#
+VideoFrameRate 10
+VideoSize 352x288
+VideoBitRate 100
+VideoGopSize 30
+NoAudio
+
+PreRoll 10
+StartSendOnKey
+MaxTime 100
@@ -109,7 +154,7 @@ NoAudio
PreRoll 10
StartSendOnKey
-MaxTime 1000
+MaxTime 100
Title "Test data stream"
@@ -127,7 +172,7 @@ NoAudio
PreRoll 20
StartSendOnKey
-MaxTime 1000
+MaxTime 100
Title "Test data stream"
@@ -146,7 +191,7 @@ NoAudio
PreRoll 10
StartSendOnKey
-MaxTime 1000
+MaxTime 100
@@ -163,7 +208,7 @@ NoAudio
PreRoll 20
StartSendOnKey
-MaxTime 1000
+MaxTime 100
@@ -174,7 +219,20 @@ Feed feed1.ffm
Format singlejpeg
VideoFrameRate 1
-VideoSize 320x240
+VideoSize 352x288
+NoAudio
+
+PreRoll 2
+
+
+
+
+
+Feed feed1.ffm
+Format singlejpeg
+
+VideoFrameRate 1
+VideoSize 160x128
NoAudio
PreRoll 2
@@ -192,7 +250,7 @@ NoAudio
StartSendOnKey
PreRoll 1
-MaxTime 1000
+MaxTime 100