Better or another way to determine attribute media_duration?

HI, for my automations, timers and template sensors, I need the attribute media_duration, for which I now use the media_player.play_media service, to have a media file played, on which the attribute is set.

Thing is this takes some time, and, I don’t want the file to be played just yet, since I need the attribute to set a timer and/or delay before anything is being played…

Long story short: can we determine the media_duration of a file using another media_player, or maybe something completely different, other than using the above service?

thanks for having a look.