mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
26.7k stars 2.84k forks source link

Jerky playback when gradually changing speed #12860

Open christoph-heinrich opened 7 months ago

christoph-heinrich commented 7 months ago

Important Information

Provide following Information:

Reproduction steps

There are a lot of mistimed frames when speeding up or slowing down when holding the right arrow key while using evafast together with --video-sync=display-resample or --video-sync=display-tempo. It must have something to do with AV sync, because --video-sync=display-desync doesn't have this problem.

Unfortunately the motion in the recordings isn't a good representation of what it actually looks like. That might be a problem with OBS, but at least the mistimed frames can be seen in the stats.

Expected behavior

Motion in the video remains smooth, like is the case with --video-sync=display-desync.

https://github.com/mpv-player/mpv/assets/8932183/5774ac21-185f-4eea-ae0e-4c01acc26631

Actual behavior

Jerky motion due to mistimed frames.

https://github.com/mpv-player/mpv/assets/8932183/f2223d0e-0dc4-47d2-a871-4d4d76c868ee

Log file

evafast_display-sync.txt

Sample files

Any video will do, it's particularly noticeable during panning shots.

Dudemanguy commented 7 months ago

Plasma doesn't support presentation time. Is the behavior any different on a compositor that does (basically any other one of the major ones)?

Not sure if this script does something different under the hood besides changing the speed. That doesn't change the audio and video status in anyway (they both play), so in theory the recent changes I did related to that should have no effect here. But probably worth double checking (e.g. like at 06c26e37edbea4a9deb3c55f6f7b8ea10fea69e8).

christoph-heinrich commented 7 months ago

I've checked the v0.36.0 tag and it also happens there, so it's certainly not a recent regression.

The script only changes speed (it can also do other things, but in this case only speed).

How can it have something to do with presentation time when it works fine with --video-sync=display-desync ? I can test weston in ~30min.

Dudemanguy commented 7 months ago

it's certainly not a recent regression

Phew, you had me worried for a second there.

How can it have something to do with presentation time when it works fine with --video-sync=display-desync ?

I don't think it's related either. But I was just curious if the results would be any different since in Plasma no presentation is used at all.

christoph-heinrich commented 7 months ago

I was just curious if the results would be any different since in Plasma no presentation is used at all.

Also happens on weston.