mirror of https://github.com/mpv-player/mpv
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``)
|
||||
* Make ``--softvol`` default (**mpv** is not a mixer control panel)
|
||||
* 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
|
||||
* Replace image VOs (``vo_jpeg`` etc.) with ``vo_image``
|
||||
* Remove ``vo_gif89a``, ``vo_md5sum``, ``vo_yuv4mpeg`` (the plan is to merge
|
||||
|
|
|
@ -87,31 +87,31 @@ cycle <property> [up|down]
|
|||
speed_mult <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.
|
||||
|
||||
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)
|
||||
Take a single screenshot.
|
||||
<each-frame>
|
||||
Take a screenshot each frame. Issue this command again to stop taking
|
||||
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]
|
||||
Go to the next entry on the playlist.
|
||||
|
||||
|
|
|
@ -162,7 +162,8 @@ s
|
|||
Take a screenshot.
|
||||
|
||||
S
|
||||
Start/stop taking screenshots.
|
||||
Take a screenshot, without subtitles. (Whether this works depends on VO
|
||||
driver support.)
|
||||
|
||||
I
|
||||
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.
|
||||
|
||||
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 ``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
|
||||
T cycle ontop # toggle video window ontop of other windows
|
||||
f cycle fullscreen # toggle fullscreen
|
||||
s screenshot # take a png screenshot
|
||||
S screenshot each-frame # ...on every frame
|
||||
Alt+s screenshot - window # take a screenshot of window contents
|
||||
Alt+S screenshot each-frame window # ...on every frame
|
||||
s screenshot # take a screenshot
|
||||
S screenshot video # ...without subtitles
|
||||
Alt+s screenshot - each-frame # automatically screenshot every frame
|
||||
w add panscan -0.1 # zoom out with -panscan 0 -fs
|
||||
e add panscan +0.1 # in
|
||||
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_SCREENSHOT, "screenshot", {
|
||||
OARG_CHOICE(0, ({"single", 0}, {"0", 0},
|
||||
{"each-frame", 1}, {"1", 1})),
|
||||
OARG_CHOICE(0, ({"video", 0}, {"0", 0},
|
||||
{"window", 1}, {"1", 1},
|
||||
OARG_CHOICE(2, ({"video", 0},
|
||||
{"window", 1},
|
||||
{"subtitles", 2})),
|
||||
OARG_CHOICE(0, ({"single", 0},
|
||||
{"each-frame", 1})),
|
||||
}},
|
||||
{ MP_CMD_LOADFILE, "loadfile", {
|
||||
ARG_STRING,
|
||||
|
|
|
@ -293,7 +293,7 @@ static void vf_screenshot_callback(void *pctx, struct mp_image *image)
|
|||
screenshot_ctx *ctx = mpctx->screenshot_ctx;
|
||||
screenshot_save(mpctx, image, ctx->mode);
|
||||
if (ctx->each_frame)
|
||||
screenshot_request(mpctx, 0, ctx->mode);
|
||||
screenshot_request(mpctx, ctx->mode, false);
|
||||
}
|
||||
|
||||
static bool force_vf(struct MPContext *mpctx)
|
||||
|
@ -309,7 +309,7 @@ static bool force_vf(struct MPContext *mpctx)
|
|||
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) {
|
||||
screenshot_ctx *ctx = mpctx->screenshot_ctx;
|
||||
|
@ -366,5 +366,5 @@ void screenshot_flip(struct MPContext *mpctx)
|
|||
if (ctx->using_vf_screenshot)
|
||||
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);
|
||||
|
||||
// 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
|
||||
// screenshot slave command (MP_CMD_SCREENSHOT).
|
||||
// mode: 0: -, 1: save the actual output window contents, 2: with subtitles.
|
||||
void screenshot_request(struct MPContext *mpctx, bool each_frame,
|
||||
int mode);
|
||||
void screenshot_request(struct MPContext *mpctx, int mode, bool each_frame);
|
||||
|
||||
// Called by the playback core code when a new frame is displayed.
|
||||
void screenshot_flip(struct MPContext *mpctx);
|
||||
|
|
Loading…
Reference in New Issue