| mediainfo_template | R Documentation |
mediainfo_template() uses the MediaInfo program to describe media files,
and returns a tibble. It applies a MediaInfo template, which can read many
parameters from many sections.
mediainfo_template(
file,
template = c("brief", "extended", "custom"),
templatefile = NULL,
typed = TRUE
)
file |
A character vector of one or more media file paths. |
template |
A string. Use |
templatefile |
The path to your own MediaInfo template, a |
typed |
A logical. If |
The package comes with two templates, "brief" and "extended". You can
also give your own template file. Give several files in file to get one
row for each file. The first column, file, names the input file. The
probe_*() functions read similar information with FFprobe.
A tibble with one row for each input file. The template sets the columns, their names and their order. The function keeps the column names of a custom template, but removes spaces at their start and end.
A file that the function could not read gets a row of NA values. The
function reads the other files, and then gives one warning that names the
files it could not read. A file that reaches the time limit counts as not
read; see with_timeout().
mediainfo_query() to read one section. mediainfo_parameter() to
read a single value. probe_all() to read information with FFprobe.
get_duration() and the other get_*() functions for common single
values.
Other metadata functions:
get_duration(),
get_frame_rate(),
get_height(),
get_sample_rate(),
get_width(),
mediainfo_parameter(),
mediainfo_query(),
probe_all(),
probe_container()
video <- system.file("extdata", "sample.mp4", package = "tidymedia")
mediainfo_template(video, template = "brief")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.