Usage
mp4_to_png(path, out = file.path(dirname(path), "raw"), fps = 4, size = "500x500",
other.opts = "", crop = "", ffmpeg = NULL)
png_to_mp4(path, out = file.path(dirname(path), "raw"), fps = 4, ffmpeg = NULL)
Arguments
- path
- Path to the in .mp4 video file
(
mp4_to_png
) or .png directory
(png_to_mp4
).
- out
- Path to place the out .png files or .mp4
video.
- fps
- The number of image frames per second to
output. Generally the fps used to desconstruct a video
into images will be used to reconstruct the images back
to video.
- size
- Character string of the output size of the
png files in the form of "width x height" (in px and no
spaces).
- other.opts
- other options to be passed to
ffmpeg.
- crop
- Character string of
ffmpeg code used to crop
the images (e.g.
"-vf crop=in_w-2*120"
). See:
http://www.ffmpeg.org/ffmpeg-filters.html#crop for
more.
- ffmpeg
- Raw mmpeg
code that may be provided in lieu of the other
arguments.
Value
mp4_to_png
- Returns an directory of still .png
images.
mp4_to_png
- Returns a spliced .mp4 video.
Description
mp4_to_png
- Converts a .mp4 video to a directory of
sill .png images.
png_to_mp4
- Converts a directory of .png images to
.mp4 video.
Note
User must have mmpeg
installed.
mp4_to_png
- Currently not functional.
Examples
## Not run: # mp4_to_png("foo.mp4")# ## End(Not run)