Description Usage Arguments Details Examples
View source: R/motion_sense_function.R
A function that detects motion in a .mp4 or .mov film, and saves images where motion was detected. This function calls ffmpeg and is currently limited to Windows architecture.
1 2 3 4 5 6 7 8 9 10 11 12 | motion_sense(
input_vid,
ffmpeg_path = "DEFAULT",
sensor_res = 25,
output_res = 50,
saturation = 100,
brightness = 100,
ips = 8,
write_files = "FALSE",
detection_conf = 95,
parallel = "TRUE"
)
|
input_vid |
A path to the video file that one wishes to be converted. |
sensor_res |
A percent scalar between 1 and 100, used to modify video pixel resolution for motion detection. Default is 25. |
output_res |
A percent scalar between 1 and 100, used to modify pixel resolution output images (those with motion detected). Default is 50. |
saturation |
A percent scalar between 0 and 300, used to modify the saturation of output images. Default is 100. |
brightness |
A percent scalar between 0 and 200, used to modify the brightness of output images. Default is 100. |
write_files |
A binary "TRUE/FALSE" variable that determines whether differene images will be kept. |
detection_conf |
A percent scalar between 1 and 100, used to determine level of movement required to save an image. Default is 95. |
parallel |
A binary "TRUE/FALSE" variable that determines whether internal operations will be run by parallel processing. If "TRUE", function will call upon the "doParallel" package. Default is "TRUE". |
ffmpeg |
A path to ffmpeg.exe. Defaults to location called by ffmpeg_dir. |
bin |
An integer that designates how many images will be alloted to each folder, following completion of conversion. Default is 1000. |
This function splits a .mp4 or .mov film into a series of jpg images of equal resolution, according to user designates images per second. Ffmpeg must be installed for this function to operate correctly. Furthermore, this function calls upon ffmpeg using Windows language, and is therefore currently limited to Windows users.
1 2 3 | source = "C:/BirdsFeeding.mp4"
ffmpeg.locale = "C:/Users/Rudolf/ffmpeg.exe"
motion_sense(input_vid = source, ffmpeg_path, ips = 10, bin = 500)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.