[FFmpeg-user] ffserver HTTP stream playback freeze

Stefano Sabatini stefasab at gmail.com
Fri Dec 20 00:18:40 CET 2013

On date Wednesday 2013-12-18 19:49:27 +0100, Stefano Sabatini wrote:
> Hi,
> I'm trying to debug this but since it's starting to take much time I
> wonder if someone already got the same issue, and found a fix for it.
> Scenario: I'm generating a stream with ffmpeg, which is then sent to
> ffserver and published as an HTTP resource.
> Problem: at some point the published stream is interrupted, I usually
> get decoding errors on the client (probably due to a segmented
> packet), and the player freezes. If I now restart the player, the
> stream will be played again until the next freeze. Many instances of
> player/downloader can be created at the same time, and each one seems
> to freeze independently from the others.
> The freezeing time usually is just a few seconds, but the playback
> duration varies from a few seconds to dozens of seconds.
> If I use ffplay or vlc the stream usually freezes after few seconds,
> but playback seems to last much more if I download the stream with
> wget instead (so it may be somehow related to the TCP/HTTP session
> between ffplay and ffserver).
> I tried several combinations, changing output container, video codec,
> and bitrate, but it doesn't seem to affect the issue.
> Curiously, I get this problem only when I play the stream from a
> remote machine.

Works fine in my internal network and in an external one, freeze
issues observed in two external networks. TCP debugging with wireshark
shows that the freeze occurrs just after a TCP ZeroWindow event on the
client side, then for some reasons the server stops to react and won't
send new packets.

At this point, the issue seems probably due to the network
configuration and is maybe related to the buffering parameters adopted
by client / server. Suggestions about how to handle the issue are
still welcome.

More information about the ffmpeg-user mailing list