Report which dependency programs tidymedia can find
Source:R/program_management.R
program_status.Rdprogram_status() looks for the four programs that the package uses:
ffmpeg, ffprobe, ffplay and mediainfo. It returns a table with one
row for each program. The row shows where the program is and which version
it reports. The call does not install, write or change anything.
Value
A tibble with one row for each program and three columns:
program, the name of the program.location, the path to the program, orNA.version, the version that the program reported, orNA.
Details
The call looks in the same places as find_ffmpeg(). First it looks on the
PATH, then at a location saved by set_program(). For locations saved by
versions before 0.2.0, see the section "Locations saved by earlier versions"
in find_ffmpeg().
A program that is not installed and has no saved location gets NA in both
columns. This case gives no warning, so four missing programs give one table
and not four warnings.
A saved location that cannot be used still gives a warning. Without it, the
NA would look like a program you never had. Each warning names the saved
location or the file that holds it, so you can fix it. There are two cases:
tidymedia_location_gone: no program is at the saved location now.tidymedia_location_unreadable: the file that stores the location does not hold exactly one location.
In both cases, the row has NA in both columns. unset_program() forgets
the location, and set_program() replaces it.
The version is what the program reports about itself. For ffmpeg,
ffprobe and ffplay, it is the FFmpeg build number. For mediainfo, it is
the MediaInfo library version.
Sometimes the call finds a program but cannot get its version. Then the row
has a location and an NA version. This happens when the program call fails.
It also happens when the time limit in options(tidymedia.timeout = ) stops
it.
See also
find_ffmpeg() and the other find_*() functions to look up one
program. set_program() to save the location of a program that is not on
the PATH. unset_program() to forget a saved location.
Other program management functions:
find_ffmpeg(),
install_on_win(),
set_program(),
unset_program()
Examples
# One row per program; NA where the program was not found
program_status()
#> # A tibble: 4 × 3
#> program location version
#> <chr> <chr> <chr>
#> 1 ffmpeg /usr/bin/ffmpeg 6.1.1-3ubuntu5
#> 2 ffprobe /usr/bin/ffprobe 6.1.1-3ubuntu5
#> 3 ffplay /usr/bin/ffplay 6.1.1-3ubuntu5
#> 4 mediainfo /usr/bin/mediainfo 24.01