Skip to contents

get_frame_rate() uses the MediaInfo program to look up the video frame rate of a media file, in frames per second (fps). The glossary in vignette("tidymedia") explains media terms such as frame rate.

Usage

get_frame_rate(file)

Arguments

file

A character vector of one or more media file paths.

Value

A double vector (one per file) giving the video frame rate in fps.

Details

The function returns one number for each file. The probe_*() functions, mediainfo_query() and mediainfo_template() return tibbles instead.

See also

Examples

video <- system.file("extdata", "sample.mp4", package = "tidymedia")
get_frame_rate(video)
#> [1] 15