Skip to main content

Extract ID3 tags and EXIF data

@remotion/media-parser allows you to extract metadata that is embedded in video files, such as ID3 tags or EXIF data.

Extracting metadata
tsx
import {parseMedia} from '@remotion/media-parser';
 
const {metadata} = await parseMedia({
src: 'https://example.com/my-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',
}
]
*/
Extracting metadata
tsx
import {parseMedia} from '@remotion/media-parser';
 
const {metadata} = await parseMedia({
src: 'https://example.com/my-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',
}
]
*/

Some metadata refers to a certain track, such as the 'encoder' field.
In this case, the trackId field will contain a non-null value. You can get a list of tracks by setting the tracks field to true.

Common metadata fields

Here is a non-exhaustive list of commonly seen metadata that you may want to parse and display.
Use the container field to get the container format of the video.

ISO Base Media (.mp4, .mov)

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 v4.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"

Matroska (.mkv, .webm)

FieldDescriptionExample value
durationDuration of a video / stream"00:00:00.333000000"
encoderSoftware used to encode stream/Video"Lavc60.31.102 libx264"
commentSoftware used to encode stream/Video"Made with Remotion 4.0.192"

RIFF (.avi)

FieldDescriptionExample value
encoderSoftware used to encode stream/Video"Lavf57.19.100"

Fields are not unique

Some fields may appear multiple times per video, such as encoder, comment or duration.
Oftentimes they are scoped to a certain track, which is why the trackId field is present in the metadata object.

See also