Often when watching or processing video, I have small, simple needs, such as intercepting a certain period of the video, or splitting a video into multiple videos according to the number of matches, because this need is so simple, it is not cost-effective to install a video processing software. So I tried to learn how to use it to process a simple video, and this article summarises the commands I used.


  1. []# yum install epel-release
  2. []# rpm -v --import
  3. []# rpm -Uvh
  4. []# yum install -y ffmpeg ffmpeg-devel

Frequently Commands

Merge Videos

  1. []# cat filelist.txt
  2. file '1.mp4'
  3. file '2.mp4'
  4. file '3.mp4'
  5. file '4.mp4'
  6. []# ffmpeg -f concat -i filelist.txt -c copy final.mp4

Split Videos

  1. []# ffmpeg -ss 00:00:00 -t 00:08:40 -i IMG_2266.MOV -acodec copy -vcodec copy game3.mp4
  2. []# ffmpeg -ss 00:09:20 -t 00:18:00 -i IMG_2266.MOV -acodec copy -vcodec copy game4.mp4

Convert MP4 to Mp3

Simplify method:

  1. []# ffmpeg -i filename.mp4 filename.mp3

Precise control:

  1. []# ffmpeg -i video.mp4 -b:a 192K -vn music.mp3