Recover duration mp3 file
Publié : jeu. 09/mars/2023 11:43
Hello all,
I am writing a program in Purebasic which displays, in a ListIconGadget, the list of mp3 files that I have in my folders.
I want to display the duration of each song to the right of the title.
Looking on the forum, I found codes but, in these codes, we open each file to find the duration.
With several hundred mp3 files, the execution time is very, very long.
Isn't there another way to recover the duration of the mp3 without having to open the file?
For example, in the Windows explorer, by right-clicking on the file, then properties, then detail tab, the duration of the mp3 is displayed, without having to open the file.
How to recover this duration without opening the file?
Thank you.
■ falsam : Traduction avec Deepl. (Bien mieux que google translate à mon avis)
Bonjour à tous,
J'écris un programme en Purebasic qui affiche, dans un ListIconGadget, la liste des fichiers mp3 que j'ai dans mes dossiers.
Je souhaite afficher la durée de chaque chanson à droite du titre.
En cherchant sur le forum, j'ai trouvé des codes mais, dans ces codes, on ouvre chaque fichier pour trouver la durée.
Avec plusieurs centaines de fichiers mp3, le temps d'exécution est très, très long.
N'y a-t-il pas un autre moyen de récupérer la durée du mp3 sans devoir ouvrir le fichier ?
Par exemple, dans l'explorateur Windows, en faisant un clic droit sur le fichier, puis propriétés, puis onglet détail, la durée du mp3 est affichée, sans devoir ouvrir le fichier.
Comment récupérer cette durée sans ouvrir le fichier ?
Je vous remercie.
I am writing a program in Purebasic which displays, in a ListIconGadget, the list of mp3 files that I have in my folders.
I want to display the duration of each song to the right of the title.
Looking on the forum, I found codes but, in these codes, we open each file to find the duration.
With several hundred mp3 files, the execution time is very, very long.
Isn't there another way to recover the duration of the mp3 without having to open the file?
For example, in the Windows explorer, by right-clicking on the file, then properties, then detail tab, the duration of the mp3 is displayed, without having to open the file.
How to recover this duration without opening the file?
Thank you.
■ falsam : Traduction avec Deepl. (Bien mieux que google translate à mon avis)
Bonjour à tous,
J'écris un programme en Purebasic qui affiche, dans un ListIconGadget, la liste des fichiers mp3 que j'ai dans mes dossiers.
Je souhaite afficher la durée de chaque chanson à droite du titre.
En cherchant sur le forum, j'ai trouvé des codes mais, dans ces codes, on ouvre chaque fichier pour trouver la durée.
Avec plusieurs centaines de fichiers mp3, le temps d'exécution est très, très long.
N'y a-t-il pas un autre moyen de récupérer la durée du mp3 sans devoir ouvrir le fichier ?
Par exemple, dans l'explorateur Windows, en faisant un clic droit sur le fichier, puis propriétés, puis onglet détail, la durée du mp3 est affichée, sans devoir ouvrir le fichier.
Comment récupérer cette durée sans ouvrir le fichier ?
Je vous remercie.