mpv-player / mpv-player/mpv

Resynchronization of Audio/Video on audio filter changed

Open
#1,680 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

core:audio core:video filter meta:feature-request priority:stalled
Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Description

As I said in https://github.com/mpv-player/mpv/issues/1678, I'm tryng to prefetch audio data.
I found that I got the A-V desync when a filter which has delay is inserted.
This is also true for scaletempo which is built-in filter of mpv.

For instance, let's say a filter whose delay is 0.1sec is inserted. Then, I get 0.1 seconds of AV desync immediately and it decrease gradually. Usually, delay which is introduced by filter is less than 1 second and the out-of-sync state goes away quickly.

However, in my case, I need a huge delay over than 10 seconds and it takes several seconds to reduce that desync. Futhermore, this delay is accumulated whenever toggling the filter.

So, I think it would be good to resynchronize A-V when audio delay is introduced by filter.
Or, maybe it's more useful to introduce a command to resynchronize A-V at anytime for general purpose. For now, I'm enforcing to synchronize A-V by seeking.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names delayed audio filters and scaletempo but provides no file or test entry point. Start by reproducing the accumulated A-V desync when toggling a delayed filter, using seeking as the current comparison. Before implementation, clarify whether the desired result is automatic resynchronization or a general-purpose resync command, then verify that the chosen behavior prevents the reported drift.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
audio-video-rtc
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.