linuxhttpffmpegstreamffserver

HTTP Live Stream stops playing after a while


I have a problem with streaming with ffserver. After I start ffserver and desktop-capture, everything seems to work fine.

Then I open the browser and access the output(http://localhost:8090/test1.mpeg). It plays fine for 6-7 seconds then it stops and I have to refresh the page to get it work again. Does anyone know why that happens and how I can correct it?

Here is my ffserver.conf

HTTPPort 8090
HTTPBindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 40000
CustomLog -

<Feed feed1.ffm>
  File /tmp/feed1.ffm
  FileMaxSize 10000K
  ACL allow 127.0.0.1
  ACL allow localhost
  ACL allow 192.168.0.0 192.168.255.255
</Feed>

<Stream test1.mpeg>
  Feed feed1.ffm
  Format mpeg
  AudioBitRate 32
  AudioChannels 1
  AudioSampleRate 44100
  VideoBitRate 300
  VideoFrameRate 30
  VideoSize 1280x1024
  VideoCodec mpeg1video
  AudioCodec libvorbis
  NoAudio
  StartSendOnKey
</Stream>

my desktop-capture:

ffmpeg -f x11grab -r 40 -s 800x600 -framerate 50  -i :0.0+4,529 -map 0 -codec:v mpeg1video -codec:a libvorbis http://localhost:8090/feed1.ffm

Solution

  • The Problem was, that the VideoBitRate was too low. I changed it to 3000 and now it runs without Problems.

    now my ffserver.conf looks like this:

    HTTPPort 8090
    HTTPBindAddress 0.0.0.0
    MaxHTTPConnections 2000
    MaxClients 1000
    MaxBandwidth 40000
    CustomLog -
    
    <Feed feed1.ffm>
       File /tmp/feed1.ffm
       FileMaxSize 10000K
       ACL allow 127.0.0.1
       ACL allow localhost
       ACL allow 192.168.0.0 192.168.255.255
    </Feed>
    
    <Stream test1.mpeg>
       Feed feed1.ffm
       Format mpeg
       AudioBitRate 50
       AudioChannels 1
       AudioSampleRate 44100
    
       # Bitrate for the video stream
       VideoBitRate 3000
    
       VideoFrameRate 30
       VideoSize 1280x1024
       VideoCodec mpeg1video
       AudioCodec libvorbis
       NoAudio
       StartSendOnKey
    </Stream>