[FFmpeg-user] Question about improving the latency with FFServer

Shen Chuan shen at minutekey.com
Mon Aug 18 00:13:09 CEST 2014


We are trying to stream a video from webCam through a 3G cell modem
connection using ffserver. But looks like *the latency of the streaming was
kept accumulating*. For example, when we started ffserver it may delays a
couple of seconds, but if we leave the stream open for 5 mins, the delay is
accumulated to 10 mins which is difficult for us to use. But looks like
after we remove /tmp/webcam.ffm defined in ffserver.conf, the latency would
be reset to a couple of second again. We are considering to use adaptive
streaming server but if there are some other ways to improve the
performance of ffserver that would be great. Followings are our
configuration. Not sure if other people have the similar issue and they
have some good way to get over it.

Thank you so much for your help/comments.



Command to pipe webCam stream to port:

ffmpeg -loglevel quiet -r 15 -s 640x480 -f video4linux2 -i /dev/webcam -vf
fps=1 http://localhost:8001/webcam.ffm

Port 8001
MaxClients 4
MaxBandwidth 1000000

<Feed webcam.ffm>
File /tmp/webcam.ffm
FileMaxSize 5M

<Stream webcam.webm>
Feed webcam.ffm
Format webm

VideoCodec libvpx
VideoSize 480x320 # Video resolution
VideoFrameRate 5 # Video FPS
AVOptionVideo flags +global_header # Parameters passed to encoder # (same
as ffmpeg command-line parameters)
AVOptionVideo cpu-used 0
AVOptionVideo qmin 10
AVOptionVideo qmax 42
AVOptionVideo quality rt
AVOptionAudio flags +global_header
PreRoll 0
VideoBitRate 5 # Video bitrate

More information about the ffmpeg-user mailing list