[FFmpeg-devel] [PATCH] HTTP: optimize forward seek performance
Michael Niedermayer
michael at niedermayer.cc
Fri Jan 13 01:45:55 EET 2017
On Thu, Jan 12, 2017 at 10:59:56AM -0600, Joel Cunningham wrote:
> Nicolas,
>
> I’ve found existing “read-ahead logic” in avio_seek to do what I’ve implemented in http_stream_forward(). This is controlled by SHORT_SEEK_THRESHOLD, currently set to 4KB. I proto-typed increasing this to the 256KB (matches the initial TCP window in my test setup) and saw the same number of reduction in HTTP GETs and the number of seeks! Thanks for the heads up, this should reduce my patch size!
>
> I could plumb this setting (s->short_seek_threshold) to a URL function that would get the desired value from HTTP/TCP. Looking at how ffio_init_context() is implemented, it doesn’t appear to have access to the URLContext pointer. Any guidance on how I can plumb the protocol layer with aviobuf without a public API change?
i just quickly read this thread and didnt think deeply about it but
remembered this old (somewhat ugly) patchset:
88066 O 0327 0:24 Michael Niederm (1.1K) [FFmpeg-devel] [PATCH 1/2] avformat/aviobuf: Use a 512kb IO buffer for http* instead of 32kb
88067 0327 0:24 Michael Niederm (0.7K) ├─>[FFmpeg-devel] [PATCH 2/2] avformat/aviobuf: increase SHORT_SEEK_THRESHOLD from 4096 to 8192
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170113/3176652d/attachment.sig>
More information about the ffmpeg-devel
mailing list