mirror of
https://github.com/yattee/yattee.git
synced 2024-11-09 15:58:20 +00:00
tweaked A/V-sync for MPV
Signed-off-by: Toni Förster <toni.foerster@gmail.com>
This commit is contained in:
parent
8596ee8811
commit
a55808921d
@ -79,6 +79,8 @@ final class MPVClient: ObservableObject {
|
|||||||
checkError(mpv_set_option_string(mpv, "user-agent", UserAgentManager.shared.userAgent))
|
checkError(mpv_set_option_string(mpv, "user-agent", UserAgentManager.shared.userAgent))
|
||||||
checkError(mpv_set_option_string(mpv, "initial-audio-sync", Defaults[.mpvInitialAudioSync] ? "yes" : "no"))
|
checkError(mpv_set_option_string(mpv, "initial-audio-sync", Defaults[.mpvInitialAudioSync] ? "yes" : "no"))
|
||||||
|
|
||||||
|
// A/V-SYNC //
|
||||||
|
|
||||||
// Enable VSYNC – needed for `video-sync`
|
// Enable VSYNC – needed for `video-sync`
|
||||||
checkError(mpv_set_option_string(mpv, "opengl-swapinterval", "1"))
|
checkError(mpv_set_option_string(mpv, "opengl-swapinterval", "1"))
|
||||||
checkError(mpv_set_option_string(mpv, "video-sync", "display-resample"))
|
checkError(mpv_set_option_string(mpv, "video-sync", "display-resample"))
|
||||||
@ -87,6 +89,11 @@ final class MPVClient: ObservableObject {
|
|||||||
checkError(mpv_set_option_string(mpv, "tscale-window", "blackman"))
|
checkError(mpv_set_option_string(mpv, "tscale-window", "blackman"))
|
||||||
checkError(mpv_set_option_string(mpv, "vd-lavc-framedrop", "nonref"))
|
checkError(mpv_set_option_string(mpv, "vd-lavc-framedrop", "nonref"))
|
||||||
checkError(mpv_set_option_string(mpv, "display-fps-override", "\(String(getScreenRefreshRate()))"))
|
checkError(mpv_set_option_string(mpv, "display-fps-override", "\(String(getScreenRefreshRate()))"))
|
||||||
|
checkError(mpv_set_option_string(mpv, "video-sync-max-factor", "1.1"))
|
||||||
|
checkError(mpv_set_option_string(mpv, "video-sync-max-video-change", "10"))
|
||||||
|
checkError(mpv_set_option_string(mpv, "audio-buffer", "0.2"))
|
||||||
|
checkError(mpv_set_option_string(mpv, "audio-wait-open", "no"))
|
||||||
|
checkError(mpv_set_option_string(mpv, "force-window", "yes"))
|
||||||
|
|
||||||
// CPU //
|
// CPU //
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user