Commit 7474b699 authored by Chris Holbrook's avatar Chris Holbrook

export make_video_ffmpeg

parent 1bc0c918
......@@ -22,6 +22,7 @@ export(make_transition)
export(make_transition2)
export(make_transition3)
export(make_video)
export(make_video_ffmpeg)
export(min_lag)
export(point_offset)
export(position_heat_map)
......
......@@ -378,17 +378,17 @@ make_video <- function(input_dir = getwd(),
##'
##' # make .mp4 video
##' # make sure ffmpeg is on system path (see \code{make_frames} and details)
##' make_video(dir = frames, pattern = "%02d.png", output = "animation.mp4")
##' make_video_ffmpeg(dir = frames, pattern = "%02d.png", output = "animation.mp4")
##'
##' # make .wmv video
##' make_video(dir=frames, pattern = "%02d.png", output = "animation.wmv")
##'
##' # start animation on frame 10, end on frame 20
##' make_video(dir=frames, pattern = "%02d.png", start_frame = 10,
##' make_video_ffmpeg(dir=frames, pattern = "%02d.png", start_frame = 10,
##' end_frame = 20, output = "animation_2.mp4")
##'
##' # resize output video to 720x480
##' make_video(dir=frames, pattern = "%02d.png", size = "720x480",
##' make_video_ffmpeg(dir=frames, pattern = "%02d.png", size = "720x480",
##' output = "animation_3.mp4" )
##'
##' # change ffmpeg preset
......@@ -396,20 +396,20 @@ make_video <- function(input_dir = getwd(),
##' output = "animation_4.mp4")
##'
##' # change input framerate
##' make_video(dir=frames, fps_in = 1, pattern = "%02d.png",
##' make_video_ffmpeg(dir=frames, fps_in = 1, pattern = "%02d.png",
##' preset = "ultrafast", output = "animation_5.mp4")
##'
##'
##' # add path to ffmpeg (windows)
##' make_video(dir = frames, pattern = "%02d.png", output = "animation.mp4",
##' make_video_ffmpeg(dir = frames, pattern = "%02d.png", output = "animation.mp4",
##' ffmpeg = "c://path//to//windows//ffmpeg.exe")
##'
##' # add path to ffmpeg (mac)
##' make_video(dir = frames, pattern = "%02d.png", output = "animation.mp4",
##' make_video_ffmpeg(dir = frames, pattern = "%02d.png", output = "animation.mp4",
##' ffmpeg = "/path/to/ffmpeg")
##' }
##'
##' @keywords internal
##' @export
make_video_ffmpeg <- function(
dir = getwd(),
......
......@@ -191,17 +191,17 @@ frames <- system.file("extdata", "frames", package = "glatos")
# make .mp4 video
# make sure ffmpeg is on system path (see \code{make_frames} and details)
make_video(dir = frames, pattern = "\%02d.png", output = "animation.mp4")
make_video_ffmpeg(dir = frames, pattern = "\%02d.png", output = "animation.mp4")
# make .wmv video
make_video(dir=frames, pattern = "\%02d.png", output = "animation.wmv")
# start animation on frame 10, end on frame 20
make_video(dir=frames, pattern = "\%02d.png", start_frame = 10,
make_video_ffmpeg(dir=frames, pattern = "\%02d.png", start_frame = 10,
end_frame = 20, output = "animation_2.mp4")
# resize output video to 720x480
make_video(dir=frames, pattern = "\%02d.png", size = "720x480",
make_video_ffmpeg(dir=frames, pattern = "\%02d.png", size = "720x480",
output = "animation_3.mp4" )
# change ffmpeg preset
......@@ -209,16 +209,16 @@ make_video(dir=frames, pattern = "\%02d.png", preset = "ultrafast",
output = "animation_4.mp4")
# change input framerate
make_video(dir=frames, fps_in = 1, pattern = "\%02d.png",
make_video_ffmpeg(dir=frames, fps_in = 1, pattern = "\%02d.png",
preset = "ultrafast", output = "animation_5.mp4")
# add path to ffmpeg (windows)
make_video(dir = frames, pattern = "\%02d.png", output = "animation.mp4",
make_video_ffmpeg(dir = frames, pattern = "\%02d.png", output = "animation.mp4",
ffmpeg = "c://path//to//windows//ffmpeg.exe")
# add path to ffmpeg (mac)
make_video(dir = frames, pattern = "\%02d.png", output = "animation.mp4",
make_video_ffmpeg(dir = frames, pattern = "\%02d.png", output = "animation.mp4",
ffmpeg = "/path/to/ffmpeg")
}
......@@ -226,4 +226,3 @@ make_video(dir = frames, pattern = "\%02d.png", output = "animation.mp4",
\author{
Todd Hayden, Tom Binder, Chris Holbrook
}
\keyword{internal}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment