wppaste
WordPress

getID3

Source
wp-includes/ID3/getid3.php:78

Compatibility

WordPress
core
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Properties · 40

$encodingstringpublic
CASE SENSITIVE! - i.e. (must be supported by iconv()). Examples: ISO-8859-1 UTF-8 UTF-16 UTF-16BE
$encoding_id3v1stringpublic
Should always be 'ISO-8859-1', but some tags may be written in other encodings such as 'EUC-CN' or 'CP1252'
$encoding_id3v1_autodetectboolpublic
ID3v1 should always be 'ISO-8859-1', but some tags may be written in other encodings such as 'Windows-1251' or 'KOI8-R'. If true attempt to detect these encodings, but may return incorrect values for some tags actually in ISO-8859-1 encoding
$option_tag_id3v1boolpublic
Read and process ID3v1 tags
$option_tag_id3v2boolpublic
Read and process ID3v2 tags
$option_tag_lyrics3boolpublic
Read and process Lyrics3 tags
$option_tag_apetagboolpublic
Read and process APE tags
$option_tags_processboolpublic
Copy tags to root key 'tags' and encode to $this->encoding
$option_tags_htmlboolpublic
Copy tags to root key 'tags_html' properly translated from various encodings to HTML entities
$option_extra_infoboolpublic
Calculate additional info such as bitrate, channelmode etc
$option_save_attachmentsbool|stringpublic
Defaults to true (ATTACHMENTS_INLINE) for backward compatibility
$option_md5_databoolpublic
Get MD5 sum of data part - slow
$option_md5_data_sourceboolpublic
Use MD5 of source file if available - only FLAC and OptimFROG
$option_sha1_databoolpublic
Get SHA1 sum of data part - slow
$option_max_2gb_checkbool|nullpublic
Check whether file is larger than 2GB and thus not supported by 32-bit PHP (null: auto-detect based on PHP_INT_MAX)
$option_fread_buffer_sizeintpublic
Read buffer size in bytes
$options_archive_rar_use_php_rar_extensionboolpublic
archive.rar if true use PHP RarArchive extension, if false (non-extension parsing not yet written in getID3)
$options_archive_gzip_parse_contentsboolpublic
archive.gzip Optional file list - disable for speed.
$options_audio_midi_scanwholefileboolpublic
audio.midi if false only parse most basic information, much faster for some files but may be inaccurate
$options_audio_mp3_allow_bruteforceboolpublic
audio.mp3 Forces getID3() to scan the file byte-by-byte and log all the valid audio frame headers - extremely slow, unrecommended, but may provide data from otherwise-unusable files.
$options_audio_mp3_mp3_valid_check_framesintpublic
audio.mp3 number of frames to scan to determine if MPEG-audio sequence is valid Lower this number to 5-20 for faster scanning Increase this number to 50+ for most accurate detection of valid VBR/CBR mpeg-audio streams
$options_audio_wavpack_quick_parsingboolpublic
audio.wavpack Avoid scanning all frames (break after finding ID_RIFF_HEADER and ID_CONFIG_BLOCK, significantly faster for very large files but other data may be missed
$options_audiovideo_flv_max_framesintpublic
audio-video.flv Break out of the loop if too many frames have been scanned; only scan this many if meta frame does not contain useful duration.
$options_audiovideo_matroska_hide_clustersboolpublic
audio-video.matroska If true, do not return information about CLUSTER chunks, since there's a lot of them and they're not usually useful [default: TRUE].
$options_audiovideo_matroska_parse_whole_fileboolpublic
audio-video.matroska True to parse the whole file, not only header [default: FALSE].
$options_audiovideo_quicktime_ReturnAtomDataboolpublic
audio-video.quicktime return all parsed data from all atoms if true, otherwise just returned parsed metadata
$options_audiovideo_quicktime_ParseAllPossibleAtomsboolpublic
audio-video.quicktime return all parsed data from all atoms if true, otherwise just returned parsed metadata
$options_audiovideo_swf_ReturnAllTagDataboolpublic
audio-video.swf return all parsed tags if true, otherwise do not return tags not parsed by getID3
$options_graphic_bmp_ExtractPaletteboolpublic
graphic.bmp return BMP palette
$options_graphic_bmp_ExtractDataboolpublic
graphic.bmp return image data
$options_graphic_png_max_data_bytesintpublic
graphic.png If data chunk is larger than this do not read it completely (getID3 only needs the first few dozen bytes for parsing).
$options_misc_pdf_returnXREFboolpublic
misc.pdf return full details of PDF Cross-Reference Table (XREF)
$options_misc_torrent_max_torrent_filesizeintpublic
misc.torrent Assume all .torrent files are less than 1MB and just read entire thing into memory for easy processing.
$filenamestringpublic
Filename of file being analysed.
$fpresourcepublic
Filepointer to file being analysed.
$infoarraypublic
Result array.
$tempdirstringpublic
$memory_limitintpublic
$startup_errorstringprotected
$startup_warningstringprotected

Methods · 23

Source code

class getID3{	/*	 * Settings	 */ 	/**	 * CASE SENSITIVE! - i.e. (must be supported by iconv()). Examples:  ISO-8859-1  UTF-8  UTF-16  UTF-16BE	 *	 * @var string	 */	public $encoding        = 'UTF-8'; 	/**	 * Should always be 'ISO-8859-1', but some tags may be written in other encodings such as 'EUC-CN' or 'CP1252'	 *	 * @var string	 */	public $encoding_id3v1  = 'ISO-8859-1'; 	/**	 * ID3v1 should always be 'ISO-8859-1', but some tags may be written in other encodings such as 'Windows-1251' or 'KOI8-R'. If true attempt to detect these encodings, but may return incorrect values for some tags actually in ISO-8859-1 encoding	 *	 * @var bool	 */	public $encoding_id3v1_autodetect  = false; 	/*	 * Optional tag checks - disable for speed.	 */ 	/**	 * Read and process ID3v1 tags	 *	 * @var bool	 */	public $option_tag_id3v1         = true; 	/**	 * Read and process ID3v2 tags	 *	 * @var bool	 */	public $option_tag_id3v2         = true; 	/**	 * Read and process Lyrics3 tags	 *	 * @var bool	 */	public $option_tag_lyrics3       = true; 	/**	 * Read and process APE tags	 *	 * @var bool	 */	public $option_tag_apetag        = true; 	/**	 * Copy tags to root key 'tags' and encode to $this->encoding	 *	 * @var bool	 */	public $option_tags_process      = true; 	/**	 * Copy tags to root key 'tags_html' properly translated from various encodings to HTML entities	 *	 * @var bool	 */	public $option_tags_html         = true; 	/*	 * Optional tag/comment calculations	 */ 	/**	 * Calculate additional info such as bitrate, channelmode etc	 *

Changelog

Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/ID3/getid3.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.