mpv-player / mpv-player/mpv

video-add for adding looping video that lasts the duration of the audio stream and isn't affected by seeks

Open
#8,712 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

core:option-param-conf core:video meta:feature-request
Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Description

Bit of an odd request here that I don't expect anyone else will want, but I'd like to know how to implement this for my fork as it would be very useful for my purposes.

I'm trying to work out how to essentially uncouple the video and audio playback. On seeking I want the video track to continue (completely ignoring the seek event), but seeking just the selected audio track.
Another way to think of it is a way for displaying animated album artwork for a song or album.
I can also imagine maybe needing a non-seekable looping audio track - e.g. looping bird-song (that ignores seeks) to play over a long video.

For video tracks I've marked as 'unseekable' I've tried simply skipping the 'demux_seek' call for their demuxer in playloop.c. The video freezes but doesn't continue after seek. Shortly thereafter I get the EOF message for the video stream.
Skipping reset_video_state in reset_playback_state didn't help either.
I suspect the solution is probably a lot more complicated than that!

Any ideas how to get the results I want?

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

Start in playloop.c and trace demux_seek, reset_video_state, and reset_playback_state to understand how seeking and EOF handling affect individual streams. A complete solution would define and implement independent seek behavior for looping video or audio tracks, with playback continuing correctly after seeks; the issue does not identify a test or specific entry point beyond these symbols.

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
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.