mpv-player / mpv-player/mpv

Using MPV as a progress window for VapourSynth

Open
#9,963 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

os:win
Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Description

Important Information
Reproduction steps

I'm using VapourSynth and piping VSPipe with a y4m header to ffmpeg, outputting my video with the .MKV file extension, my goal is to have some kind of preview that shows what has been rendered so far, I noticed MPV can play my .MKV files even while they're still rendering

Expected behavior

MPV would play the unfinished video, reach the end of what has currently been rendered, then waits until more is rendered to play a few frames, then play them once they're outputted to the mkv file

Actual behavior

Adding the keep-open option in mpv.conf pauses the video once it reaches the end of what has been rendered so far, when I try to go back a few seconds then make it play again it goes further

(Not adding keep-open simply exits as soon as it reaches the point that hasn't been rendered yet)

Log file

Sample files

Make a .vpy file with a video input (lsmash/ffms) and output (clip.set_output()) in it, example:

import vapoursynth as vs
core = vs.core

core.std.LoadPlugin(path="C:/Path/To/ffms2.dll") # Remove that line if you have it added to /vapoursynth64/plugins
clip = core.ffms2.Source(source=r"D:\video.mkv", cache=False)
clip.set_output()

And , then do the following command:
vspipe foo.vpy --container y4m -| ffmpeg -i - -c:v libx265 -preset slow bar.mkv
(Slow preset so MPV can catch up to the part where it has finished

PS: Yes I know you can pipe to mpv - but I'm looking to output an encoded file and be able to play it if I want to

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 by reproducing the VapourSynth-to-ffmpeg pipeline with mpv 0.34.0 and compare behavior with and without the keep-open option. The work is done when mpv can follow the growing MKV, wait at the current end, and resume when more frames are available without requiring manual seeking.

Written by the indexing model from the issue text.

Assessment

Domain
audio-video-rtc
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.