{"action":"created","issue":{"url":"https://api.github.com/repos/mpv-player/mpv/issues/3928","repository_url":"https://api.github.com/repos/mpv-player/mpv","labels_url":"https://api.github.com/repos/mpv-player/mpv/issues/3928/labels{/name}","comments_url":"https://api.github.com/repos/mpv-player/mpv/issues/3928/comments","events_url":"https://api.github.com/repos/mpv-player/mpv/issues/3928/events","html_url":"https://github.com/mpv-player/mpv/issues/3928","id":196710979,"number":3928,"title":"Rubberband: Add support for getLatency() to avoid desync","user":{"login":"SteveJobzniak","id":22373193,"avatar_url":"https://avatars3.githubusercontent.com/u/22373193?v=4","gravatar_id":"","url":"https://api.github.com/users/SteveJobzniak","html_url":"https://github.com/SteveJobzniak","followers_url":"https://api.github.com/users/SteveJobzniak/followers","following_url":"https://api.github.com/users/SteveJobzniak/following{/other_user}","gists_url":"https://api.github.com/users/SteveJobzniak/gists{/gist_id}","starred_url":"https://api.github.com/users/SteveJobzniak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SteveJobzniak/subscriptions","organizations_url":"https://api.github.com/users/SteveJobzniak/orgs","repos_url":"https://api.github.com/users/SteveJobzniak/repos","events_url":"https://api.github.com/users/SteveJobzniak/events{/privacy}","received_events_url":"https://api.github.com/users/SteveJobzniak/received_events","type":"User","site_admin":false},"labels":[{"id":16338842,"url":"https://api.github.com/repos/mpv-player/mpv/labels/feature%20request","name":"feature request","color":"84b6eb","default":false},{"id":86783069,"url":"https://api.github.com/repos/mpv-player/mpv/labels/low%20priority","name":"low priority","color":"c7def8","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2016-12-20T16:05:01Z","updated_at":"2018-03-01T16:22:13Z","closed_at":null,"author_association":"NONE","body":"According to wm4, the rubberband module in mpv might not be adjusting the video sync relative to the latency of the rubberband processing, which would explain the annoying audio/video desync that can happen when rubberband is used in mpv. See: https://github.com/mpv-player/mpv/issues/3231#issuecomment-268223353\r\n\r\nHere is the option:\r\n\r\nhttp://breakfastquay.com/rubberband/why.html\r\n\r\n>Known, accurately reported latency;\r\n\r\n>http://breakfastquay.com/rubberband/code-doc/classRubberBand_1_1RubberBandStretcher.html#a6eb4a44a7f58ebca9dbfa36ef6a57963\r\n\r\n`size_t RubberBand::RubberBandStretcher::getLatency\t(\t\t)\tconst`\r\n\r\n> **Return the processing latency of the stretcher.**\r\n> \r\n> This is the number of audio samples that one would have to discard at the start of the output in order to ensure that the resulting audio aligned with the input audio at the start. In Offline mode, latency is automatically adjusted for and the result is zero. **In RealTime mode, the latency may depend on the time and pitch ratio and other options.**\r\n\r\nSo it is a dynamically reactive latency value expressed in number of audio samples. Using that, mpv can always know how much the audio is delayed, and delay the video too accordingly, to keep everything in perfect sync.\r\n\r\nAs for why I use Rubberband (for those who wonder): https://github.com/mpv-player/mpv/issues/3231#issuecomment-268140439"},"comment":{"url":"https://api.github.com/repos/mpv-player/mpv/issues/comments/369645994","html_url":"https://github.com/mpv-player/mpv/issues/3928#issuecomment-369645994","issue_url":"https://api.github.com/repos/mpv-player/mpv/issues/3928","id":369645994,"user":{"login":"gwarser","id":886325,"avatar_url":"https://avatars2.githubusercontent.com/u/886325?v=4","gravatar_id":"","url":"https://api.github.com/users/gwarser","html_url":"https://github.com/gwarser","followers_url":"https://api.github.com/users/gwarser/followers","following_url":"https://api.github.com/users/gwarser/following{/other_user}","gists_url":"https://api.github.com/users/gwarser/gists{/gist_id}","starred_url":"https://api.github.com/users/gwarser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwarser/subscriptions","organizations_url":"https://api.github.com/users/gwarser/orgs","repos_url":"https://api.github.com/users/gwarser/repos","events_url":"https://api.github.com/users/gwarser/events{/privacy}","received_events_url":"https://api.github.com/users/gwarser/received_events","type":"User","site_admin":false},"created_at":"2018-03-01T16:22:13Z","updated_at":"2018-03-01T16:22:13Z","author_association":"NONE","body":"On Mint 18, after update to:\r\n```\r\nmpv git-2018-02-01-7f3c710-dirty Copyright © 2000-2018 mpv/MPlayer/mplayer2 projects\r\n built on Thu Feb 22 12:49:39 UTC 2018\r\nffmpeg library versions:\r\n   libavutil       56.7.100\r\n   libavcodec      58.9.100\r\n   libavformat     58.7.100\r\n   libswscale      5.0.101\r\n   libavfilter     7.11.101\r\n   libswresample   3.0.101\r\nffmpeg version: git-2018-02-01-b1af0e2\r\n```\r\n`af-add=rubberband=pitch=quality` in my config started causing audio desyncs after seeking - more seeking, larger desync."}}
{"actor":{"display_login":"gwarser"}}