How does nodejs get the playback time of audio and video files?

for example, I have a MP3 or MP4 file. I want to get the total playback time of this file. How can I do this?

Nov.12,2021

try Node.js to call ffmpeg to handle it;
reference:

https://zhidao.baidu.com/question/1836092286638950260.html

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb347d-481f9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb347d-481f9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?