OGG Vorbis files store their metadata as Vorbis comments: pairs of a field name and a value, such as ARTIST=... or TITLE=.... GroupDocs.Metadata for Java reads these comments through the OggPackage class.
try(Metadatametadata=newMetadata(Constants.InputOgg)){OggRootPackageroot=metadata.getRootPackageGeneric();OggPackageogg=root.getOggPackage();System.out.println(ogg.getVendor());System.out.println(ogg.getTitle());System.out.println(ogg.getArtist());System.out.println(ogg.getAlbum());System.out.println(ogg.getGenre());System.out.println(ogg.getDate());System.out.println(ogg.getCopyright());// Vorbis comments that are not mapped to dedicated properties
for(OggUserCommentcomment:ogg.getOggUserComments()){System.out.println(String.format("%s = %s",comment.getHeader(),comment.getValue()));}}
Searching OGG properties by tags
The OGG properties are marked with the same tags as the properties of other audio formats. So you can find, for example, the artist and the title without knowing the format of the file.