diff options
author | wm4 <wm4@nowhere> | 2013-05-27 23:26:22 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-05-27 23:26:22 +0200 |
commit | 8cfb87d200b9029d9318d1c6ce76e489e78c2121 (patch) | |
tree | 324bcf36302584ffae7cb95a83d235c0678e46d4 /core/screenshot.h | |
parent | f05ec1c7389719f151b9d2053f0050abff7f7252 (diff) | |
download | mpv-8cfb87d200b9029d9318d1c6ce76e489e78c2121.tar.bz2 mpv-8cfb87d200b9029d9318d1c6ce76e489e78c2121.tar.xz |
demux_lavf: minimal probing and reduced analyzeduration for AAC over HTTP
When AAC is streamed over HTTP, using libavformat defaults is
pathetically slow. One solution for that is skipping probing and using
the mimetype to identify that it's AAC instead. This is what we did
before this commit (and ffmpeg does it too, but their logic is too
"inaccessible" for mpv).
This is still pretty fragile though. Make it a bit more robust by
requiring minimal probing. A probescore of 25 is reached after feeding
2 KB to libavformat (instead of > 500 KB for the normal probescore), so
use that. This is done only when streaming AAC from HTTP to reduce the
possibility of weird breakages for other formats.
Also reduce analyzeduration. The default analyzeduration will make
libavformat read lots of data, which makes playback start slow. So we
set analyzeduration to a low value. On the other hand, doing that for
other formats is risky, because there are unspecified effects with
certain "strange" formats (like transport streams). So we do this only
if we're streaming AAC from HTTP as well.
tl;dr libavformat is shit for media players
Diffstat (limited to 'core/screenshot.h')
0 files changed, 0 insertions, 0 deletions