<p>For those coming across this, this is using ffmpeg 6.1.1 and allows from and to timestamps and appears to be very efficent</p>
<pre><code>ffmpeg -i original.mp4 -ss 00:00:02.285 -to 00:00:12.925 -c copy first_clip.mp4 -ss 00:00:19.905 -to 00:00:53.245 -c copy second_clip.mp4 -ss 00:01:03.065 -to 00:01:14.625 -c copy third_clip.mp4 -ss 00:01:17.615 -to 00:01:53.585 -c copy fourth_clip.mp4 -ss 00:03:14.345 -to 00:03:43.73 -c copy fifth_clip.mp4
</code></pre>

CC BY-SA 4.0
2024-03-21T03:35:15.977Z
2024-03-21T03:35:15.977Z
kiwicmc
<p>What format is your long video? The seeking performance problem may not be in Kdenlive but in your movie. If you aren't yet, you should consider using a container format that has index tables.</p>

<p>Now regarding extracting a clip from a movie, I believe you can do that with ffmpeg, specifying a codec named "copy" and setting a start position and a duration (in seconds):</p>

<pre><code>ffmpeg -ss &lt;start-position&gt; -i &lt;source-filename&gt; -vcodec copy -acodec copy -t &lt;duration&gt; &lt;destination-filename&gt;
</code></pre>

CC BY-SA 3.0
2012-02-12T02:15:25.500Z
The videos are in a variety of formats - matroska, MP4, and avi. Thank you for the code, I'm trying to make it work, though it seems to be balking on the audio output codec. Also, I assume the time format is `hh:mm:ss`...?
Questioner
CC BY-SA 3.0
2012-02-12T06:48:00.807Z
The documentation for ffmpeg is at http://ffmpeg.org/ffmpeg.html. It looks like you should put the -ss option before the -i as that does a direct seek into the start position. The format of -ss and -t can be in seconds or hh:mm:ss.xxx.
Miguel
CC BY-SA 3.0
2012-02-12T08:46:14.907Z
Cheers for that. I think eventually I'll be able to tweak the settings to be able to extract clips as needed. This looks like the way to go.
Questioner
CC BY-SA 3.0
2012-02-11T18:14:06.523Z
2012-02-12T06:48:18.497Z
2012-02-12T06:48:18.497Z
Miguel
<p>I am making a video that is an analysis of various films. My hope is to get clips from the movies to demonstrate various points I'm talking about.</p>

<p>I'm using Kdenlive on Ubuntu. One issue is that it seems like loading a whole movie length video slows it down making it hard to move around to the right frames (the computer is an i5 with 4GB RAM, so it's not a particularly slow computer).</p>

<p>The main problem, though, is that I want to select sections and edit them out so I can have them as clips ready to include in my master edit. However, if I go through the render process, I'll end up affecting the compression and video quality settings.</p>

<p>Is there a way I can specify a start and end point in hours, minutes, and seconds, and then output that portion into a new file, without changing the quality of the video?</p>

<p>Perhaps something at the command line? That way I could scan through the video using a more efficient player like VLC or something, and pick out my start and stop times there.</p>

<p>Additional note, in case it matters: I don't need the sound, just the image.</p>

<editing>
What is a good efficient way to isolate clips from long movies?
Questioner
# What is a good efficient way to isolate clips from long movies?

(Asked by: username_0 on 2012-02-11)

I am making a video that is an analysis of various films. My hope is to get clips from the movies to demonstrate various points I'm talking about.

I'm using Kdenlive on Ubuntu. One issue is that it seems like loading a whole movie length video slows it down making it hard to move around to the right frames (the computer is an i5 with 4GB RAM, so it's not a particularly slow computer).

The main problem, though, is that I want to select sections and edit them out so I can have them as clips ready to include in my master edit. However, if I go through the render process, I'll end up affecting the compression and video quality settings.

Is there a way I can specify a start and end point in hours, minutes, and seconds, and then output that portion into a new file, without changing the quality of the video?

Perhaps something at the command line? That way I could scan through the video using a more efficient player like VLC or something, and pick out my start and stop times there.

Additional note, in case it matters: I don't need the sound, just the image.

**Tags:** editing


---

## 2 answers

### Answer by username_2 on 2012-02-11. Score: 3 | Accepted answer

What format is your long video? The seeking performance problem may not be in Kdenlive but in your movie. If you aren't yet, you should consider using a container format that has index tables.
Now regarding extracting a clip from a movie, I believe you can do that with ffmpeg, specifying a codec named "copy" and setting a start position and a duration (in seconds):
ffmpeg -ss  -i  -vcodec copy -acodec copy -t

> **Comments:**
> **username_0**: The videos are in a variety of formats - matroska, MP4, and avi. Thank you for the code, I'm trying to make it work, though it seems to be balking on the audio output codec. Also, I assume the time format is `hh:mm:ss`...?  
> **username_2**: The documentation for ffmpeg is at http://ffmpeg.org/ffmpeg.html. It looks like you should put the -ss option before the -i as that does a direct seek into the start position. The format of -ss and -t can be in seconds or hh:mm:ss.xxx.  
> **username_0**: Cheers for that. I think eventually I'll be able to tweak the settings to be able to extract clips as needed. This looks like the way to go.  

---

### Answer by username_1 on 2024-03-21. Score: 0

For those coming across this, this is using ffmpeg 6.1.1 and allows from and to timestamps and appears to be very efficent
ffmpeg -i original.mp4 -ss 00:00:02.285 -to 00:00:12.925 -c copy first_clip.mp4 -ss 00:00:19.905 -to 00:00:53.245 -c copy second_clip.mp4 -ss 00:01:03.065 -to 00:01:14.625 -c copy third_clip.mp4 -ss 00:01:17.615 -to 00:01:53.585 -c copy fourth_clip.mp4 -ss 00:03:14.345 -to 00:03:43.73 -c copy fifth_clip.mp4


---

