Audio file's length (duration) is missing from Attachment Details in Media Library
I'm uploading a different mp3 file to each post as an attachment and using wp_get_attachment_metadata()
to print the duration of the mp3 file. Sometimes the response from wp_get_attachment_metadata()
does not contain the file length and when I inspect the mp3s inside the Media Library, some of them display a length and some do not:
I suspect that there are some encoders that produce an mp3 with the length attribute and some that don't. So far I've tried Audacity's LAME encoder and Traktor Pro 2. Does anyone know a piece of software the will reliably give me the length attribute in for mp3s uploaded to WordPress or have some other means of resolving this issue?
Topic audio media-library attachments media Wordpress
Category Web