Access a given folder and all its subfolders to extract the metadata of drone video files

getVideoMetadata(
  ROOTfolderpath,
  extension = c(".mov", ".mp4"),
  include_srt_datetime = FALSE,
  ignore = NULL,
  timezone = NULL,
  export = NULL
)

Arguments

ROOTfolderpath

full path to folder where all the videos to be processed are at (without a final slash). E.g. '/Users/you/Desktop'

extension

extension of video files, either a single string or a vector with more than one extension. Currently it takes .MOV, .mov, .MP4, or .mp4

include_srt_datetime

Logical. If TRUE, add two columns with the start and end time recorded in the .SRT files.

ignore

Should any video be skipped, enter a string or a vector of strings that match the file name of such videos. E.g. if you want to ignore all videos with file names containing 'DCIM_', then input ignore = "DCIM". If you want all file names with 'DCIM_' and 'edited' to be ignored, then input ignore = c("DCIM", "edited").

timezone

string. Add the correct timezone where the drone videos were taken, as per the R base notation (for additional information, see help(timezomes)). Should this argument be left empty, the time zone will be assumed to be the same as the computer system.

export

Full path AND .txt filename to where the metadata should be exported to. Should the metadate not be exported, export = NULL

Value

a data frame with the metadata of the drone videos: folder path, file name, initial local time, video duration, final local time

Author

Mauricio Cantor

Examples

if (FALSE) myVideoMetadata <- getVideoMetadata(ROOTfolderpath = '/Desktop/you/drone', extension = '.MP4', ignore = c('CORRUPTED', 'DJI_0113'), timezone = 'America/Sao_Paulo', export = NULL)