[Libav-user] Why is HTTP streaming so slow?
mbradshaw at sorensonmedia.com
Thu May 24 23:35:35 CEST 2012
On Thu, May 24, 2012 at 2:05 PM, Andrey Utkin
<andrey.krieger.utkin at gmail.com> wrote:
>> Is there a particular reason FFmpeg streams so slowly?
> Coz while you decode, you don't fetch, and while you fetch, you don't
> decode. That's what switching overhead and lack of parallelism in your app
> result in.
Hmmm... that seems like it would make sense, but I just ran a simple
test program that simply loops and calls av_read_frame() (no decoding)
and I get the same results (uses <5% of the CPU, so it doesn't look
like the network is waiting on the CPU). Here's what I've found (and
these numbers seem pretty consistent on my machine):
Downloading in Google Chrome is about 50x faster
Downloading in Internet Explorer is about 25x faster
Streaming with QuickTime Player is about 25x faster
Streaming with Media Player Classic - Home Cinema is about 25x faster
Downloading with wget is about 5x faster (I wonder if wget was
demuxing and things like my decoder does if they'd be about the same
I have no idea why Chrome, IE, QT, and MPC-HC are so much faster, and
I wonder if they're setting some network options in their sockets
(maybe setting a larger window size or something?), and I wonder why
wget isn't nearly as fast as them.
More information about the Libav-user