get_width: Get the video width of a media file

View source: R/mediainfo.R

get_widthR Documentation

Get the video width of a media file

Description

get_width() uses the MediaInfo program to look up the video width of a media file, in pixels (px).

Usage

get_width(file)

Arguments

file

A character vector of one or more media file paths.

Details

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

Value

A double vector (one per file) giving the video width in px.

See Also

mediainfo_parameter() for arbitrary MediaInfo fields, and probe_all() to read information with FFprobe.

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

Examples


video <- system.file("extdata", "sample.mp4", package = "tidymedia")
get_width(video)


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