Specify the filename template used to save screenshots. The template
specifies the filename without file extension, and can contain format
specifiers, which will be substituted when taking a screenshot.
By default, the template is mpv-shot%n, which results in filenames like
mpv-shot0012.png for example.
The template can start with a relative or absolute path, in order to
specify a directory location where screenshots should be saved.
If the final screenshot filename points to an already existing file, the
file will not be overwritten. The screenshot will either not be saved, or if
the template contains %n, saved using different, newly generated
filename.
Allowed format specifiers:
- %[#][0X]n
- A sequence number, padded with zeros to length X (default: 04). E.g.
passing the format %04n will yield 0012 on the 12th screenshot.
The number is incremented every time a screenshot is taken or if the
file already exists. The length X must be in the range 0-9. With
the optional # sign, mpv will use the lowest available number. For
example, if you take three screenshots--0001, 0002, 0003--and delete
the first two, the next two screenshots will not be 0004 and 0005, but
0001 and 0002 again.
- %f
- Filename of the currently played video.
- %F
- Same as %f, but strip the file extension, including the dot.
- %x
- Directory path of the currently played video. If the video is not on
the filesystem (but e.g. http://), this expand to an empty string.
- %X{fallback}
- Same as %x, but if the video file is not on the filesystem, return
the fallback string inside the {...}.
- %p
- Current playback time, in the same format as used in the OSD. The
result is a string of the form "HH:MM:SS". For example, if the video is
at the time position 5 minutes and 34 seconds, %p will be replaced
with "00:05:34".
- %P
-
Similar to %p, but extended with the playback time in milliseconds.
It is formatted as "HH:MM:SS.mmm", with "mmm" being the millisecond
part of the playback time.
Note
This is a simple way for getting unique per-frame timestamps. (Frame
numbers would be more intuitive, but are not easily implementable
because container formats usually use time stamps for identifying
frames.)
- %wX
-
Specify the current playback time using the format string X.
%p is like %wH:%wM:%wS, and %P is like %wH:%wM:%wS.%wT.
- Valid format specifiers:
-
- %wH
- hour (padded with 0 to two digits)
- %wh
- hour (not padded)
- %wM
- minutes (00-59)
- %wm
- total minutes (includes hours, unlike %wM)
- %wS
- seconds (00-59)
- %ws
- total seconds (includes hours and minutes)
- %wf
- like %ws, but as float
- %wT
- milliseconds (000-999)
- %tX
- Specify the current local date/time using the format X. This format
specifier uses the UNIX strftime() function internally, and inserts
the result of passing "%X" to strftime. For example, %tm will
insert the number of the current month as number. You have to use
multiple %tX specifiers to build a full date/time string.
- %{prop[:fallback text]}
- Insert the value of the input property 'prop'. E.g. %{filename} is
the same as %f. If the property does not exist or is not available,
an error text is inserted, unless a fallback is specified.
- %%
- Replaced with the % character itself.