Ffmpeg reference

From Phonlab
Revision as of 14:31, 16 October 2013 by Ronald (talk | contribs) (Created page with "<code>ffmpeg</code> 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 st…")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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