I am trying to cut a long video into several small pieces. Any recommended tools can do the task?
3 Answers
I found ffmpeg could do the task.
To install the ffmpeg
sudo apt-get install ffmpeg
To copy a specific short duration from the video file.
ffmpeg -i original.mp4 -ss 00:01:52 -c copy -t 00:00:10 output.mp4
- -i:input file. The file name of the original video clip.
- -ss:start timestamp. In my case I tried to copy the new video from the original video started after 1 minute and 52 seconds.
-t:indicating the duration of the new video clip, in my case, 10 seconds.
Not sure parameter -c for, maybe the action? If some1 knows, let me know plz.
Reference:
- Cut video by using ffmpeg
- ffmpeg seeking in subsection [cut small sections]
- 1,117
Kdenlive, a non-linear video editor.
Install with:
$ sudo apt install kdenlive
You can see others by running Ubuntu Software and typing video editor in the search area.
- 25,444
Avidemux is good for quickly cutting video. Despite the name, it handles MPEG-4 video standards fine (as well as any other modern format like MKV).
It's not a non-linear editor, meaning that once you've made some cuts you can't go back and change earlier ones, and you can't re-order segments or insert new segments (although you can join videos by adding new clips at the end). It's great for simple tasks like trimming the start and end and maybe commercial breaks.
It can do what you want without issues - just select the segment to output, export it, then select the next part, and so on. If your selections fall on GOP boundaries (ie I-frames) then you can do it losslessly - without re-encoding, using "copy" as the video/audio codecs.
- 37,804