Skip to contents

mediainfo() runs the MediaInfo program with the arguments in command and returns its output. MediaInfo reads information about media files.

Usage

mediainfo(command)

Arguments

command

A string with the arguments to give MediaInfo.

Value

A character vector with the text that MediaInfo writes to standard output, one element for each line. Messages on standard error are not returned. On macOS and Linux, a shell redirect such as 2>&1 in command returns them too.

Details

mediainfo() is a direct command. The package passes command to MediaInfo exactly as you wrote it, so you must add any quotes that it needs. To get a tibble or a value instead, use mediainfo_template(), mediainfo_query() or mediainfo_parameter(). These functions quote their arguments for you.

See also

mediainfo_template(), mediainfo_query() and mediainfo_parameter() for a tibble or a value. get_duration() and the other get_*() functions for common single values.

Other direct command functions: ffmpeg(), ffprobe()

Examples

mediainfo("--Version")
#> [1] "MediaInfo Command line, " "MediaInfoLib - v24.01"