probe_all: Look up information about media files using FFprobe

View source: R/ffprobe.R

probe_allR Documentation

Look up information about media files using FFprobe

Description

probe_all() uses the FFprobe program to read information about media files. It returns two tibbles. One describes each file as a whole, and one describes each stream in the files.

Usage

probe_all(infile, typed = TRUE, parallel = FALSE)

Arguments

infile

A character vector of one or more media files to probe, as file paths or web links.

typed

A logical. If TRUE (the default), numeric columns become integers or doubles, and FFprobe's "N/A" becomes NA. Fractions, ratios, hex identifiers and text stay as strings. If FALSE, every value stays a string.

parallel

A logical. If TRUE, the function probes the files in parallel with furrr. If FALSE (the default), it probes them one at a time. A parallel run uses the active future::plan(). It warns when that plan is sequential, because the run is then no faster. The output is the same either way, with the same rows in the same order. parallel = TRUE needs the furrr package, and only then does the function check for it.

Details

Give several files in infile to read them all in one call. The function stacks the rows, and the first column, file, names the input file. So you can join and filter the results for a whole batch with dplyr.

The MediaInfo functions, ⁠mediainfo_*()⁠, return tibbles or values. The ⁠get_*()⁠ functions return one value for each file.

The glossary in vignette("tidymedia") explains media terms such as container and stream.

Value

A list of two tibbles. container has one row for each input file. streams has one row for each stream. Both tibbles start with a file column that names the input file. A file with no readable streams gets one row in streams, with NA in every other column.

The function does not stop at a file that it could not probe. That file gets a row of NA values in both tibbles, and the function gives a warning. A file that reaches the time limit counts as not probed; see with_timeout().

See Also

mediainfo_template() and mediainfo_query() to read information with MediaInfo. get_duration() and the other ⁠get_*()⁠ functions for single values.

Other metadata functions: get_duration(), get_frame_rate(), get_height(), get_sample_rate(), get_width(), mediainfo_parameter(), mediainfo_query(), mediainfo_template(), probe_container()

Examples


video <- system.file("extdata", "sample.mp4", package = "tidymedia")
info <- probe_all(video)
info$container
info$streams


tidymedia documentation built on Oct. 11, 2026, 5:08 p.m.