You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mpv freezes when taking screenshots (screenshot command is not asynchronous)Â #4250
mpv 0.24.0-git-0f1afc6ba, Windows 7 build 7601, SP1
Reproduction steps
Add these lines to mpv.conf:
screenshot-format=png
screenshot-png-compression=9
Open any video file (the higher resolution the better) and take a screenshot with hotkey (default: s)
Expected behavior
I'd like mpv to pass the screenshot to another process for compression to not interfere with playback.
Actual behavior
mpv freezes for a few seconds to compress the screenshot, disrupting playback.
Also, is it possible to create a screenshot with 0 compression and then run some other PNG compression tool on the screenshot?
Reactions are currently unavailable
Activity
ghost changed the title [-]mpv freezes for 1-2 seconds when taking screenshots[/-][+]mpv freezes when taking screenshots (screenshot command is not asynchronous)[/+]on Mar 17, 2017
So the only option is to set PNG compression to 0 and use some other tool to watch for new files in mpv's screenshots folder? That sounds rather inconvenient.
I hope some day there will be a way to make well compressed screenshots without disrupting playback or having to use other tools.
I take screenshots. When I take screenshots, the video hangs, unless I disable PNG compression, in which case I would have to compress it later using some other tools. I tried to make mpv run PngOptimizer on a freshly created screenshot but I have no idea how to pass the resulting screenshot's filename to it.
Just a few random screenshots? And what is the problem with compressing them later? It seems to me like you're trying to automate something, but I don't see the point here.
Perhaps related (or should this be made a separate issue?):
Taking a screenshot using the command "screenshot-to-file" result in an image that appears to be taken from the video input. But if the image on the screen is rotated with the command "video-rotate" this does not affect the screenshot. So the screenshot is not really what is shown on the real screen. It would be very useful if that was the case.
My program takes screenshots on a regular basis, using the libmpv API function mpv_command(ctx, "screenshot-to-file", "mydir/myfile.png"). Not when the user presses a key. So there's no key binding involved. How can my program get a correctly rotated screenshot?
Activity
[-]mpv freezes for 1-2 seconds when taking screenshots[/-][+]mpv freezes when taking screenshots (screenshot command is not asynchronous)[/+]UserNaem commentedon Mar 18, 2017
I tried running PngOptimizer but I have no idea how to pass the screenshot's name to it as a parameter, how to use screenshot wildcards as parameters?
UserNaem commentedon Mar 18, 2017
How about take a raw bitmap screenshot and then pass it to another thread for compression, then?
UserNaem commentedon Mar 18, 2017
So the only option is to set PNG compression to 0 and use some other tool to watch for new files in mpv's screenshots folder? That sounds rather inconvenient.
I hope some day there will be a way to make well compressed screenshots without disrupting playback or having to use other tools.
hrxn commentedon Mar 18, 2017
If I may ask: what are you even trying to do?
UserNaem commentedon Mar 18, 2017
I take screenshots. When I take screenshots, the video hangs, unless I disable PNG compression, in which case I would have to compress it later using some other tools. I tried to make mpv run PngOptimizer on a freshly created screenshot but I have no idea how to pass the resulting screenshot's filename to it.
hrxn commentedon Mar 18, 2017
Just a few random screenshots? And what is the problem with compressing them later? It seems to me like you're trying to automate something, but I don't see the point here.
tmpsa commentedon Mar 28, 2017
Perhaps related (or should this be made a separate issue?):
Taking a screenshot using the command "screenshot-to-file" result in an image that appears to be taken from the video input. But if the image on the screen is rotated with the command "video-rotate" this does not affect the screenshot. So the screenshot is not really what is shown on the real screen. It would be very useful if that was the case.
tmpsa commentedon Apr 3, 2017
My program takes screenshots on a regular basis, using the libmpv API function mpv_command(ctx, "screenshot-to-file", "mydir/myfile.png"). Not when the user presses a key. So there's no key binding involved. How can my program get a correctly rotated screenshot?