Ffmpeg vs mediainfo for thumbnails and metadata

I need to extract information from metadata from a video file, as well as a thumbnail for this file. For this, I tried ffmpeg, and metadata (such as duration, resolution, codecs, creat_time, etc.) are visible on stdout. If I need to use them, I have to parse stdout and extract the metadata I need.

I also read about the MediaInfo utility, which also provides metadata. I'm not sure if he can show sketches. I also know that MediaInfo does not use ffmpeg under the hood.

I was wondering if anyone has a good knowledge of both ffmpeg and MediaInfo, and regarding the requirement mentioned above, can anyone suggest which of the two is best suited.

A comparison between memory and memory would be wonderful.

+4
source share
3 answers

The correct answer is neither ffmpeg nor mediainfo. Well, not all executables are anyway.

ffmpeg consists of a series of libraries, including libavformat , which allows you to work with multimedia container formats. Using Martin Boehme's libavformat and libavcodec should give you a good idea.

+3
source

You should use the base libraries directly, as indicated in other answers.

However, for completeness, you should persist in using a separate shell process, not analyze the output of FFmpeg . Instead, use FFprobe , which is a little-known tool specifically designed to complement FFmpeg and facilitate the extraction of metadata.

In addition, sketching can be done with FFmpeg more or less:

 ffmpeg [-ss 10] -i input.avi -vframes 1 -s 320x240 thumbnail.png 

Adjust the size to your liking and use the optional -ss option to capture the image from some point other than the very beginning of the video.

+6
source

As far as I know, MediaInfo is openource ( see here ), and its library can be used in a Windows environment (this is a dll) from C ++ or C #. There is no need to parse the output. It has developer documentation and some examples.

I don't think he can retrieve sketches, though.

+2
source

All Articles