MP3 Info + Documentation
Notes:
- This module supersedes the MP3 Info + Plugin which will no longer be maintained. If you used it, you can remove it.
- This module requires the cache-folder in your ExpressionEngine system directory to be writeable by ExpressionEngine. A folder named ‘MP3_info’ will be created there where cached file-information will be stored.
Installation:
- Unzip the archive.
- Copy the folder named mp3_info into the modules folder inside your system-directory.
- Copy the file named lang.mp3_info.php into the /language/english folder inside your system-directory.
- Navigate to Modules in your EE CP and find the module named MP3 Info. Click Install.
Tag
{exp:mp3_info:show file="http://mytestdomain.org/mp3/Hollow_Years.mp3" path="/home/noone/htdocs/mp3/"}
{/exp:mp3_info:show}
Parameters:
We need the full path to the mp3-file. There are two parameters to achieve this:
file=""
- If this is the full path + the filename, the path-parameter must not be used.
- If this is the filename only, specify the path in the path-parameter.
- If this is the URL to the file, the filename will be extracted. Specify the path in the path-parameter.
path=""
The full path to the file. Use only in cases 2. and 3. explained above.
Variables:
General MPEG information:
{mpeg_version_id}
Version ID
{mpeg_version}
Version
{mpeg_layer_id}
Layer ID
{mpeg_layer}
Layer
{mpeg_protection}
Protection
{mpeg_bitrate}
Bitrate
{mpeg_sample_rate}
Sampe Rate:
{mpeg_private}
Private
{mpeg_channels}
Channels
{mpeg_channelmode}
Channelmode
{mpeg_copyright}
Copyright
{mpeg_original}
Original
General information:
{filesize}
Filesize in human-readable format
{filesize_bytes}
Filesize in bytes
{playtime_string}
Playtime of the MP3, e.g.: 05:53
{playtime_seconds}
Playtime of the MP3 in full seconds, e.g. 344
ID3v1 Tags:
{id3v1_title}
Song Title (max. 30 characters)
{id3v1_artist}
Artist (max. 30 characters)
{id3v1_album}
Album (max. 30 characters)
{id3v1_year}
Year
{id3v1_comment}
Comment (max. 30 characters)
{id3v1_track}
Track
{id3v1_genre_id}
Genre ID
{id3v1_genre}
Genre
ID3v2 Tags:
{id3v2_comments}
COMM [#sec4.11 Comments]
{id3v2_album}
TALB [#TALB Album/Movie/Show title]
{id3v2_composer}
TCOM [#TCOM Composer]
{id3v2_content_type}
TCON [#TCON Content type] aka Genre
{id3v2_copyright_message}
TCOP [#TCOP Copyright message]
{id3v2_title}
TIT2 [#TIT2 Title/songname/content description]
{id3v2_original_artist}
TOPE [#TOPE Original artist(s)/performer(s)]
{id3v2_artist}
TPE1 [#TPE1 Lead performer(s)/Soloist(s)]
{id3v2_band}
TPE2 [#TPE2 Band/orchestra/accompaniment]
{id3v2_tpos}
TPOS [#TPOS Part of a set]
{id3v2_publisher}
TPUB [#TPUB Publisher]
{id3v2_track}
TRCK [#TRCK Track number/Position in set]
{id3v2_tsse}
TSSE [#TSEE Software/Hardware and settings used for encoding]
{id3v2_year}
TYER [#TYER Year]
{id3v2_uslt}
USLT [#sec4.9 Unsychronized lyric/text transcription]
{id3v2_uslt_br}
USLT [#sec4.9 Unsychronized lyric/text transcription]
In this variable the linebreaks have been replaced by <br />-tags.
ID3v2 Variable Pairs:
{id3v2_apic} {/id3v2_apic}
APIC [#sec4.15 Attached picture]
You can embed any number of images into an MP3-file. The {id3v2_apic}-variable will loop through them.
Example:
{id3v2_apic}
<img src="{image_url}" width="{image_width}" height="{image_height}" alt="{image_description}" /> <br />
{/id3v2_apic}
{id3v2_apic} variables:
{image_description}
The description text of the actual image.
{image_height}
The height of the actual image.
{image_typeid}
The type ID of the actual image.
{image_type}
The textual representation of the type of the actual image .
{image_url}
The URL of the actual image. This will be created on the fly.
{image_width}
The width of the actual image.
If your files contain multiple images and you want to only display (a) specific picture type(s), you can use conditionals based on {image_typeid}.
Show only the “Cover (front)” image:
{id3v2_apic}
{id3v2_apic}
{if {image_typeid} == 3}
<img src="{image_url}" width="{image_width}" height="{image_height}" alt="{image_description}" /> <br />
{/if}
{/id3v2_apic}
+---+------------------------------------+
|ID | PICTURE TYPE |
+---+------------------------------------+
|0 | Other |
|1 | 32x32 pixels 'file icon' (PNG only)|
|2 | Other file icon |
|3 | Cover (front) |
|4 | Cover (back) |
|5 | Leaflet page |
|6 | Media (e.g. lable side of CD) |
|7 | Lead artist/lead performer/soloist |
|8 | Artist/performer |
|9 | Conductor |
|10 | Band/Orchestra |
|11 | Composer |
|12 | Lyricist/text writer |
|13 | Recording Location |
|14 | During recording |
|15 | During performance |
|16 | Movie/video screen capture |
|17 | A bright coloured fish |
|18 | Illustration |
|19 | Band/artist logotype |
|20 | Publisher/Studio logotype |
+---+------------------------------------+
Questions / bug reports
For general comments, brickbats & bouquets please use the form over here.User Talk
2009-01-12 00:22
I’ve installed the plugin and got it sort of working on my ee install.
There are a number of issues ive come across.
1. It doesnt return any of the “ID3v1” tags such as artist, year…
2. It returns some information such as length, however it is incorrect (I used the plugin on a track knowing it’s length to be 4:18 but the plugin returned 5:22)
3. My webpage returns some “no tag” text in the top left corner of the screen.
Any ideas on these? Thanks