mirror of
https://github.com/mpv-player/mpv
synced 2025-02-17 21:27:08 +00:00
screenshot: change "screenshot" input command
"screenshot" now maps to "screenshot subtitles" by default, instead of "screenshot video". Swap the argument order: the more useful argument should come first. Remove the compatibility aliases for numeric choices (e.g. "screenshot 1 0" won't work anymore).
This commit is contained in:
parent
11ed093182
commit
48ce4ab7f9
@ -52,7 +52,8 @@ General changes for mplayer2 to mpv
|
|||||||
* Improved OpenGL output (``vo_opengl``)
|
* Improved OpenGL output (``vo_opengl``)
|
||||||
* Make ``--softvol`` default (**mpv** is not a mixer control panel)
|
* Make ``--softvol`` default (**mpv** is not a mixer control panel)
|
||||||
* Improved support for .cue files
|
* Improved support for .cue files
|
||||||
* Screenshot improvements (can save screenshots as JPG, configurable filenames)
|
* Screenshot improvements (can save screenshots as JPG, configurable filenames,
|
||||||
|
support not taking screenshots with or without subtitles)
|
||||||
* Removal of teletext support
|
* Removal of teletext support
|
||||||
* Replace image VOs (``vo_jpeg`` etc.) with ``vo_image``
|
* Replace image VOs (``vo_jpeg`` etc.) with ``vo_image``
|
||||||
* Remove ``vo_gif89a``, ``vo_md5sum``, ``vo_yuv4mpeg`` (the plan is to merge
|
* Remove ``vo_gif89a``, ``vo_md5sum``, ``vo_yuv4mpeg`` (the plan is to merge
|
||||||
|
@ -87,31 +87,31 @@ cycle <property> [up|down]
|
|||||||
speed_mult <value>
|
speed_mult <value>
|
||||||
Multiply the ``speed`` property by the given value.
|
Multiply the ``speed`` property by the given value.
|
||||||
|
|
||||||
screenshot [single|each-frame] [video|window]
|
screenshot [subtitles|video|window] [single|each-frame]
|
||||||
Take a screenshot.
|
Take a screenshot.
|
||||||
|
|
||||||
First argument:
|
First argument:
|
||||||
|
|
||||||
|
<subtitles> (default)
|
||||||
|
Save the video image, in its original resolution, and with subtitles.
|
||||||
|
Some video outputs may still include the OSD in the output under certain
|
||||||
|
circumstances.
|
||||||
|
<video>
|
||||||
|
Like ``subtitles``, but typically without OSD or subtitles. The exact
|
||||||
|
behavior depends on the selected video output.
|
||||||
|
<window>
|
||||||
|
Save the contents of the mplayer window. Typically scaled, with OSD and
|
||||||
|
subtitles. The exact behavior depends on the selected video output, and
|
||||||
|
if no support is available, this will act like ``video``.
|
||||||
|
|
||||||
|
Second argument:
|
||||||
|
|
||||||
<single> (default)
|
<single> (default)
|
||||||
Take a single screenshot.
|
Take a single screenshot.
|
||||||
<each-frame>
|
<each-frame>
|
||||||
Take a screenshot each frame. Issue this command again to stop taking
|
Take a screenshot each frame. Issue this command again to stop taking
|
||||||
screenshots.
|
screenshots.
|
||||||
|
|
||||||
Second argument:
|
|
||||||
|
|
||||||
<video> (default)
|
|
||||||
Save the video image, in its original resolution. Typically without
|
|
||||||
OSD or subtitles, but the exact behavior depends on the selected video
|
|
||||||
output.
|
|
||||||
<subtitles>
|
|
||||||
Like ``video``, but add subtitles. Some video outputs may still include
|
|
||||||
the OSD in the output under certain circumstances.
|
|
||||||
<window>
|
|
||||||
Save the contents of the mplayer window. Typically scaled, with OSD and
|
|
||||||
subtitles. The exact behavior depends on the selected video output, and
|
|
||||||
if not support is available, this will act like ``video``.
|
|
||||||
|
|
||||||
playlist_next [weak|force]
|
playlist_next [weak|force]
|
||||||
Go to the next entry on the playlist.
|
Go to the next entry on the playlist.
|
||||||
|
|
||||||
|
@ -162,7 +162,8 @@ s
|
|||||||
Take a screenshot.
|
Take a screenshot.
|
||||||
|
|
||||||
S
|
S
|
||||||
Start/stop taking screenshots.
|
Take a screenshot, without subtitles. (Whether this works depends on VO
|
||||||
|
driver support.)
|
||||||
|
|
||||||
I
|
I
|
||||||
Show filename on the OSD.
|
Show filename on the OSD.
|
||||||
@ -420,7 +421,7 @@ slave mode command, which is by default bound to the ``s`` key. Files named
|
|||||||
available number - no files will be overwritten.
|
available number - no files will be overwritten.
|
||||||
|
|
||||||
A screenshot will usually contain the unscaled video contents at the end of the
|
A screenshot will usually contain the unscaled video contents at the end of the
|
||||||
video filter chain. Some video output drivers will include subtitles and OSD in
|
video filter chain and subtitles. Some video output drivers will include OSD in
|
||||||
the video frame as well - this is because of technical restrictions.
|
the video frame as well - this is because of technical restrictions.
|
||||||
|
|
||||||
The ``screenshot`` video filter is normally not required when using a
|
The ``screenshot`` video filter is normally not required when using a
|
||||||
|
@ -104,10 +104,9 @@ TAB cycle program
|
|||||||
i edl_mark # for use with --edlout mode
|
i edl_mark # for use with --edlout mode
|
||||||
T cycle ontop # toggle video window ontop of other windows
|
T cycle ontop # toggle video window ontop of other windows
|
||||||
f cycle fullscreen # toggle fullscreen
|
f cycle fullscreen # toggle fullscreen
|
||||||
s screenshot # take a png screenshot
|
s screenshot # take a screenshot
|
||||||
S screenshot each-frame # ...on every frame
|
S screenshot video # ...without subtitles
|
||||||
Alt+s screenshot - window # take a screenshot of window contents
|
Alt+s screenshot - each-frame # automatically screenshot every frame
|
||||||
Alt+S screenshot each-frame window # ...on every frame
|
|
||||||
w add panscan -0.1 # zoom out with -panscan 0 -fs
|
w add panscan -0.1 # zoom out with -panscan 0 -fs
|
||||||
e add panscan +0.1 # in
|
e add panscan +0.1 # in
|
||||||
POWER quit
|
POWER quit
|
||||||
|
@ -159,11 +159,11 @@ static const mp_cmd_t mp_cmds[] = {
|
|||||||
{ MP_CMD_DVB_SET_CHANNEL, "dvb_set_channel", { ARG_INT, ARG_INT } },
|
{ MP_CMD_DVB_SET_CHANNEL, "dvb_set_channel", { ARG_INT, ARG_INT } },
|
||||||
|
|
||||||
{ MP_CMD_SCREENSHOT, "screenshot", {
|
{ MP_CMD_SCREENSHOT, "screenshot", {
|
||||||
OARG_CHOICE(0, ({"single", 0}, {"0", 0},
|
OARG_CHOICE(2, ({"video", 0},
|
||||||
{"each-frame", 1}, {"1", 1})),
|
{"window", 1},
|
||||||
OARG_CHOICE(0, ({"video", 0}, {"0", 0},
|
|
||||||
{"window", 1}, {"1", 1},
|
|
||||||
{"subtitles", 2})),
|
{"subtitles", 2})),
|
||||||
|
OARG_CHOICE(0, ({"single", 0},
|
||||||
|
{"each-frame", 1})),
|
||||||
}},
|
}},
|
||||||
{ MP_CMD_LOADFILE, "loadfile", {
|
{ MP_CMD_LOADFILE, "loadfile", {
|
||||||
ARG_STRING,
|
ARG_STRING,
|
||||||
|
@ -293,7 +293,7 @@ static void vf_screenshot_callback(void *pctx, struct mp_image *image)
|
|||||||
screenshot_ctx *ctx = mpctx->screenshot_ctx;
|
screenshot_ctx *ctx = mpctx->screenshot_ctx;
|
||||||
screenshot_save(mpctx, image, ctx->mode);
|
screenshot_save(mpctx, image, ctx->mode);
|
||||||
if (ctx->each_frame)
|
if (ctx->each_frame)
|
||||||
screenshot_request(mpctx, 0, ctx->mode);
|
screenshot_request(mpctx, ctx->mode, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool force_vf(struct MPContext *mpctx)
|
static bool force_vf(struct MPContext *mpctx)
|
||||||
@ -309,7 +309,7 @@ static bool force_vf(struct MPContext *mpctx)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void screenshot_request(struct MPContext *mpctx, bool each_frame, int mode)
|
void screenshot_request(struct MPContext *mpctx, int mode, bool each_frame)
|
||||||
{
|
{
|
||||||
if (mpctx->video_out && mpctx->video_out->config_ok) {
|
if (mpctx->video_out && mpctx->video_out->config_ok) {
|
||||||
screenshot_ctx *ctx = mpctx->screenshot_ctx;
|
screenshot_ctx *ctx = mpctx->screenshot_ctx;
|
||||||
@ -366,5 +366,5 @@ void screenshot_flip(struct MPContext *mpctx)
|
|||||||
if (ctx->using_vf_screenshot)
|
if (ctx->using_vf_screenshot)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
screenshot_request(mpctx, 0, ctx->mode);
|
screenshot_request(mpctx, ctx->mode, false);
|
||||||
}
|
}
|
||||||
|
@ -27,11 +27,10 @@ struct MPContext;
|
|||||||
void screenshot_init(struct MPContext *mpctx);
|
void screenshot_init(struct MPContext *mpctx);
|
||||||
|
|
||||||
// Request a taking & saving a screenshot of the currently displayed frame.
|
// Request a taking & saving a screenshot of the currently displayed frame.
|
||||||
|
// mode: 0: -, 1: save the actual output window contents, 2: with subtitles.
|
||||||
// each_frame: If set, this toggles per-frame screenshots, exactly like the
|
// each_frame: If set, this toggles per-frame screenshots, exactly like the
|
||||||
// screenshot slave command (MP_CMD_SCREENSHOT).
|
// screenshot slave command (MP_CMD_SCREENSHOT).
|
||||||
// mode: 0: -, 1: save the actual output window contents, 2: with subtitles.
|
void screenshot_request(struct MPContext *mpctx, int mode, bool each_frame);
|
||||||
void screenshot_request(struct MPContext *mpctx, bool each_frame,
|
|
||||||
int mode);
|
|
||||||
|
|
||||||
// Called by the playback core code when a new frame is displayed.
|
// Called by the playback core code when a new frame is displayed.
|
||||||
void screenshot_flip(struct MPContext *mpctx);
|
void screenshot_flip(struct MPContext *mpctx);
|
||||||
|
Loading…
Reference in New Issue
Block a user