Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-21T03:01:28.750Z
Answers.Text: 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?
Answers.UserDisplayName: alexh
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-21T04:43:03.537Z
Answers.Text: You can download a binary from my first link - no installation needed. Specifically - https://evermeet.cx/ffmpeg/
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-22T00:35:12.187Z
Answers.Text: Downloads are .7z files. Not sure what to do with these...
Answers.UserDisplayName: alexh
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-22T00:36:05.053Z
Answers.Text: Wondering if there are any paid GUI apps?
Answers.UserDisplayName: alexh
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-22T05:10:34.293Z
Answers.Text: 7z files are compressed archives like ZIP. Get 7zX from http://7zx.updatestar.com/ and extract the files.
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-22T06:15:52.653Z
Answers.Text: Does 7z work with Macs?
Answers.UserDisplayName: alexh
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-22T06:18:06.263Z
Answers.Text: 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.
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-20T12:09:16.027Z
Answers.LastActivityDate: 2016-04-20T12:09:16.027Z
Answers.UserDisplayName: Gyan
Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-22T01:29:51.947Z
Answers.Text: Does MPEG Streamclip allow for trimming/saving/uncompressing MP4s? Thanks
Answers.UserDisplayName: alexh
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-22T01:31:55.727Z
Answers.Text: 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.
Answers.UserDisplayName: Hans Meiser
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-22T01:33:45.183Z
Answers.Text: Yes - just trimming bits off - so is it just 'save as mp4' with maximum quality settings for no compression?
Answers.UserDisplayName: alexh
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-22T01:38:28.430Z
Answers.Text: 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.
Answers.UserDisplayName: Hans Meiser
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-22T01:58:49.543Z
Answers.Text: 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.
Answers.UserDisplayName: alexh
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-22T14:28:10.827Z
Answers.Text: A bitrate if 20-50mbit will create very high quality HD video, probably you will not notice a difference to your original files.
Answers.UserDisplayName: Hans Meiser
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-22T01:27:18.080Z
Answers.LastActivityDate: 2016-04-22T01:27:18.080Z
Answers.UserDisplayName: Hans Meiser
Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-04-23T04:19:18.627Z
Answers.LastActivityDate: 2016-04-23T04:19:18.627Z
Answers.UserDisplayName: A.J. Hernandez
Body: <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>
  
Tags: <mp4><compression>
Title: Best way to trim and save an existing mp4
UserDisplayName: alexh
ThreadText: # 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](http://ffmpeg.org/download.html), 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.
  
  
  ---
  
  