0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00
mpv/etc/builtin.conf
wm4 775b86212d video: add option to reduce latency by 1 or 2 frames
The playback start logic explicitly waits until the first frame has been
displayed. Usually this will introduce a wait of 1 vsync. For normal
playback this doesn't matter, but with respect to low latency needs,
this only leads to additional data getting queued up in the demuxer or
network buffers.

Another thing is that the timing logic decodes 1 frame ahead (= 1 frame
extra latency) to determine the exact duration of a frame.

To be fair, there doesn't really seem to be a hard reason why this is
needed. With the current code, enabling the option does lead to A/V
desync sometimes (if the demuxer FPS is too inaccurate), and also frame
drops at playback start in some situations. But this all seems to be
avoidable, if the timing logic were to be rewritten completely, which
should probably happen in the future. Thus the new option comes with the
warning that it can be removed any time. This is also why the option has
"hack" in the name.
2018-03-03 02:38:01 +02:00

60 lines
1.4 KiB
Plaintext

# This file is baked into the mpv binary at compile time, and automatically
# loaded at early initialization time. Some of the profiles are automatically
# applied at later stages during loading.
[pseudo-gui]
player-operation-mode=pseudo-gui
[builtin-pseudo-gui]
terminal=no
force-window=yes
idle=once
screenshot-directory=~~desktop/
[libmpv]
config=no
idle=yes
terminal=no
input-terminal=no
osc=no
input-default-bindings=no
input-vo-keyboard=no
# OSX/Cocoa global input hooks
input-appleremote=no
input-media-keys=no
[encoding]
vo=lavc
ao=lavc
keep-open=no
force-window=no
gapless-audio=yes
resume-playback=no
load-scripts=no
osc=no
framedrop=no
[gpu-hq]
scale=spline36
cscale=spline36
dscale=mitchell
dither-depth=auto
correct-downscaling=yes
sigmoid-upscaling=yes
deband=yes
[low-latency]
audio-buffer=0 # minimize extra audio buffer (can lead to dropouts)
vd-lavc-threads=1 # multithreaded decoding buffers extra frames
cache-pause=no # do not pause on underruns
demuxer-lavf-o-add=fflags=+nobuffer # can help for weird reasons
demuxer-lavf-probe-info=nostreams # avoid probing unless absolutely needed
demuxer-lavf-analyzeduration=0.1 # if it probes, reduce it
video-sync=audio # DS currently requires reading ahead a frame
interpolation=no # requires reference frames (more buffering)
video-latency-hacks=yes # typically 1 or 2 video frame less latency
# Compatibility alias (deprecated)
[opengl-hq]
profile=gpu-hq