开发者

How to get length of MP3 file in Perl?

开发者 https://www.devze.com 2023-02-22 12:16 出处:网络
I used MP3::Tag to get ID3 information from mp3 file. But I don\'t know how to get length of mp3 file..

I used MP3::Tag to get ID3 information from mp3 file.

But I don't know how to get length of mp3 file.. I mean duration.

# get some information about the file in the easiest way

($title, $track, $artist, $album, $comment, $year, $genre) = $mp3->auto开发者_Python百科info();

This one don't have function which is getting length from ID3.

Anyone knows how I can get length of mp3 file in Perl?


If you are still looking for the answer, install MP3::Info and use:

$mp3->time_mm_ss();

Other things you can use:

total_secs()

total_secs_int()

total_mins()

leftover_secs()

leftover_msec()

See the bottom of the MP3::Tag page for details

0

精彩评论

暂无评论...
验证码 换一张
取 消