Skip to content

Add --screenshot-metadata CLI option #2726

@masmu

Description

@masmu

Hi, I would really love a CLI option where I can specify the metadata which is written to a screenshot PNG. This would be an addition to the --screenshot-template option, but would store the metadata in the file not in the files name. In that way, you could really use the %P (path) placeholder, which is normally not usable here, because test-[%P] would be translated to test-[/home/user/test.png].png which is not a valid filename.

Example:

mpv --screenshot-metadata "filename:%f" \
    --screenshot-metadata "path:%P" \
    --screenshot-metadata "position:%fc"

So that pngmeta would print the following output:

$ pngmeta ~/test.png
filename: test.mp4
path: file:////home/user/test.mp4
position: 5835467

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions