Video editing! In Linux !! from the Terminal !!!!
I love this blog post from Daniel Clark, who normally writes little nuggets about Ruby on Rails. But here he describes how to edit video files using the terminal. Not a GUI in sight! Lovely thought, right?
Anyway, clever use of ffmpeg (which is the powertool of powertools when converting video by the way) enables you to do magic editing without the huge overhead of a GUI.
Cut out video
This SO question also adds some tips on how to cut sequences from existing files.
It’s a long answer, so read it, but essentially you will get away with the slow version that re-encodes:
ffmpeg -i movie.mp4 -ss 00:00:03 -t 00:00:08 -async 1 cut.mp4
Skip the
-t 00:00:08
if you want to copy until the end of the source file.
There are options, so read the SO carefully!
Concatenate videos’
Create a text file
# this is a comment file '/path/to/file1' file '/path/to/file2' file '/path/to/file3'
then
ffmpeg -f concat -safe 0 -i mylist.txt -c copy output
The -safe 0 above is not required if the paths are relative!