Skip to content

Support writing arbitrary key/value pairs to container metadata #1568

Description

@Michael-Equi

Desired Behavior

Currently only the title is allowed to be written to a containers metadata. The behavior is tested in the following unit test:

assert input_.metadata.get("key") is None

I have confirmed ffmpeg does support this by using the following CLI command given the path to a libx264 encoded video.

subprocess.run(
        [
            "ffmpeg",
            "-y",  # Overwrite output files without asking
            "-i",
            input,
            "-c",
            "copy",
            "-copyts",  # Copy timestamps from input to output
            "-metadata",
            f"key={value}",
            "-movflags",
            "+use_metadata_tags",
            output,
        ],

Example API

Allow any arbitrary key/value pair to be written to the metadata in the same way title can be written to the metadata.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions