summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DOCS/man/en/changes.rst3
-rw-r--r--DOCS/man/en/input.rst30
-rw-r--r--DOCS/man/en/mpv.rst5
-rw-r--r--etc/input.conf7
-rw-r--r--input/input.c8
-rw-r--r--screenshot.c6
-rw-r--r--screenshot.h5
7 files changed, 32 insertions, 32 deletions
diff --git a/DOCS/man/en/changes.rst b/DOCS/man/en/changes.rst
index 402bdbd336..725385a2b1 100644
--- a/DOCS/man/en/changes.rst
+++ b/DOCS/man/en/changes.rst
@@ -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
diff --git a/DOCS/man/en/input.rst b/DOCS/man/en/input.rst
index 63593c53ca..18e5b824e1 100644
--- a/DOCS/man/en/input.rst
+++ b/DOCS/man/en/input.rst
@@ -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.
diff --git a/DOCS/man/en/mpv.rst b/DOCS/man/en/mpv.rst
index 6de386fdf9..bf2ce0a770 100644
--- a/DOCS/man/en/mpv.rst
+++ b/DOCS/man/en/mpv.rst
@@ -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
diff --git a/etc/input.conf b/etc/input.conf
index 67ce10f72f..b6102b6867 100644
--- a/etc/input.conf
+++ b/etc/input.conf
@@ -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
diff --git a/input/input.c b/input/input.c
index ea9d2376b2..8b59501da0 100644
--- a/input/input.c
+++ b/input/input.c
@@ -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,
diff --git a/screenshot.c b/screenshot.c
index c60b17649b..bfc86d5dce 100644
--- a/screenshot.c
+++ b/screenshot.c
@@ -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);
}
diff --git a/screenshot.h b/screenshot.h
index 01dd372aa2..266077a107 100644
--- a/screenshot.h
+++ b/screenshot.h
@@ -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);