pw-metadata
Manage PipeWire object metadata
TLDR
Show metadata in default name
Show metadata with ID 0 in settings
List all available metadata objects
Keep running and log the changes to the metadata
Delete all metadata
Set log.level to 1 in settings
Display help
SYNOPSIS
pw-metadata
[OPTIONS] COMMAND [ARGUMENTS...]
Commands:
ls
[OBJECT_ID]
set
OBJECT_ID KEY VALUE [TYPE]
clear
OBJECT_ID [KEY]
dump
PARAMETERS
--help
, -h
Displays a brief help message and exits.--version
, -V
Displays the PipeWire version and exits.--remote=
NAME, -r
NAME
Connects to a specific PipeWire instance identified by NAME instead of the default.ls
[OBJECT_ID]
Lists metadata. If OBJECT_ID is provided, lists metadata for that specific PipeWire object. If omitted, lists global metadata.set
OBJECT_ID KEY VALUE [TYPE]
Sets a metadata entry. Associates KEY with VALUE for the specified OBJECT_ID. The optional TYPE specifies the data type (e.g., 'string', 'int', 'bool', 'json'). Defaults to 'string'.clear
OBJECT_ID [KEY]
Clears metadata. Removes KEY for the specified OBJECT_ID. If KEY is omitted, all metadata for OBJECT_ID is cleared.dump
Dumps all global and object-specific metadata currently known by the PipeWire daemon in a comprehensive format.
DESCRIPTION
pw-metadata
is a command-line utility for managing metadata associated with objects within the PipeWire multimedia framework. It enables users to inspect, set, and clear key-value metadata pairs for various PipeWire entities, such as audio/video devices, nodes, and links. This metadata can be used by applications to store additional contextual information about these objects, beyond their standard properties. The tool supports operations like listing all metadata, listing metadata for a specific object by its ID, setting new metadata entries (with an optional type like string, int, bool, etc.), and clearing existing entries, either individually or all entries for a given object. It is an essential tool for debugging and configuring PipeWire setups where custom object properties are utilized, providing a direct interface to the daemon's metadata store.
CAVEATS
Metadata managed by pw-metadata
is stored by the active PipeWire daemon and is typically volatile, meaning it may not persist across daemon restarts unless specifically configured to do so by the system. Changes might not be immediately reflected in all applications if they cache metadata. Incorrectly setting or clearing metadata can potentially lead to unexpected behavior or misconfiguration of audio/video components.
EXAMPLES
Listing Global Metadata:pw-metadata ls
Listing Metadata for Object ID 42:pw-metadata ls 42
Setting a String Metadata Entry:pw-metadata set 42 device.name "My USB Headset" string
Setting an Integer Metadata Entry:pw-metadata set 100 level 50 int
Clearing a Specific Metadata Key:pw-metadata clear 42 device.name
Dumping All Metadata:pw-metadata dump
OBJECT IDS
PipeWire objects are identified by unique numerical IDs. These IDs can be discovered using other PipeWire utilities such as pw-dump
or pw-cli info
. Metadata can be applied to various object types, including devices, nodes, links, and even global properties of the PipeWire daemon itself.
HISTORY
PipeWire, the modern multimedia server framework for Linux, began its development around 2017, aiming to provide low-latency audio, video, and hardware access. The pw-metadata
utility was introduced as an integral part of the PipeWire ecosystem to provide command-line access and control over the framework's object metadata. This allows for dynamic property management, crucial for integration with various applications and desktop environments that rely on custom object properties. Its development has progressed in tandem with PipeWire's increasing adoption across major Linux distributions, becoming a standard tool for system administrators and developers.