• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

1stplugins

FileMaker plug-ins and Reverse Engineering

  • Plugins
    • MediaManager
  • Services
    • Reverse Engineering
    • FileMaker Plug-Ins
  • About
    • About Us
    • Contact Us
    • Terms of Use of the Website and Privacy Policy
  • Store
    • Terms and Conditions
    • Warranty Claim Guidelines
    • Contract Withdrawal Form
    • Warranty Claim Report

Media_GetMetaData (sound)

Media_GetMetadata ( containerOrFile { ; frameNameOrAtCode { ; getTagsAsCodes } } )

This variant of Media_GetMetadata is intended for sound. For the image variant of the function please refer here.

Media_GetMetadata lets you view the ID3 metadata stored in an MP3 sound file or metadata in an AAC file. You can either view the entire list of ID3 frames, or a specific frame, like “Artist,” etc.

Parameter Description
containerOrFile

Location of the sound file.

The container parameter can be:

  • a container field
  • file path
  • text field with a file path
frameNameOrAtCode Optional parameter. Optional parameter. If you want to view only a specific piece of information. Frames can be referred to by name or by code (see below). The following names are supported for MP3:

  • "Album Artist Sort Order" – or @TSO2
  • "Album Artist" – or @TPE2
  • "Album Title Sort Order" – or @TSOA
  • "Album Title" – or @TALB
  • "Audio Seek Point Index" – or @ASPI
  • "Audio Source Webpage URL" – or @WOAS
  • "Audio encryption" – or @AENC
  • "Beats Per Minute" – or @TBPM
  • "CDID" – or @MCDI
  • "Chapter" – or @CHAP
  • "Comments" – or @COMM
  • "Commercial Frame" – or @COMR
  • "Commercial Information URL" – or @WCOM
  • "Compilation" – or @TCMP
  • "Composer Sort Order" – or @TSOC
  • "Composer" – or @TCOM
  • "Conductor" – or @TPE3
  • "Content Group" – or @TIT1
  • "Copyright Message" – or @TCOP
  • "Copyright URL" – or @WCOP
  • "Cover Art" – or @APIC
  • "Date" – or @TDAT
  • "Description" – or @TIT3
  • "Disc Number" – or @TPOS
  • "Disc/Set Subtitle" – or @TSST
  • "Encoded By" – or @TENC
  • "Encoder Software" – or @TSSE
  • "Encoding Time" – or @TDEN
  • "Encryption Method Registration" – or @ENCR
  • "Equalisation (2)" – or @EQU2
  • "Event Timing Codes" – or @ETCO
  • "File Owner" – or @TOWN
  • "File Type" – or @TFLT
  • "File Webpage URL" – or @WOAF
  • "General Encapsulated Object" – or @GEOB
  • "Genre" – or @TCON
  • "Group Identification Registration" – or @GRID
  • "ISRC" – or @TSRC
  • "Initial Key" – or @TKEY
  • "Internet Radio Station Owner" – or @TRSO
  • "Internet Radio Station" – or @TRSN
  • "Involved People List" – or @TIPL
  • "Language" – or @TLAN
  • "Length" – or @TLEN
  • "Linked Information" – or @LINK
  • "Long Description" – or @TDES
  • "Lyricist" – or @TEXT
  • "Lyrics" – or @USLT
  • "MPEG Location Lookup Table" – or @MLLT
  • "Media Type" – or @TMED
  • "Mood" – or @TMOO
  • "Musician Credits" – or @TMCL
  • "Original Album Title" – or @TOAL
  • "Original Artist" – or @TOPE
  • "Original Filename" – or @TOFN
  • "Original Lyricist" – or @TOLY
  • "Original Release Date" – or @TDOR
  • "Original Release Year" – or @TORY
  • "Ownership" – or @OWNE
  • "Payment URL" – or @WPAY
  • "Play Counter" – or @PCNT
  • "Playlist Delay" – or @TDLY
  • "Podcast Category" – or @TCAT
  • "Podcast GUID" – or @TGID
  • "Podcast Keywords" – or @TKWD
  • "Podcast Release Date" – or @TDRL
  • "Podcast URL" – or @WFED
  • "Podcast" – or @PCST
  • "Popularimeter" – or @POPM
  • "Position Synchronisation" – or @POSS
  • "Private" – or @PRIV
  • "Produced Notice" – or @TPRO
  • "Publisher" – or @TPUB
  • "Publishers Web Page URL" – or @WPUB
  • "Radio Station URL" – or @WORS
  • "Recommended Buffer Size" – or @RBUF
  • "Recording Dates" – or @TRDA
  • "Relative Volume Adjustment (2)" – or @RVA2
  • "Release Date" – or @TDRC
  • "Remixed By" – or @TPE4
  • "Reverb" – or @RVRB
  • "Seek" – or @SEEK
  • "Signature" – or @SIGN
  • "Synchronised Lyrics" – or @SYLT
  • "Synchronised Tempo Codes" – or @SYTC
  • "TIME" – or @TIME
  • "Table of Contents" – or @CTOC
  • "Tagging Time" – or @TDTG
  • "Terms of Use" – or @USER
  • "Track Artist Sort Order" – or @TSOP
  • "Track Artist Web Page URL" – or @WOAR
  • "Track Artist" – or @TPE1
  • "Track Number" – or @TRCK
  • "Track Title Sort Order" – or @TSOT
  • "Track Title" – or @TIT2
  • "Unique File Identifier" – or @UFID
  • "User Defined Text Information" – or @TXXX
  • "User Defined URL" – or @WXXX
  • "Year" – or @TYER
getTagsAsCodes Optional parameter.

  • 0 — return frame names (Year)
  • 1 — return frame codes (@TYER)
  • 2 — return JSON content

List all Metadata Values

Set Field [ MyTable::Metadata ;
Media_GetMetadata ( containerOrFile ) ]

When the optional “frameNameOrAtCode” parameter is left blank or unused, Media_GetMetadata returns all of the ID3 metadata, such as:

Name: Poème, Op. 41, No. 6
Album: Piano Encores: 50 Favourite Pieces (Disc 2)
Year: 1995
Genre: Classical

Extracting Values from a List of Tags and Values

To extract the value of a particular frame, request that frame directly from the function, or use the Media_ExtractInfo function for the text format or code format. You can also parse the value from the JSON format by using FileMaker’s capabilities or by using Media_JSONPath.

Returning a Single Frame Value

If you don’t want the entire metadata list and you know the name of a particular value you want, you can specify frame directly with Media_GetMetadata:

Set Field [ MyTable::Metadata ;
Media_GetMetadata (
containerOrFile ;
"Year"
) ]

For a sound file with the metadata shown above, MediaManager will respond with “1995”.

List all Metadata Values using ID3 tags

Set Field [ MyTable::Metadata ;
Media_GetMetadata (
containerOrFile ;
"" ; # empty = all frames
1 # get @codes
) ]

When the second parameter is set to blank quotes (“”) and the third parameter is set to “True”, Media_GetMetadata returns all of the metadata using their corresponding ID3 codes, such as:

@TIT2: Poème, Op. 41, No. 6
@TALB: Piano Encores: 50 Favourite Pieces (Disc 2)
@TYER: 1995
@TCON: Classical

Returning a Single Frame Value using frame code

Set Field [ MyTable::Metadata ;
Media_GetMetadata (
containerOrFile ;
"@TYER" ; # TYER ID3 Frame
1 # use @codes
) ]

For a sound file with the metadata shown above, MediaManager will respond with “1995”.

To use ID3 frames directly with this function, the “@” character must precede the standard ID3 code (“TYER” = year) and the third parameter must be set to True or 1.

To see the full list of ID3 frames currently in use within a file’s metadata, follow the instructions above to list all metadata values using ID3 frame codes.

For a complete list of standard ID3 frames, visit http://id3lib.sourceforge.net/id3/id3v2.3.0.html#sec4

Follow this function with Media_GetLastError to check for any error responses.

See Media_SetMetadata for information on how to change the metadata tags.

Examples

To get the full metadata list of an external sound file named “Bop.mp3” and stored on the desktop:

Set Field [ MyTable::Metadata ;
Media_GetMetadata (
MyTable::SoundContainer
) ]

To get only the value of the “Genre” tag from an external sound file named “Allegro.mp3” in the current default folder:

Set Field [ MyTable::Metadata ;
Media_GetMetadata (
MyTable::SoundContainer ;
"Genre"
) ]

To store the full metadata list in a field and, in a separate field, store the “Name” value:

Set Field [ MyTable::Metadata List;
Media_GetMetadata (
".D/sounds/pavane.mp3"
) ]

Set Field [ MyTable::Metadata Name ;
Media_ExtractInfo (
MyTable::Metadata List ;
"Name"
) ]

Primary Sidebar

Document Functions

Media_CopyItem
Media_CreateAlias
Media_CreateFolder
Media_DeleteItem
Media_ExportField
Media_ExtractInfo
Media_GetDefaultFolder
Media_GetItemInfo
Media_GetName
Media_GetPath
Media_InsertFile
Media_ListDisks
Media_ListFolder
Media_MoveItem
Media_OpenItem
Media_RenameItem
Media_Search
Media_SetDefaultFolder

General and Registration Functions

Media_Get
Media_GetLastError
Media_GetMouseUp
Media_JSONPath
Media_PeekStream
Media_Register
Media_RegisterLicensedEncoder
Media_Set
Media_Version

Image Functions

Media_ConvertImage
Media_CreateQRCode
Media_EffectApply
Media_EffectDialog
Media_GetImageInfo
Media_GetMetadata
Media_InsertImage
Media_ListImageOutputTypes
Media_SetImageDefaults Media_TApply
Media_TClear
Media_TCrop
Media_TQuad
Media_TResize
Media_TRotate
Media_TScale
Media_TSkew

Script Steps

Copy Item
Create Alias
Create Folder
Delete Item
Export Field
Get Default Folder
Get Item Property
Move Item
Open Item
Rename Item
Set Default Folder

Sound Functions

Media_Amplify
Media_AppendSound
Media_ConvertSound
Media_CreateSound
Media_DrawWaveform
Media_ExtractSound
Media_FadeSound
Media_GetMetadata
Media_GetSoundInfo
Media_InsertQuickTime
Media_ListSoundOutputFormats
Media_MixSounds
Media_Normalize
Media_PlayPause
Media_PlaySound
Media_RecordSoundFormatDialog
Media_RecordSoundStart
Media_RecordSoundPause
Media_RecordSoundStop
Media_SetMetadata
Media_SoundFormatDialog
Media_StopSound

Video Functions

Media_GetVideoInfo

Footer

Let’s get started on your project.

Get in touch

  • Plugins
  • Services
  • About
  • Store

Copyright ©2006-2020 by 1stplugins, s.r.o. All rights reserved.