wseemann / FFmpegMediaMetadataRetriever

FFmpegMediaMetadataRetriever provides a unified interface for retrieving frame and meta data from an input media file.
1.72k stars 387 forks source link

Available key values #202

Closed HBiSoft closed 5 years ago

HBiSoft commented 5 years ago

Looking at the docs - http://wseemann.github.io/FFmpegMediaMetadataRetriever/apidocs/index.html

I can't find what key values are available when calling, for example:

mmr.getMetadata().getLong("????");

Is there any documentation on this?

I'm trying to find a videos timescale. When I run a command I can see it the timescale - 14848 tbn

wseemann commented 5 years ago

You can use mmr.getMetadata().getAll() which returns a HashMap containing the available key/value pairs.

See: http://wseemann.github.io/FFmpegMediaMetadataRetriever/apidocs/wseemann/media/Metadata.html#getAll()

HBiSoft commented 5 years ago

@wseemann Thank you for the quick reply.

mmr.getMetadata().getAll() returned the following:

{video_codec=h264, rotate=0, video_height=720, framerate=29, major_brand=isom, video_width=1280, audio_codec=aac, filesize=24727966, encoder=Lavf58.12.100, minor_version=512, duration=11000, chapter_count=0, compatible_brands=isomiso2avc1mp41}

The timescale is not here?

wseemann commented 5 years ago

getMetadata() provides all of the available metadata for the file. timescale isn't a supported FFmpeg metadata field. https://wiki.multimedia.cx/index.php/FFmpeg_Metadata