Open sarphiv opened 5 years ago
provide a proper log file with --log-file=PATH. also try master if possible.
Thank you for the quick reply and sorry for my misunderstanding with regards to the log file. I have attached a new log file in this reply.
I will look into trying it out from the master branch.
also try master if possible.
Ok, I just tried the build"mpv-x86_64-20190915-git-a416b3f" (8 hours old at the time of writing) from https://sourceforge.net/projects/mpv-player-windows/files/
I can confirm that version also has this issue - Atleast on my system.
The code on which 0.29 is based is over a year old, so not surprising if it has bugs that have been fixed since. Which probably includes this one, so closing.
The code on which 0.29 is based is over a year old, so not surprising if it has bugs that have been fixed since. Which probably includes this one, so closing.
Does this mean there is a version of MPV where this is fixed (I cannot find it)? Or does this mean, the dependencies of MPV are over a year old? Maybe something third?
Hopefully that wasn't too stupid a question.
No, you tried the right thing. If it's still present with a recent shinchiro build, master
is still affected.
Sorry, I misread and thought your issue was confirmed solved.
Does it happen with --no-audio?
Does it happen with --no-audio?
The issue is gone when --no-audio
is present.
I think you might be on to something 👍
Frame stepping plays a bit of audio (just the video frame duration). It has to, because the way frame stepping is implemented is unpausing for a video frame and then pausing again. The ao_wasapi audio output doesn't seem to handle this well (while some other audio outputs do). So ao_wasapi must be fixed. Or alternatively, frame stepping must be redone to restart audio in a different way (which isn't easily possible, because the audio queued to the AO will be "lost").
Thanks for the explanation. I guess it makes sense the audio had issues. While frame stepping, more often than not, the audio for that frame step is never played - very inconsistent compared to frame stepping in e.g. PotPlayer where the audio consistently plays.
Good luck to whoever feels like working on this. Though, my hopes are low of this getting fixed in the near future.
You can try --ao=null and whether that behaves correctly (even if you can't hear it).
You can try --ao=null and whether that behaves correctly (even if you can't hear it).
The frame stepping works with no skipping, the audio doesn't (no audio). I also tried it with the ones listed at this link. None of them worked either, except wasapi.
Something I noticed about this issue is that it doesn't happen if you took one frame-step back before unpausing.
Backstepping uses a different mechanism, so it's not unexpected.
So maybe you can use this as a workaround? Like automatically taking a frame-step back before unpausing.
Try this... https://github.com/oe-d/frame-step
Try this... https://github.com/oe-d/frame-step
I think I am having trouble applying the script. If on Windows, am I correct that the script should be put in %AppData%/mpv/scripts/frame_step.lua
I sadly see no change in behavior relative to no script. It may be that I applied the script incorrectly.
Get the latest version.
Did you bind keys in %AppData%/mpv/input.conf ?
Space script-binding frame_step/cycle-pause . script-binding frame_step/frame-step
Seems to not skip anymore. Nice!
However, the OSD with time, frame, and other info is no longer showing up. Also the frame stepping speed when the button is held down, seems to be slower than before. The mute icon is also having a party cycling itself on and off.
Other than that, your mitigation seems to prevent the skipping - so that's super nice.
What do you mean with the osd not showing up? mpv doesn't display anything when using standard frame-step or cycle pause. Holding button should just unpause the video until released again. Is the osc showing the video playing? Don't think I can do much about the mute icon, but I added some muting options in frame_step.conf.
By frame stepping speed, do you mean delay before video is unpaused? This can now be set with step_delay.
By frame stepping speed, do you mean delay before video is unpaused? This can now be set with step_delay.
I think you captured it perfectly in your step_rate
option.
What do you mean with the osd not showing up? mpv doesn't display anything when using standard frame-step or cycle pause. Holding button should just unpause the video until released again. Is the osc showing the video playing? Don't think I can do much about the mute icon, but I added some muting options in frame_step.conf.
You are right, I had some extra commands tied to my frame stepping giving me info about frames and times.
Sorry about missing that.
My original line looked like this
p frame-step; show-text "${time-pos} (${estimated-frame-number}) / ${estimated-frame-count} (${percent-pos}%)"
It seems like putting the show-text
part behind p script-binding frame_step/frame-step
messes up the script.
Oh well, I can live without that.
I really appreciate the work you're doing. I am just trying to help identify bugs, so I hope you don't take my comments as me being toxic.
Not sure if I understand the description of this issue. Yes, frame step "taps" increase an internal counter, and the player will play the same number of frames. I think most people just want the frame step to happen instantly, instead of playing the stepped frame for its entire duration. The problem is actually with audio, which is buffered in the audio output, and can't be easily skipped. If you drop all audio, you'll just accumulate A/V sync. The only current way to skip audio is for initial A/V sync (basically, the code used for seeking), and is not suitable to be invoked during playback. So it's tricky. Maybe later.
Not sure if I understand the description of this issue. Yes, frame step "taps" increase an internal counter, and the player will play the same number of frames. I think most people just want the frame step to happen instantly, instead of playing the stepped frame for its entire duration. The problem is actually with audio, which is buffered in the audio output, and can't be easily skipped. If you drop all audio, you'll just accumulate A/V sync. The only current way to skip audio is for initial A/V sync (basically, the code used for seeking), and is not suitable to be invoked during playback. So it's tricky. Maybe later.
(I am not sure I understand what you do not understand, so my explanation may not be an answer) I also want the frame step to happen instantly which it also seems to do. However, once you try to play the video again after having frame stepped a bunch - it does not resume normal playback from the frame that is currently on the screen. It seems to jump forward some time proportional to how much you frame stepped, and then it resumes normal playback.
It seems like putting the
show-text
part behindp script-binding frame_step/frame-step
messes up the script. Oh well, I can live without that.
Seems like key up/down can't be tracked with lua if you bind multiple commands to the same key, so that won't work. You should check out the new script. It's got playback info and some other features. https://github.com/oe-d/control
Script by oe-d totally resolves the issue after binding the custom commands it provides!
@sarphiv I wonder if this issue is solved by #13784.
mpv version and platform
Windows 10, MPV installed through chocolatey
Reproduction steps
These are my actions leading to the issue. It is likely, many of the steps are irrelevant, but they have been included for completeness.
Expected behavior
Video playback resumes on the currently shown frame C.
Where C = S + N Where C = Currently shown frame Where S = Start frame Where N = Number of times "frame-step" was tapped.
Actual behavior
Video skips a*N number of frames forward from the currently shown frame C.
So instead of resuming playback at C, it resumes playback at C + a*N Where a = Some constant
The more times you pressed "frame-step" (higher N), the more frames it seems to skip when you try to resume playback. The bug is mitigated by tapping "frame-back-step" before pressing "cycle pause". This causes the frame skip to not happen.
Issue does not happen with "frame-back-step".
Log file
Click to see log file
[cplayer] Command line options: '-v' [cplayer] mpv 0.29.1 Copyright © 2000-2018 mpv/MPlayer/mplayer2 projects [cplayer] built on UNKNOWN [cplayer] ffmpeg library versions: [cplayer] libavutil 56.19.101 [cplayer] libavcodec 58.30.100 [cplayer] libavformat 58.18.100 [cplayer] libswscale 5.2.100 [cplayer] libavfilter 7.31.100 [cplayer] libswresample 3.2.100 [cplayer] ffmpeg version: 4.1+1209.ge320f9576a [cplayer] [cplayer] Configuration: ./waf configure --prefix=/usr/x86_64-w64-mingw32/sysroot/mingw --enable-static-build --enable-html-build --disable-manpage-build --enable-libmpv-shared --enable-lua --enable-javascript --enable-libarchive --enable-libass --enable-libbluray --enable-dvdread --enable-dvdnav --enable-uchardet --enable-vulkan --enable-shaderc --enable-rubberband --enable-lcms2 --disable-build-date [cplayer] List of enabled features: asm atomics cplayer crossc d3d-hwaccel d3d11 d3d9-hwaccel debug-build direct3d dos-paths drmprime dvdnav dvdread dvdread-common ffmpeg gl gl-dxinterop gl-dxinterop-d3d9 gl-win32 glob glob-win32 gnuc gpl iconv javascript jpeg lcms2 libaf libarchive libass libass-osd libav-any libavcodec libavdevice libbluray libm libmpv-shared lua luajit mingw noexecstack optimize plain-gl posix-or-mingw rubberband shaderc shaderc-static static-build stdatomic uchardet vulkan wasapi win32-desktop win32-internal-pthreads win32-pipes zlib [ifo] Opening C:/ProgramData/chocolatey/lib/mpv.install/tools/portable_config/input.conf [ifo_dvdnav] Opening C:/ProgramData/chocolatey/lib/mpv.install/tools/portable_config/input.conf [bdmv/bluray] Opening C:/ProgramData/chocolatey/lib/mpv.install/tools/portable_config/input.conf [file] Opening C:/ProgramData/chocolatey/lib/mpv.install/tools/portable_config/input.conf [input] Parsing input config file C:/ProgramData/chocolatey/lib/mpv.install/tools/portable_config/input.conf [input] Input config file C:/ProgramData/chocolatey/lib/mpv.install/tools/portable_config/input.conf parsed: 20 binds [cplayer] mpv 0.29.1 Copyright © 2000-2018 mpv/MPlayer/mplayer2 projects [cplayer] built on UNKNOWN [cplayer] ffmpeg library versions: [cplayer] libavutil 56.19.101 [cplayer] libavcodec 58.30.100 [cplayer] libavformat 58.18.100 [cplayer] libswscale 5.2.100 [cplayer] libavfilter 7.31.100 [cplayer] libswresample 3.2.100 [cplayer] ffmpeg version: 4.1+1209.ge320f9576a [cplayer] [cplayer] Usage: mpv [options] [url|path/]filename [cplayer] [cplayer] Basic options: [cplayer] --start=