20

I am trying to cut a long video into several small pieces. Any recommended tools can do the task?

Elder Geek
  • 36,023
  • 25
  • 98
  • 183
r0ng
  • 1,037
  • @DavidFoerster IMHO - This seems to be specific to cutting into segments as opposed to a general video editing question.. – Elder Geek Oct 27 '16 at 18:43
  • @ElderGeek video editing software is generally used to cut portions of video and move them around. Exporting clips is just one extra step. – TheWanderer Oct 29 '16 at 01:01
  • @Zacharee1 I would agree that cutting and moving is part of video editing. Adding and adjusting sound tracks is also a part. The accepted answer here for cutting a video into clips is better suited to the particular question posed than any of the others in the generic answer marked as a duplicate. Installing a full blown video editing suite seems overkill for the task at hand since ffmpeg accurately handles timecodes with the -ss and -t switches. I don't believe that any of the video editing suites is better suited to this task. – Elder Geek Oct 30 '16 at 15:49
  • 2
    Voting to reopen as I don't see this task as well suited to the video editing suites in th marked duplicate answer. – Elder Geek Oct 30 '16 at 15:52
  • In that case, the question would be too broad imo @elder – TheWanderer Oct 30 '16 at 16:36
  • Thanks for your editing and helped me solved the problem. Elder Geek :) – r0ng Oct 31 '16 at 00:05
  • 1
    @Zacharee1 actually, this question is far more narrow than the question you voted as a duplicate! Perhaps reading them again would provide clarity. – Elder Geek Nov 01 '16 at 15:11
  • @r0ng Glad to help! – Elder Geek Nov 01 '16 at 15:12

3 Answers3

48

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]

r0ng
  • 1,037
4

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.

L. D. James
  • 25,036
3

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.

thomasrutter
  • 36,774