Ffmpeg reference
From Phonlab
Jump to navigationJump to search
ffmpeg
is a command line tool for working with video files. In the Lab we use it to automate the creation of video stimulus files--adding features such as lead-in still frames or replacing the audio track with processed audio.
Note that some commands are not compatible with older versions of ffmpeg
. These are know to work with version 1.0.7.
Extracting video
To extract video from a certain time, use the -ss
and -t
flags to specify start time and duration, respectively:
ffmpeg -ss HH:MM:SS[.CS] INFILE -t DURATION OUTFILE
This command, for example, would extract a 1.5-second clip starting at 5.3 seconds into 'longfile.avi' and save it to 'shortfile.avi':
ffmpeg -ss 00:00:05.30 longfile.avi -t 1.5 shortfile.avi