<p>You can use <a href="http://ffmpeg.org/download.html" rel="nofollow">ffmpeg</a>, a free command-line tool, to do this</p>

<h3>Without recompression</h3>

<pre><code>ffmpeg -ss 02:45 -t 03:05 -i orig.mp4 -c copy -map 0 -avoid_negative_ts make_zero cut.mp4
</code></pre>

<p>This will copy a 3m 5s portion of the original MP4, starting at 2m 45s. Since the codec of the video stream in a MP4 usually uses temporal compression, the cutpoints may not be exact and some frames before and after may be included in the trimmed file. Since there's no recompression, quality is identical to the original.</p>

<h3>With recompression</h3>

<pre><code>ffmpeg -ss 02:45 -t 03:05 -i orig.mp4 -c:v libx264 -crf 20 -c:a aac -b:a 128k -map 0 cut.mp4
</code></pre>

<p>This will precisely cut the specified portion but will recompress the content. The <code>crf</code> value controls the video quality - smaller value produces better quality but a larger file. The <code>b:a</code> sets the bitrate of the audio output.</p>

CC BY-SA 3.0
2016-04-21T03:01:28.750Z
this sounds awesome - just googled the steps involved in setting up ffmpeg on my mac and it looks a tad 'challenging' – any non-command line apps available?
alexh
CC BY-SA 3.0
2016-04-21T04:43:03.537Z
You can download a binary from my first link - no installation needed. Specifically - https://evermeet.cx/ffmpeg/
Gyan
CC BY-SA 3.0
2016-04-22T00:35:12.187Z
Downloads are .7z files. Not sure what to do with these...
alexh
CC BY-SA 3.0
2016-04-22T00:36:05.053Z
Wondering if there are any paid GUI apps?
alexh
CC BY-SA 3.0
2016-04-22T05:10:34.293Z
7z files are compressed archives like ZIP. Get 7zX from http://7zx.updatestar.com/ and extract the files.
Gyan
CC BY-SA 3.0
2016-04-22T06:15:52.653Z
Does 7z work with Macs?
alexh
CC BY-SA 3.0
2016-04-22T06:18:06.263Z
7z is an archive format - it doesn't care about platform. You need a Mac.app which can compress or extract 7z, which the app in my last link does.
Gyan
CC BY-SA 3.0
2016-04-20T12:09:16.027Z
2016-04-20T12:09:16.027Z
Gyan
<p>You can also use MPEG Streamclip for simple editing tasks like that. Just open your file, set in and out point and export again.</p>

CC BY-SA 3.0
2016-04-22T01:29:51.947Z
Does MPEG Streamclip allow for trimming/saving/uncompressing MP4s? Thanks
alexh
CC BY-SA 3.0
2016-04-22T01:31:55.727Z
Well, if it is as simple as selecting a "middle" part of a video - thus cutting off a part of the beginning and the end, it does. Just give it a spin, the software is free and can be downloaded without charge.
Hans Meiser
CC BY-SA 3.0
2016-04-22T01:33:45.183Z
Yes - just trimming bits off - so is it just 'save as mp4' with maximum quality settings for no compression?
alexh
CC BY-SA 3.0
2016-04-22T01:38:28.430Z
I don't quite understand the export part of your question. There is no such thing as an uncompressed mp4 file. You can save the video uncompressed but typically not in an MP4 container. So if you mean "compressed but with a good quality", suggesting you some settings would require to know the size of your video frame (SD, HD, 4k?)... Generally, converting to a higher bitrate than the video was originally recorded in will obviously not make the video any better then it is.
Hans Meiser
CC BY-SA 3.0
2016-04-22T01:58:49.543Z
As the source file is already an MP4, I'm looking to retain as much quality as possible. Wasn't sure what best export/save settings are when resaving an MP4 as MP4 again from MPEG Streamclip.
alexh
CC BY-SA 3.0
2016-04-22T14:28:10.827Z
A bitrate if 20-50mbit will create very high quality HD video, probably you will not notice a difference to your original files.
Hans Meiser
CC BY-SA 3.0
2016-04-22T01:27:18.080Z
2016-04-22T01:27:18.080Z
Hans Meiser
<p>Yes, use MPEG streamclip! You can set your in and out by using the I and O keys and export to many different codecs. The website is <a href="http://www.squared5.com" rel="nofollow">http://www.squared5.com</a>.</p>

<p>I've been using it professionally for years.</p>

CC BY-SA 3.0
2016-04-23T04:19:18.627Z
2016-04-23T04:19:18.627Z
A.J. Hernandez
<p>If I have an existing MP4/H264 video file and I need to trim the start and end,</p>

<p>Then save it as an MP4 again,</p>

<p>Are there any recommendations on export settings?</p>

<mp4><compression>
Best way to trim and save an existing mp4
alexh
# Best way to trim and save an existing mp4

(Asked by: username_0 on 2016-04-20)

If I have an existing MP4/H264 video file and I need to trim the start and end,

Then save it as an MP4 again,

Are there any recommendations on export settings?

**Tags:** mp4, compression


---

## 3 answers

### Answer by username_1 on 2016-04-20. Score: 1

You can use ffmpeg, a free command-line tool, to do this
Without recompression
ffmpeg -ss 02:45 -t 03:05 -i orig.mp4 -c copy -map 0 -avoid_negative_ts make_zero cut.mp4

This will copy a 3m 5s portion of the original MP4, starting at 2m 45s. Since the codec of the video stream in a MP4 usually uses temporal compression, the cutpoints may not be exact and some frames before and after may be included in the trimmed file. Since there's no recompression, quality is identical to the original.
With recompression
ffmpeg -ss 02:45 -t 03:05 -i orig.mp4 -c:v libx264 -crf 20 -c:a aac -b:a 128k -map 0 cut.mp4

This will precisely cut the specified portion but will recompress the content. The crf value controls the video quality - smaller value produces better quality but a larger file. The b:a sets the bitrate of the audio output.

> **Comments:**
> **username_0**: this sounds awesome - just googled the steps involved in setting up ffmpeg on my mac and it looks a tad 'challenging' – any non-command line apps available?  
> **username_1**: You can download a binary from my first link - no installation needed. Specifically - https://evermeet.cx/ffmpeg/  
> **username_0**: Downloads are .7z files. Not sure what to do with these...  
> **username_0**: Wondering if there are any paid GUI apps?  
> **username_1**: 7z files are compressed archives like ZIP. Get 7zX from http://7zx.updatestar.com/ and extract the files.  
> **username_0**: Does 7z work with Macs?  
> **username_1**: 7z is an archive format - it doesn't care about platform. You need a Mac.app which can compress or extract 7z, which the app in my last link does.  

---

### Answer by username_2 on 2016-04-22. Score: 0

You can also use MPEG Streamclip for simple editing tasks like that. Just open your file, set in and out point and export again.

> **Comments:**
> **username_0**: Does MPEG Streamclip allow for trimming/saving/uncompressing MP4s? Thanks  
> **username_2**: Well, if it is as simple as selecting a "middle" part of a video - thus cutting off a part of the beginning and the end, it does. Just give it a spin, the software is free and can be downloaded without charge.  
> **username_0**: Yes - just trimming bits off - so is it just 'save as mp4' with maximum quality settings for no compression?  
> **username_2**: I don't quite understand the export part of your question. There is no such thing as an uncompressed mp4 file. You can save the video uncompressed but typically not in an MP4 container. So if you mean "compressed but with a good quality", suggesting you some settings would require to know the size of your video frame (SD, HD, 4k?)... Generally, converting to a higher bitrate than the video was originally recorded in will obviously not make the video any better then it is.  
> **username_0**: As the source file is already an MP4, I'm looking to retain as much quality as possible. Wasn't sure what best export/save settings are when resaving an MP4 as MP4 again from MPEG Streamclip.  
> **username_2**: A bitrate if 20-50mbit will create very high quality HD video, probably you will not notice a difference to your original files.  

---

### Answer by username_3 on 2016-04-23. Score: 0

Yes, use MPEG streamclip! You can set your in and out by using the I and O keys and export to many different codecs. The website is <http://www.squared5.com>.

I've been using it professionally for years.


---

