better time-pos behavior
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 37k
- Forks
- 3.5k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Description
Pulled out from https://github.com/mpv-player/mpv/pull/13614#issuecomment-1975322056
Another convenience may be a better version of
time-posthat isn't dependent on video frame rate or synchronization, but a property that represents where the playback "should be".time-posis discrete and locked to the frame rate so the resolution isn't always sufficient, andaudio-ptsisn't guaranteed to be in sync, is nil during seeking, and isn't even guaranteed to exist for files without an audio stream. For example, for a 10fps video, the new property would be able to return something like 0.35317865 when it's on the 4th frame, rather than 0.300. And if a/v gets out of sync, it doesn't return where the audio playback currently is, but the target time the video and/or audio stream is trying to sync up with. So if it skips a few frames or needs to adjust audio or something, the property keeps increasingly at a constant rate as if nothing happened.
https://github.com/mpv-player/mpv/pull/13614#issuecomment-1975399280
If it wouldn't break much, perhaps this new property could replace
time-pos, since in most cases it should be functionally equivalent or better. And then the currenttime-poswould get renamed tovideo-ptssince that name doesn't exist yet, and for video files that's basically whattime-posis.
Then you'd end up withvideo-ptsandaudio-ptsrepresenting the actual time of each stream andtime-posis what they're both getting synced to, if that makes any sense
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review PR #13614 and the linked discussion first; the issue identifies no source files or tests. Define the new playback-position semantics, including seeking and streams without audio, and determine whether the existing time-pos property should be replaced or renamed as proposed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100