id3_set_tag
Introduction
Audio Formats Manipulation
PHP Manual

# KTaglib

Table of Contents

- Introduction
- Installing/Configuring
  - Requirements
  - Installation
- Predefined Constants
- KTaglib_MPEG_File — The KTaglib_MPEG_File class
  - KTaglib_MPEG_File::__construct — Opens a new file
  - KTaglib_MPEG_File::getAudioProperties — Returns an object that provides access to the audio properties
  - KTaglib_MPEG_File::getID3v1Tag — Returns an object representing an ID3v1 tag
  - KTaglib_MPEG_File::getID3v2Tag — Returns a ID3v2 object
- KTaglib_MPEG_AudioProperties — The KTaglib_MPEG_AudioProperties class
  - KTaglib_MPEG_AudioProperties::getBitrate — Returns the bitrate of the MPEG file
  - KTaglib_MPEG_AudioProperties::getChannels — Returns the amount of channels of a MPEG file
  - KTaglib_MPEG_AudioProperties::getLayer — Returns the layer of a MPEG file
  - KTaglib_MPEG_AudioProperties::getLength — Returns the length of a MPEG file
  - KTaglib_MPEG_AudioProperties::getSampleBitrate — Returns the sample bitrate of a MPEG file
  - KTaglib_MPEG_AudioProperties::getVersion — Returns the version of a MPEG file
  - KTaglib_MPEG_AudioProperties::isCopyrighted — Returns the copyright status of an MPEG file
  - KTaglib_MPEG_AudioProperties::isOriginal — Returns if the file is marked as the original file
  - KTaglib_MPEG_AudioProperties::isProtectionEnabled — Returns if protection mechanisms of an MPEG file are enabled
- KTaglib_Tag — The KTaglib_Tag class
  - KTaglib_Tag::getAlbum — Returns the title string from a ID3 tag
  - KTaglib_Tag::getArtist — Returns the artist string from a ID3 tag
  - KTaglib_Tag::getComment — Returns the comment from a ID3 tag
  - KTaglib_Tag::getGenre — Returns the genre from a ID3 tag
  - KTaglib_Tag::getTitle — Returns the title string from a ID3 tag
  - KTaglib_Tag::getTrack — Returns the track number from a ID3 tag
  - KTaglib_Tag::getYear — Returns the year from a ID3 tag
  - KTaglib_Tag::isEmpty — Returns true if the tag is empty
- KTaglib_ID3v2_Tag — The KTaglib_ID3v2_Tag class
  - KTaglib_ID3v2_Tag::addFrame — Add a frame to the ID3v2 tag
  - KTaglib_ID3v2_Tag::getFrameList — Returns an array of ID3v2 frames, associated with the ID3v2 tag
- KTaglib_ID3v2_Frame — The KTaglib_ID3v2_Frame class
  - KTaglib_ID3v2_Frame::getSize — Returns the size of the frame in bytes
  - KTaglib_ID3v2_Frame::__toString — Returns a string representation of the frame
- KTaglib_ID3v2_AttachedPictureFrame — The KTaglib_ID3v2_AttachedPictureFrame class
  - KTaglib_ID3v2_AttachedPictureFrame::getDescription — Returns a description for the picture in a picture frame
  - KTaglib_ID3v2_AttachedPictureFrame::getMimeType — Returns the mime type of the picture
  - KTaglib_ID3v2_AttachedPictureFrame::getType — Returns the type of the image
  - KTaglib_ID3v2_AttachedPictureFrame::savePicture — Saves the picture to a file
  - KTaglib_ID3v2_AttachedPictureFrame::setMimeType — Set's the mime type of the picture
  - KTaglib_ID3v2_AttachedPictureFrame::setPicture — Sets the frame picture to the given image
  - KTaglib_ID3v2_AttachedPictureFrame::setType — Set the type of the image

# The KTaglib_MPEG_File class

## Introduction

Represents an MPEG file. MPEG files can have ID3v1, ID3v2 tags and audio properties.

## Class synopsis

KTaglib_MPEG_File
class KTaglib_MPEG_File {
/* Methods */
public KTaglib_MPEG_File getAudioProperties ( void )
public KTaglib_ID3v1_Tag getID3v1Tag ([ bool `$create` = false ] )
public KTaglib_ID3v2_Tag getID3v2Tag ([ bool `$create` = false ] )
}

# The KTaglib_MPEG_AudioProperties class

## Introduction

Represents the audio properties of a MPEG file, like length, bitrate or samplerate.

## Class synopsis

KTaglib_MPEG_Audioproperties
class KTaglib_MPEG_AudioProperties {
/* Methods */
public int KTaglib_MPEG_AudioProperties::getBitrate ( void )
public int KTaglib_MPEG_AudioProperties::getChannels ( void )
public int KTaglib_MPEG_AudioProperties::getLayer ( void )
public int KTaglib_MPEG_AudioProperties::getLength ( void )
public int KTaglib_MPEG_AudioProperties::getSampleBitrate ( void )
public int KTaglib_MPEG_AudioProperties::getVersion ( void )
public bool KTaglib_MPEG_AudioProperties::isCopyrighted ( void )
public bool KTaglib_MPEG_AudioProperties::isOriginal ( void )
public bool KTaglib_MPEG_AudioProperties::isProtectionEnabled ( void )
}

# The KTaglib_Tag class

## Introduction

Base class for ID3v1 or ID3v2 tags

## Class synopsis

KTaglib_Tag
class KTaglib_Tag {
/* Methods */
public string getAlbum ( void )
public string getArtist ( void )
public string getComment ( void )
public string getGenre ( void )
public string getTitle ( void )
public int getTrack ( void )
public int getYear ( void )
public bool isEmpty ( void )
}

# The KTaglib_ID3v2_Tag class

## Introduction

Represents and ID3v2 tag. It provides a list of ID3v2 frames and can be used to add and remove additional frames.

## Class synopsis

KTaglib_ID3v2_Tag
extends class KTaglib_Tag {
/* Methods */
public bool addFrame ( KTaglib_ID3v2_Frame `$frame` )
public array getFrameList ( void )
/* Inherited methods */
public string KTaglib_Tag::getAlbum ( void )
public string KTaglib_Tag::getArtist ( void )
public string KTaglib_Tag::getComment ( void )
public string KTaglib_Tag::getGenre ( void )
public string KTaglib_Tag::getTitle ( void )
public int KTaglib_Tag::getTrack ( void )
public int KTaglib_Tag::getYear ( void )
public bool KTaglib_Tag::isEmpty ( void )
}

# The KTaglib_ID3v2_Frame class

## Introduction

The base class for ID3v2 frames. ID3v2 tags are separated in various specialized frames. Some frames can exists multiple times.

## Class synopsis

KTaglib_ID3v2_Frame
extends class KTaglib_Tag {
/* Methods */
public int getSize ( void )
public string __toString ( void )
/* Inherited methods */
public string KTaglib_Tag::getAlbum ( void )
public string KTaglib_Tag::getArtist ( void )
public string KTaglib_Tag::getComment ( void )
public string KTaglib_Tag::getGenre ( void )
public string KTaglib_Tag::getTitle ( void )
public int KTaglib_Tag::getTrack ( void )
public int KTaglib_Tag::getYear ( void )
public bool KTaglib_Tag::isEmpty ( void )
}

# The KTaglib_ID3v2_AttachedPictureFrame class

## Introduction

Represents an ID3v2 frame that can hold a picture.

## Class synopsis

KTaglib_ID3v2_AttachedPictureFrame
extends class KTaglib_ID3v2_Frame {
/* Methods */
public string getDescription ( void )
public string getMimeType ( void )
public int getType ( void )
public bool savePicture ( string `$filename` )
public string getMimeType ( string `$type` )
public void setPicture ( string `$filename` )
public void setType ( int `$type` )
/* Inherited methods */
public int KTaglib_ID3v2_Frame::getSize ( void )
public string KTaglib_ID3v2_Frame::__toString ( void )
public string KTaglib_Tag::getAlbum ( void )
public string KTaglib_Tag::getArtist ( void )
public string KTaglib_Tag::getComment ( void )
public string KTaglib_Tag::getGenre ( void )
public string KTaglib_Tag::getTitle ( void )
public int KTaglib_Tag::getTrack ( void )
public int KTaglib_Tag::getYear ( void )
public bool KTaglib_Tag::isEmpty ( void )
}