1

Note: Alternatively the question is: "How to cut a video in multiple slices and store each clip as a separate video quickly (!) with Kdenlive?", but I don't think Kdenlive supports an easy way to export single clips.

I am looking for a tool that allows me to slice a video (in a quick way).

At first I tried Kdenlive but it's not really a good tool if you just want to cut a video into multiple short clips and export them (rather fast). In Kdenlive I can only export a selected part of the video or the entire project. But what I want is basically "Cut at frame t and t + n and then just "right click" that slice and save it away as mp4 (or any other common format - it does not really matter).

Kdenlive would be fine if I'd had to do this just to one video but I need to do this to multiple videos as I am trying to create a dataset for a machine learning project of mine.

I know there are a bunch of free tools out there but does anybody know which (if any) of those might be suitable for this (rather boring but necessary) manual task?

2

shotcut

I would suggest shotcut. It's really fast and allows you to select where to cut at the right place (to the frame). It's also visual making it really easy.

Basic Setup

  • Start shotcut
  • Give your project a name
  • Drag & Drop an MP4 in the screen video area
  • Click on the video now playing, move it to the timeline

Cut + Export

  • Click on the timeline time (top of the timeline) to select a location.
  • Click on the ][ icon to do a cut.
  • Right click on the left side and do "Remove".
  • Click on the right side and do a "Remove" as well.
  • Then Export (File → Export Video ... | Ctrl-E).

Next Cut

Once the export is done:

  • Hit Ctrl-Z to restore the clip on the right side.
  • Then cut/remove again...
  • Repeat until done.

enter image description here

Under Ubuntu, I can install shotcut with:

snap install shotcut

ffmpeg

If you know the start point and duration, then you can use ffmpeg like so:

ffmpeg -ss 0:0 -t 5:0 -i in.mp4 out.mp4

The -ss defines the start point and -t defines the duration. You can use those two and create the cuts in the command line. You can always use shotcut or some other tool to determine the start/duration parameters.

| improve this answer | |
  • 1
    Thank you! shotcut seems like a good option :) – displayname Jul 27 at 20:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.