mpv
mpv copied to clipboard
mpv often skips the last frame in loops.
mpv version and platform
Gentoo Linux
> mpv --version
mpv ba370e9 Copyright © 2000-2019 mpv/MPlayer/mplayer2 projects
built on Sun Nov 17 10:06:50 KST 2019
ffmpeg library versions:
libavutil 56.22.100
libavcodec 58.35.100
libavformat 58.20.100
libswscale 5.3.100
libavfilter 7.40.101
libswresample 3.3.100
ffmpeg version: 4.1.3
Reproduction steps
Loop the webm file from Sample files in mpv.
Expected behavior
The last frame should be displayed for a frame duration. If you loop it in a web browser, the last frame can be seen for a frame duration.
Actual behavior
mpv flashes the last frame or skips it entirely instead of showing it for a frame duration.
Log file
Sample files
https://0x0.st/z6ji.webm
I think there has been a related commit very recently, could you try with git master?
The related commit fixed my previous issue about skipping the first frame.
I tested the latest commit anyway, and the issue still remains.
I think this was last explicitly changed to work this way in commit 657dd4b8072934e26b1df1f37daa829fe6b36ede.
This basically makes low-framerate loops unwatchable in mpv. Is there no way to fix it without breaking other things?
I noticed this as well in a looping video with low framerate, the last frame has a much shorter duration than all the other frames, would be nice if this issue could be fixed.
I recall looking at this exact issue few months ago. The root cause for this, is that we send last frame for presentation and at this point playback is considered over. We have a function to check frame timing, but the problem was once everything EOFs there is nothing to wake-up the core and vo to actually end playback after the last frame is displayed fully. IIRC there was not good way to handle it in fact, except busy looping on last frame. I didn't get back on the topic, maybe one day.