[TYPO3-dam] DAM Audio / getID3

Thomas Murphy murphy at spreekonzept.de
Tue Sep 27 17:26:31 CEST 2005


Hello everyone,

I wrote a service to extract mp3 metadata on the TYPO3 conference via 
getID3 (there is also a small flash-player integrated to play the files 
directly from the content object form in the BE)

If you want to check it out please make sure you have the getID3 
extension from the online repository and you are running *PHP5*!

http://www.spreekonzept.com/T3X_dam_metarichmedia-0_0_0-z-200509271659.t3x

I talked to René about writing a audio/video extension for the DAM. He 
told me that it would make sense to define some "official" audio/video 
ext which extends the tx_dam table by some short (and "reserved") column 
names, rather then something like "tx_metarichmedia_audio_title".
We thought about writing two extensions, on for audio and one for video.
The problem with this is: There are some attributes to richmedia files 
which belong to both types, like "audio-bitrate" for example.

I would like to start a discussion about the fields you think should be 
integrated into the tx_dam, and wether they should get into a 
flexform/XML or into a table column of their own (useful for attributes 
you might want to filter / speed).


I'm now posting a list of filetypes getID3 is able to extract metadata from:

---------------------------------------------------------------------

Reads & parses (to varying degrees):
  ¤ tags:
   * APE (v1 and v2)
   * ID3v1 (& ID3v1.1)
   * ID3v2 (v2.4, v2.3, v2.2)
   * Lyrics3 (v1 & v2)

  ¤ audio-lossy:
   * MP3/MP2/MP1
   * MPC / Musepack
   * Ogg (Vorbis, OggFLAC, Speex)
   * RealAudio
   * Speex
   * VQF

  ¤ audio-lossless:
   * AIFF
   * AU
   * Bonk
   * CD-audio (*.cda)
   * FLAC
   * LA (Lossless Audio)
   * LPAC
   * MIDI
   * Monkey's Audio
   * OptimFROG
   * RKAU
   * VOC
   * WAV (RIFF)
   * WavPack

  ¤ audio-video:
   * ASF: ASF, Windows Media Audio (WMA), Windows Media Video (WMV)
   * AVI (RIFF)
   * Flash
   * MPEG-1 / MPEG-2
   * NSV (Nullsoft Streaming Video)
   * Quicktime
   * RealVideo

  ¤ still image:
   * BMP
   * GIF
   * JPEG
   * PNG

  ¤ data:
   * ISO-9660 CD-ROM image (directory structure)
   * SZIP (limited support)
   * ZIP (directory structure)


Writes:
   * ID3v1 (& ID3v1.1)
   * ID3v2 (v2.3 & v2.4)
   * VorbisComment on OggVorbis
   * VorbisComment on FLAC (not OggFLAC)
   * APE v2
   * Lyrics3 (delete only)

---------------------------------------------------------------------


I am now posting a snippet from the available data by getID3. Those 
fields are available for most of the audio/video files and should IMO 
all get their own table column:

---------------------------------------------------------------------
['fileformat']=>string()
// one of the standard filetype abbreviations ('mp3', 
'riff','quicktime', etc)

['avdataoffset']=>integer()
// offset in bytes where audio/video data starts and prepended tags end

['avdataend']=>integer()
// offset in bytes where audio/video data ends and appended tags start

['bitrate']=>double()
// average bitrate for entire file (all audio/video streams), in bits 
per second

['mime_type']=>string()
// if present, MIME type of scanned file

['playtime_seconds']=>double()
// playing time of file, in seconds

['tags']=>array()
// array of all metainformation tags present in file ('id3v1', 'id3v2', 
'ape', 'riff', 'asf', etc)

['audio']=>array() {
	['bitrate']=>double()
	// average bitrate for audio portion of file (all audio
	streams), in bits per second
	['bitrate_mode']=>string()
	// 'cbr' (Constant Bit Rate) or 'vbr' (Variable Bit Rate)
	['bits_per_sample']=>integer()   //
	['channelmode']=>string()        // 'mono' or 'stereo'
	['channels']=>integer()          // number of audio channels
	['codec']=>string()
	// name of audio compression codec
	['compression_ratio']=>double()
	// ratio of compressed byte size of audio to uncompressed size
	['dataformat']=>string()
	// one of the standard filetype abbreviations ('mp3', 'wma',
	etc)
	['encoder']=>string()
	// name and version of encoder used to create file, if known
	['lossless']=>boolean()
	// true = lossless compression; false = lossy compression
	['sample_rate']=>integer()
}
['video']=>array() {
	['bitrate']=>integer()
	// average bitrate for video portion of file (all video
	streams), in bits per second
	['bitrate_mode']=>string()
	// 'cbr' (Constant Bit Rate) or 'vbr' (Variable Bit Rate)
	['bits_per_sample']=>integer()   //
	['codec']=>string()
	// name of video compression codec
	['compression_ratio']=>double()
	// ratio of compressed byte size of video to uncompressed size
	['dataformat']=>string()
	// one of the standard filetype abbreviations ('avi', 'mpeg',
	etc)
	['encoder']=>string()
	// name and version of encoder used to create file, if known
	['frame_rate']=>double()         // frames per second
	['lossless']=>boolean()
	// true = lossless compression; false = lossy compression
	['resolution_x']=>integer()
	// horizontal dimension of video/image in pixels
	['resolution_y']=>integer()
	// vertical dimension of video/image in pixels
	['pixel_aspect_ratio']=>double() // pixel display aspect ratio
}

---------------------------------------------------------------------


Sorry for the long mail, I hope it is at least a bit inspiring.

bye,
Thomas



More information about the TYPO3-project-dam mailing list