Cut lists
The commands are collected in cut lists.
The cut lists will be stored in different ways:
A cut list for for ALL search results will be stored in s@cuts.cutlist.mac
to be used on MacOS and s@cuts.cutlist.win
to be used on Windows.
Individual cut lists for EACH search result will be stored in additional columns in the data frame s@results
.
The cut lists that can be executed in the Terminal (Apple) or the Command Line Interface (Windows).
Input media files
The function will use all files in corpus@transcripts[[ ]]@media.path
.
Therefore you will need to set the options filterMediaInclude
filtering for which input media files you want to create the cuts.
The filter is a regular expression, e.g. '\.(wav|aif)'
for '.wav' and '.aif' audio files or '\.mp4'
for '.mp4' video files.
Output format
The output format is predefined by in the options:
The default is to generate mp4 video cuts. You can also use the following commands to change the output format:
MP4 video cuts with original video quality:
options(act.ffmpeg.command = 'ffmpeg -i "INFILEPATH" -ss TIMESTART -t TIMEDURATION OPTIONS -y "OUTFILEPATH.mp4" -hide_banner')
options(act.ffmpeg.command.fastVideoPostioning = 'ffmpeg -ss TIMESTARTMINUS10SECONDS -i "INFILEPATH" -ss 10.000 -t TIMEDURATION OPTIONS -y "OUTFILEPATH.mp4" -hide_banner')
MP4 video cuts with reduced video quality:
options(act.ffmpeg.command = 'ffmpeg -i "INFILEPATH" -ss TIMESTART -t TIMEDURATION OPTIONS -vf scale=1920:-1 -b:v 1M -b:a 192k -y "OUTFILEPATH.mp4" -hide_banner')
options(act.ffmpeg.command.fastVideoPostioning = 'ffmpeg -ss TIMESTARTMINUS10SECONDS -i "INFILEPATH" -ss 10.000 -t TIMEDURATION OPTIONS -vf scale=1920:-1 -b:v 6M -b:a 192k -y "OUTFILEPATH.mp4" -hide_banner')
WAV audio cuts:
options(act.ffmpeg.command = 'ffmpeg -i "INFILEPATH" -ss TIMESTART -t TIMEDURATION OPTIONS -y "OUTFILEPATH.wav" -hide_banner')
options(act.ffmpeg.command = 'ffmpeg -i "INFILEPATH" -ss TIMESTART -t TIMEDURATION OPTIONS -y "OUTFILEPATH.mp3" -hide_banner')
Advanced options
You can adjust the FFmpeg commands according to your needs.
The following options define the FFmpeg command that will be used by the package. The command needs to contain place holders which will be replaced by the actual values in the package. If you want to define your own ffmpeg command, please make sure to use the following placeholders:
INFILEPATH
path to the input media file.
OUTFILEPATH
path where the output media file will be saved
OPTIONS
FFmpeg options that will be applied additionally, in particular fast video positioning.
TIMESTART
time in seconds where to begin the cutting
TIMESTARTMINUS10SECONDS
time in seconds where to begin the cutting, in case that fast video positioning is being used.
TIMEDURATION
duration of cuts.