createImageSeq
creates an image sequences (.png) using
video files as input. All movies within a directory will
be converted into an image sequence.
For each movie, a new directory is created containing the recorded date and
name of the movie.
createImageSeq(
moviepath = "Movies",
imagepath = "ImageSequences",
x = 1920,
y = 1080,
fps = 15,
nsec = 2,
start = NULL,
stop = NULL,
ext = "MTS",
libavpath = "avconv",
exiftoolpath = "exiftool",
pythonpath = "python",
verbose = FALSE,
logfile = FALSE
)
Path to existing directory containing the video files. By default, 'Movies' is used.
Path to location of a directory in which image sequences should be saved. By default, 'ImageSequences' is used (and created if not existing).
Number of pixels in horizontal direction; default is 1920 (HD).
Number of pixels in vertical direction; default is 1080 (HD).
Frames per second, default is 15.
Duration of movie that is exported, default is 2 seconds.
When movie length is greater than nsec
, the nsec
seconds
in the exact middle of the movie are exported.
Start time (in seconds) from where the video is converted (optional). By
default, the nsec
middle second of the video are used. If a a start
time is specified and no stop time, nsec
seconds starting from start
are converted.
End time (in seconds) from where the video is converted (optional). By
default, the nsec
middle second of the video are used. When an end time
but no start time are specified, conversion starts at nsec
seconds before
end
.
The extension of the video. Default is 'MTS'
. All
formats supported by libav are accepted. To convert videos with different
extensions, use for example c('MTS','mp4')
.
Path to location where the executable file for libav
can be found (named 'avconv.exe'), in case it is not found automatically,
e.g. 'C:/Users/libav/usr/bin/avconv.exe'
.
Path to location where the executable file for
ExifTool can be found, in case it is not found automatically.
For instance, use 'exiftool(-k).exe'
, if located in the working
directory.
Path to location where the executable file for
Python 2.7 can be found, in case it is not found automatically. For
instance, use 'C:/Python27/python.exe'
.
Logical. By default FALSE. Set to TRUE will print additional information.
Logical. By default FALSE. Set to TRUE will create a log file in the working directory.
Marjolein Bruijning, Caspar A. Hallmann & Marco D. Visser
if (FALSE) {
createImageSeq(moviepath="Movies",imagepath="ImageSequences",
nsec=3,ext="AVI")
}
Run the code above in your browser using DataLab