The player I am using is [io].
playerctl metadata --format "Total length: {{ duration(mpris:length) }}"
This command (mentioned in the readme) returns an error on my machine
Specifically, this one :-
Could not execute command: function duration can only be called on track position values
i'm using it to rice my waybar to make a player widget from scratch