@@ -399,6 +399,83 @@ To use this feature, you need to fill the ``menu-data`` property with menu
399
399
definition data, and add a keybinding to run the ``context-menu `` command,
400
400
which can be done with a user script.
401
401
402
+ Image Bindings
403
+ --------------
404
+
405
+ When viewing images, the following key bindings optimized for image viewing are
406
+ added. Key bindings not listed here, or those configured by the user in
407
+ ``input.conf ``, keep behaving like with non-image files.
408
+
409
+ LEFT, RIGHT, UP, DOWN, h, j, k, l
410
+ Pan the image when it is larger than the window.
411
+
412
+ Shift+LEFT, Shift+RIGHT, Shift+UP, Shift+DOWN, H, J, K, L
413
+ Slowly pan the image when it is larger than the window.
414
+
415
+ Ctrl+LEFT, Ctrl+RIGHT, Ctrl+UP, Ctrl+DOWN, Ctrl+h, Ctrl+j, Ctrl+k, Ctrl+l
416
+ Align the image to one of the boundaries of the window when it is larger
417
+ than the window.
418
+
419
+ = and -
420
+ Change the zoom.
421
+
422
+ + and _
423
+ Change the zoom slowly.
424
+
425
+ 0
426
+ Reset zoom and panscan.
427
+
428
+ u
429
+ Toggle between showing the image unscaled in its original dimensions and
430
+ fitting it to the window.
431
+
432
+ o
433
+ Fill the window with the image. This makes the image scaled to the window,
434
+ resets zoom and sets ``--panscan `` to 1. See ``-panscan `` for more info.
435
+
436
+ r
437
+ Rotate counterclockwise.
438
+
439
+ R and t
440
+ Rotate clockwise.
441
+
442
+ v
443
+ Rotate by 180 degrees.
444
+
445
+ SPACE
446
+ Toggle between showing images for 5 seconds in a slideshow and keeping them
447
+ open forever.
448
+
449
+ [ and ]
450
+ Decrease/increase the image display duration by 1.
451
+
452
+ { and }
453
+ Halve/double the image display duration.
454
+
455
+ n
456
+ Go to the next playlist entry.
457
+
458
+ p
459
+ Go to the previous playlist entry.
460
+
461
+ N
462
+ Go to the next sub-playlist (e.g. directory or archive).
463
+
464
+ P
465
+ Go to the previous sub-playlist.
466
+
467
+ HOME and g-g
468
+ Go to the first playlist entry.
469
+
470
+ END and G
471
+ Go to the last playlist entry.
472
+
473
+ Wheel up/down
474
+ Change the zoom while keeping the part of the image hovered by the cursor
475
+ under it.
476
+
477
+ See `Image profile `_ for image viewing tips.
478
+
402
479
USAGE
403
480
=====
404
481
@@ -1057,6 +1134,77 @@ example, ``math`` is defined and gives access to the Lua standard math library.
1057
1134
This feature is subject to change indefinitely. You might be forced to
1058
1135
adjust your profiles on mpv updates.
1059
1136
1137
+ Image profile
1138
+ -------------
1139
+
1140
+ mpv has a builtin profile called ``builtin-image `` that is automatically applied
1141
+ to images and restored when switching to a video or audio file. It enables
1142
+ options optimal for image viewing, such as a smaller OSC layout optimized for
1143
+ images. Its full contents can be listed with ``mpv
1144
+ --show-profile=builtin-image ``. It can be disabled with
1145
+ ``--apply-image-profile=no ``.
1146
+
1147
+ It can be extended in mpv.conf without overwriting it completely:
1148
+
1149
+ .. admonition :: Example to loop image playlists
1150
+
1151
+ ::
1152
+
1153
+ [builtin-image]
1154
+ loop-playlist
1155
+
1156
+ ``--apply-image-profile `` also enables the image specific key bindings listed in
1157
+ `Keyboard Control `_. Additional image key bindings can be specified in the
1158
+ ``image `` section in ``input.conf ``, for example:
1159
+
1160
+ SPACE {image} repeatable playlist-next force
1161
+
1162
+ See the `INPUT.CONF `_ section for more information on how to define key
1163
+ bindings.
1164
+
1165
+ To reset zoom, alignment and rotation between images, it is recommended to place
1166
+ ``reset-on-next-file=video-zoom,panscan,video-unscaled,video-align-x,video-align-y,video-rotate ``
1167
+ in the top level of mpv.conf, as enabling it in the conditional profile makes it
1168
+ take effect only from the second file.
1169
+
1170
+ To start viewing images and videos bigger than the window from the top left
1171
+ corner, these options can be set in the top level of mpv.conf along with
1172
+ ``--reset-on-next-file ``:
1173
+
1174
+ .. admonition :: Start from the top left:
1175
+
1176
+ ::
1177
+
1178
+ video-align-x=-1
1179
+ video-align-y=-1
1180
+ video-recenter
1181
+
1182
+ To enable the screensaver only when images are kept open forever, this profile
1183
+ can be added to mpv.conf:
1184
+
1185
+ .. admonition :: Example to enable the screensaver:
1186
+
1187
+ ::
1188
+
1189
+ [screensaver]
1190
+ profile-cond=p['current-tracks/video/image'] and not p['current-tracks/video/albumart'] and image_display_duration == math.huge
1191
+ profile-restore=copy
1192
+ stop-screensaver=no
1193
+
1194
+ ``--vo=gpu-next `` is recommended for better performance with large images,
1195
+ except images larger than the max texture size of the GPU API, for which a VO
1196
+ with software rendering can be used as fallback:
1197
+
1198
+ .. admonition :: Example to display huge images on Wayland:
1199
+
1200
+ ::
1201
+
1202
+ [huge]
1203
+ profile-cond=width > 16384 or height > 16384
1204
+ vo=wlshm
1205
+
1206
+ maxImageExtent may be 8192 instead on old iGPUs.
1207
+
1060
1208
Legacy auto profiles
1061
1209
--------------------
1062
1210
0 commit comments