Capítulo 698 de 988

Chapter 698: Extract ID3 tags and EXIF data

Core Idea

:::warning We are phasing out Media Parser and are moving to Mediabunny!

Key Concepts

  • Common metadata fields
  • ISO Base Media (.mp4, .mov)
  • Matroska (.mkv, .webm)
  • RIFF (.avi)
  • MP3
  • WAV
  • FLAC
  • Fields are not unique

Code Examples

const {metadata} = await parseMedia({
  src: 'https://remotion.media/video.mp4',
  fields: {
    metadata: true,
  },
});

console.log(metadata);

/*
[
  {
    key: 'com.apple.quicktime.model',
    trackId: null,
    value: 'iPhone 15 Pro',
  },
  {
    key: 'encoder',
    trackId: null,
    value: 'Lavf57.19.100',
  }
]
*/
  • What it demonstrates: Usage pattern for Extract ID3 tags and EXIF data from the official docs.

Reference Tables

FieldDescriptionExample value
artistID3 Artist Tag"Blender Foundation 2008, Janus Bager Kristensen 2013"
albumID3 Album Tag"The Resistance"
composerID3 Composer Tag"Sacha Goedegebure"
commentID3 Comment Tag"Made with Remotion 4.0.234"
releaseDateID3 Release Date Tag
genreID3 Genre Tag"Animation"
titleID3 Title Tag"Big Buck Bunny, Sunflower version"
writerID3 Writer Tag"Sacha Goedegebure"
directorID3 Director Tag
producerID3 Producer Tag
descriptionID3 Description Tag
durationID3 Duration Tag"00:00:10.000000000"
encoderSoftware used to encode the video/stream"Lavf60.16.100"
copyrightCopyright information"Blender Foundation"
major_brandThe major brand of the file"isom"
minor_versionThe minor version of the file"512"
compatible_brandsContainer compatibility"isomav01iso2mp41"
handler_nameSoftware used to mux the video"GPAC ISO Video Handler"
com.apple.quicktime.camera.focal_length.35mm_equivalent35mm-equivalent focal length23
com.apple.quicktime.camera.lens_modelLens of Apple Device"iPhone 15 Pro back camera 6.765mm f/1.78"
com.apple.quicktime.creationdateCreation date of video"2024-10-01T12:46:18+0200"
com.apple.quicktime.softwareOperating System Version (e.g. iOS) of Device"18.0"
com.apple.quicktime.modelDevice used to capture video"iPhone 15 Pro"
com.apple.quicktime.makeMaker of the device used to capture the video"Apple"
com.apple.quicktime.live-photo.vitality-scoreAn identifier that represents the vitality score of a Live Photo movie1
com.apple.quicktime.live-photo.vitality-scoring-versionAn identifier that represents the version of the algorithm responsible for scoring the Live Photo movie for vitality4
com.apple.quicktime.content.identifierAn identifier that represents the content identifier in QuickTime"2C1C7C94-E977-45D0-9B3F-9A9CA8EFB47D"
com.apple.quicktime.full-frame-rate-playback-intentAn key that represents whether this movie should play at full frame rate1
com.apple.quicktime.live-photo.autoAn identifier that represents whether the live photo movie used auto mode1
com.apple.quicktime.location.accuracy.horizontalAn identifier that represents the horizontal accuracy of the location data1
com.apple.quicktime.informationGeneral information"Captured with VisionCamera by mrousavy"

Key Takeaways

  1. Understand common metadata fields when working with Extract ID3 tags and EXIF data.
  2. Understand iso base media (.mp4, .mov) when working with Extract ID3 tags and EXIF data.
  3. Understand matroska (.mkv, .webm) when working with Extract ID3 tags and EXIF data.
  4. Understand riff (.avi) when working with Extract ID3 tags and EXIF data.
  5. Understand mp3 when working with Extract ID3 tags and EXIF data.

Connects To

  • Download and Parse: related page in the Media Parser (@remotion/media-parser) section.
  • Download and Parse Media: related page in the Media Parser (@remotion/media-parser) section.
  • Fast and Slow: related page in the Media Parser (@remotion/media-parser) section.