Computed Field : audio file duration using getID3

To do this in Drupal 7 first install two modules : getID3() and Computed Field.

In the content type that holds the details for each audio track add a field of type 'Computed'
For this field, in the entry 'Computed Field (PHP)' insert the following code:

Audiofield

Go back to AudioField

Installation

In order to activate this module you have to get one of audio players from the following links
1. http://wpaudioplayer.com/download *Note make sure you should download the standalone edition
2. http://sourceforge.net/projects/musicplayer/files/musicplayer/slim-playe...
3. http://www.premiumbeat.com/flash_music_players/original/single/
4. http://www.premiumbeat.com/flash_music_players/original/thin/
5. http://www.premiumbeat.com/flash_music_players/original/mini/
(Premiumbeat.com no longer offers the music players)
6. Install FlowPlayer module (http://drupal.org/project/flowplayer) to use Flowplayer (optional)
7.http://www.jplayer.org/ VERSION 2.0, not 2.1 (7.x-1.x only)
8. Soundmanager2 http://www.schillmania.com/projects/soundmanager2/doc/download/
9. Use Google reader player, no installation required. NEW

Where to extract the players?

Once you have installed any of the above audio players you must create a new folder called "player "at this
directory "sites/all/libraries". Now you can unzip the audio players directly into the "player" folder.

jPlayer

The jPlayer module provides a wrapper around the jPlayer JavaScript library.

This library provides an HTML5-based player, that uses a Flash fallback for browsers that do not support it. This module provides a default presentation for the player, as well as integration with file fields. This makes it possible to easily convert the display of any file field into an audio player.

This player will only work with MP3 files, so please be sure to restrict the file upload extensions on your file fields to only allow the mp3 extension.

Installation instructions for Drupal 7

  1. Install jPlayer as usual
  2. Download the jPlayer library and extract its contents in sites/all/libraries/jplayer
    (Tip: To make things easier, rename the folder to "jplayer")
  3. Go to the configuration page of Jplayer in the "Media" section of the administration interface (admin/config/media/jplayer). Specify the path that contains the jPlayer library. Default path for the jPlayer library directory is "sites/all/libraries/jplayer".

jPlayer should now be available as a format for your media fields.

To use jPlayer as a field format:

    Audiofield

    Documentation for the AudioField module.

    Install

    Install and enable the Audiofield module in the usual way. Learn about installing Drupal modules.

    Configure

    Configure the audiofield at Administration > Configuration > Media (http://example.com/admin/config/media/audiofield). For Drupal 6 that is http://example.com/admin/settings/audio). You can choose the default player and set the folder where the module can find the players. The player you select will be used as default player for all audio files.

    Add an audio field to the content type

    You can add an audiofield to any entity (content type, user, taxonomy et cetera).

    • Add a field via the Manage fields tabS
    • Select field type "File"
    • Select widget "Audio Upload"

    If you need further help managing fields read more about fields in Drupal.

    Players

    1. Audiofield's default is Google Reader MP3 Player CURRENTLY BROKEN [#2033375‎]
    2. The Standalone WordPress player. Make sure you download the standalone edition
    Subscribe with RSS Subscribe to RSS - audio