tidymedia: Media File Preprocessing and Metadata for the 'tidyverse'
Source:R/tidymedia-package.R
tidymedia-package.Rdtidymedia prepares audio and video files for research. It trims, crops,
converts and standardizes files, and reads file details back as tibbles. It
runs the programs FFmpeg and MediaInfo. Start with vignette("tidymedia").
Details
Task functions, such as extract_audio(), do one common job in one call.
Pipeline functions, such as ffm_files(), build an FFmpeg command one step
at a time. Direct commands, ffmpeg(), ffprobe() and mediainfo(), pass
your own arguments to the programs. probe_all() and get_duration() read
file details.
See vignette("tidymedia") for the guided tour and a glossary of media
terms. The other vignettes are "batch", "metadata", "verification" and
"workflow".
Session options
A new option value takes effect at the next call. The workers of a
parallel = TRUE run use your session's values.
options(tidymedia.timeout = 600)sets a limit, in whole seconds, on each program the package starts. The default,0, means no limit. Seewith_timeout().options(tidymedia.check_tracks = FALSE)turns off the dropped-track warning ofextract_audio(),convert_audio(),normalize_audio()and their_batchforms. The default isTRUE. The check runs one FFprobe call for each different input, whenrun = TRUEand the call or job row names noaudio_stream. Turning it off skips those calls. A value other thanTRUEorFALSEgives an error that names the option, when the check would run.options(tidymedia.hardware_encoders = "h264_nvenc")names the hardware video encoders of this computer, so the package does not ask FFmpeg.character(0)means none.
Errors when FFmpeg fails
tidymedia_ffmpeg_exit: FFmpeg exited non-zero inffm_run(), or in theloudnormanalysis pass ofnormalize_audio(two_pass = TRUE). The task functions that run their command withffm_run(), such asextract_audio()andseparate_audio_video(), give it too. Thetm_statusfield holds the exit status.tidymedia_loudnorm_no_measurement: the two-pass analysis gave no measurement. In the_batchform,tm_rowsholds the rows, andtm_row_statusholds each exit status orNA.tidymedia_multitrack_separation:separate_audio_video()could not write several audio tracks into one audio file. The_batchform gives a warning.
Author
Maintainer: Jeffrey Girard me@jmgirard.com (ORCID)
Authors:
Jeffrey Girard me@jmgirard.com (ORCID)