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.

5+ Linux Video Editing Tool Tips

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'


ffmpeg -f concat -safe 0 -i mylist.txt -c copy output

The -safe 0 above is not required if the paths are relative!


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.